23 #include <LoopTable.h>
24 #include <VectorTransformation.h>
26 #include <SeqConstructor.h>
28 #include <ranking_helper.h>
29 #include <ranking_helper2.h>
30 #include <SolvationPotential.h>
31 #include <RapdfPotential.h>
35 namespace Victor {
namespace Lobo {
44 LoopModel(
const LoopModel& orig);
48 vector<string>& getTableFileName();
50 vector<int> vdwValues(
Spacer& sp,
unsigned int index1,
51 unsigned int index2, vector<Spacer>& solVec);
53 void rankRawScore(
Spacer& sp,
unsigned int index1,
unsigned int index2,
54 vector<Spacer>& solVec,
unsigned int maxWrite = 9999);
56 void doScatterPlot(
Spacer& sp,
unsigned int index1,
unsigned int index2,
57 vector<Spacer>& solVec,
bool withOxygen =
true);
59 void refineModel(
Spacer& sp,
unsigned int index1,
unsigned int index2,
60 vector<Spacer>& solVec);
62 void optimizeModel(
Spacer& sp,
unsigned int index1,
unsigned int index2,
63 vector<Spacer>& solVec,
bool verbose =
true);
65 vector<double> rankRms2(
Spacer& sp,
unsigned int index1,
unsigned int index2,
66 vector<Spacer>& solVec);
68 double calcOrigEnergy(
const Spacer& sp,
unsigned int index1,
70 double calculateEndRms(
const Spacer& sp,
unsigned int index1,
71 unsigned int index2,
const Spacer& sp2);
72 double calculateRms(
const Spacer& sp,
unsigned int index1,
73 unsigned int index2,
const Spacer& sp2,
74 bool output =
true,
bool withOxygen =
false);
75 double calculateRms2(
const Spacer& sp,
unsigned int index1,
76 unsigned int index2,
const Spacer& sp2,
bool output,
77 bool withOxygen =
false);
78 void setStructure(
Spacer& sp,
Spacer& sp2,
unsigned int index1,
81 vector<int> consistencyValues(
Spacer& sp,
unsigned int index1,
82 unsigned int index2, vector<Spacer>& solVec);
84 double calculatePropensities(
Spacer& sp);
85 double calculatePropensities(
const Spacer& sp,
unsigned int index1,
86 unsigned int index2,
Spacer& sp2);
88 double getENDRMS_WEIGHT(
unsigned int len = 0);
89 void saveENDRMS_WEIGHT(ostream& output);
91 static string getSCWRLConservedSequence(
const Spacer& sp,
92 unsigned int index1,
unsigned int index2);
94 void defineLoopAnchors(
Spacer& sp,
unsigned int& index1,
95 unsigned int& index2,
bool isDeletion);
99 void setInterpolated() {
103 void setNotInterpolated() {
107 void setLimitedVerbose() {
111 void setVerbose(
unsigned int _verb = 10) {
120 void setScatterPlot(ostream* _sc) {
125 void releaseTables(
unsigned int index = 0);
126 void setTableFileName(
string basename,
string ending =
".lt");
127 void setTableFileName(vector<string>& _tFN);
128 vector<Spacer> createLoopModel(
const AminoAcid& start,
129 const vgVector3<double>& startN,
const AminoAcid& end,
130 const vgVector3<double>& endNAtom,
unsigned int indexS,
131 unsigned int indexE,
unsigned int numLoops,
132 unsigned int numLoops2, vector<string> typeVec);
133 void clusterLoops(vector<Spacer>& vsp);
135 void copy(
const LoopModel& orig);
138 int pos2,
double distance);
139 double compactness(
Spacer& loop,
unsigned int index1,
unsigned int index2,
142 double calculateEnergy(
const Spacer& sp,
unsigned int index1,
143 unsigned int index2,
Spacer& sp2);
144 double calculateSecondaryPreference(
const Spacer& sp,
unsigned int index1,
145 unsigned int index2,
Spacer& sp2);
146 double calculatePacking(
const Spacer& sp,
unsigned int index1,
147 unsigned int index2,
Spacer& sp2);
148 double calculateSolvation(
const Spacer& sp,
unsigned int index1,
149 unsigned int index2,
Spacer& sp2);
150 double calculateHydrogen(
const Spacer& sp,
unsigned int index1,
151 unsigned int index2,
Spacer& sp2);
152 double calculateCompactness(
const Spacer& sp,
unsigned int index1,
153 unsigned int index2,
Spacer& sp2);
154 double calculateFlankingConformation(
const Spacer& sp,
unsigned int index1,
155 unsigned int index2,
Spacer& sp2);
156 double calculateConsistency(
Spacer& sp,
unsigned int index1,
157 unsigned int index2,
Spacer& sp2);
159 void setENDRMS_WEIGHT(
double val,
unsigned int len = 0);
160 void setAllENDRMS_WEIGHT(
double val,
unsigned int max = 13);
161 void loadENDRMS_WEIGHT(istream& input);
164 LoopModel& operator=(
const LoopModel& orig);
166 static unsigned int OPT_MAX1;
167 static unsigned int OPT_MAX2;
168 static unsigned int OPT_NUM;
169 static double VDW_LIMIT;
170 static double SIM_LIMIT;
171 static double ENERGY_LIMIT;
172 static double ENERGY_WEIGTH;
173 static double SECPREF_WEIGTH;
174 static double SECPREF_TOL;
175 static double PACKING_WEIGTH;
178 static unsigned int MAX_SPAN;
179 static unsigned int MAX_ITER_SOL;
180 static string TABLE_PARAM_FILE;
190 vgVector3<float> endN, LoopTableEntry& startEntry,
191 LoopTableEntry& endEntry, VectorTransformation& vt,
192 unsigned int nAmino);
194 bool ringClosureBase(
const LoopTableEntry&,
const LoopTableEntry&,
195 unsigned int,
unsigned int,
double,
196 VectorTransformation vt,
unsigned int num,
198 vector<vgVector3<float> >& partialSolution);
199 bool ringClosure(
const LoopTableEntry&,
const LoopTableEntry&,
unsigned int,
200 unsigned int,
double, VectorTransformation vt,
201 vector<vgVector3<float> >& partialSolution,
202 unsigned int currentSelection = 1);
204 vector<Spacer> calculateLoop(
const vgVector3<float>& startN,
205 unsigned int length, vector<string> typeVec);
209 void pAddRot(
AminoAcid& start, vgVector3<float>& startN,
211 const vgMatrix3<float>& rotMat);
212 void pAddTrans(
AminoAcid& start, vgVector3<float>& startN,
214 const vgVector3<float>& trans);
215 void loadTables(
unsigned int nAmino);
216 void pAminoAcidSetup(
AminoAcid* aa,
string type,
double bfac = 90.0);
220 int loop_loop_vdw(
Spacer& sp,
unsigned int index1);
221 int loop_spacer_vdw(
Spacer& loop,
unsigned int index1,
unsigned int index2,
231 unsigned int pVerbose;
233 vector<LoopTable*> table;
234 vector<string> tableFileName;
235 vector<vgVector3<float> > solution;
236 static unsigned int MAX_CHAIN_LENGTH;
237 static double BOND_ANGLE_N_TO_CB;
238 static double BOND_ANGLE_CB_TO_C;
239 static double BOND_LENGTH_CA_TO_CB;
241 vector<double> ENDRMS_WEIGTH;
252 inline vector<string>&
253 LoopModel::getTableFileName() {
254 return tableFileName;
260 LoopModel::setTableFileName(
string basename,
string ending) {
262 tableFileName.clear();
263 for (
unsigned int i = 0; i < MAX_CHAIN_LENGTH; i++)
264 tableFileName.push_back(basename + (uitos(i)).c_str() + ending);
268 LoopModel::setTableFileName(vector<string>& _tFN) {
269 PRECOND(_tFN.size() == MAX_CHAIN_LENGTH, exception);
270 tableFileName.clear();
271 for (
unsigned int i = 0; i < _tFN.size(); i++)
272 tableFileName.push_back(_tFN[i]);
276 LoopModel::pAddRot(
AminoAcid& start, vgVector3<float>& startN,
277 AminoAcid& end, vgVector3<float>& endN,
const vgMatrix3<float>& rotMat) {
278 for (
unsigned int i = 0; i < start.sizeBackbone(); i++)
279 start[i].setCoords(convert(rotMat) * start[i].getCoords());
280 startN = rotMat * startN;
281 for (
unsigned int i = 0; i < end.sizeBackbone(); i++)
282 end[i].setCoords(convert(rotMat) * end[i].getCoords());
283 endN = rotMat * endN;
287 LoopModel::pAddTrans(
AminoAcid& start, vgVector3<float>& startN,
288 AminoAcid& end, vgVector3<float>& endN,
const vgVector3<float>& trans) {
289 for (
unsigned int i = 0; i < start.sizeBackbone(); i++)
290 start[i].setCoords(start[i].getCoords() - convert(trans));
291 for (
unsigned int i = 0; i < end.sizeBackbone(); i++)
292 end[i].setCoords(end[i].getCoords() - convert(trans));
298 LoopModel::pCalculateLoopRms(
Spacer& sp1,
Spacer& sp2) {
300 ERROR(
"Arguments do not match.", exception);
303 for (
unsigned int i = 0; i < sp1.
sizeAmino(); i++)
308 return sqrt(res / (3 * sp1.
sizeAmino()));
312 LoopModel::getSCWRLConservedSequence(
const Spacer& sp,
unsigned int index1,
313 unsigned int index2) {
316 for (
unsigned int i = 0; i <= index1; i++)
317 tmp += static_cast<char> (tolower(threeLetter2OneLetter(
320 for (
unsigned int i = index1 + 1; i <= index2; i++)
323 for (
unsigned int i = index2 + 1; i < sp.
sizeAmino(); i++)
324 tmp += static_cast<char> (tolower(threeLetter2OneLetter(
332 #endif //_LOOPMODEL_H_
Includes methods that allow to calculate solvation, energy and propensity.
Definition: SolvationPotential.h:44
AminoAcid & getAmino(unsigned int n)
Definition: Spacer.cc:962
class manages the angle qualities and the energy
Definition: PhiPsi.h:41
virtual string getType() const
Definition: SimpleBond.h:114
const unsigned int sizeAmino() const
Definition: Spacer.cc:197
Distance-dependent residue-specific all-atom probability discriminatory function. ...
Definition: RapdfPotential.h:39
It mplements a simple amino acid.
Definition: AminoAcid.h:43
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42