Victor
 All Data Structures Functions Variables Friends Pages
LoopExtractor Class Reference

Extracts all the loop regions (by numbers) from a given spacer. More...

Public Member Functions

 LoopExtractor ()
 
 LoopExtractor (Spacer *s)
 
void calcPropPercent (vector< double > &result, multiset< ranking_helper2 > &rmsh, multiset< ranking_helper > &rhs)
 
void calcVdwPercent (vector< double > &result, multiset< ranking_helper2 > &rmsh, multiset< ranking_helper2 > &rhs)
 
double givePercentProp (multiset< ranking_helper > s, int count)
 
double givePercentVdw (multiset< ranking_helper2 > s, int count)
 
void nextLoop (int &start, int &end)
 
void setSpacer (Spacer *s)
 
void writeFile (vector< double > prop_percent, vector< double > vdw_percent, multiset< ranking_helper2 > &rmsh, ofstream &statOut)
 

Detailed Description

Extracts all the loop regions (by numbers) from a given spacer.

Constructor & Destructor Documentation

basic constructor

constructor based in a spacer pointer to the Spacer

Member Function Documentation

void calcPropPercent ( vector< double > &  result,
multiset< ranking_helper2 > &  rmsh,
multiset< ranking_helper > &  rhs 
)

Calculates the rank (seen as percent) of the top RMS solutions in the rhs set (which contains the ranking of the solutions by propensities).The rank of each of the top solutions regarded to the propensities is put into the result vector.

Parameters
referenceto the resulting data(vector<double>), reference to the set of RMS(multiset<ranking_helper2> &), reference to the set of RMS(multiset<ranking_helper> &)
Returns
changes are made internally(void)
void calcVdwPercent ( vector< double > &  result,
multiset< ranking_helper2 > &  rmsh,
multiset< ranking_helper2 > &  rhs 
)

Calculates the rank (seen as percent) of the top RMS solutions in the rhs set (which contains the ranking of the solutions by rms).The rank of each of the top solutions regarded to the rms is put into the result vector.

Parameters
referenceto the resulting data(vector<double>), reference to the set of RMS(multiset<ranking_helper2> &), reference to the set of RMS(multiset<ranking_helper> &)
Returns
changes are made internally(void)
double givePercentProp ( multiset< ranking_helper s,
int  count 
)

This function calculates for the solution in the given vector with the entry index, what position it has in the given sorted set.

Parameters
referenceto the set of RMS(multiset<ranking_helper> &), index(int)
Returns
corresponding propensity percentage(double)
double givePercentVdw ( multiset< ranking_helper2 s,
int  count 
)

This function calculates for the solution in the given vector with the entry index, what position it has in the given sorted set.

Uses the function getPositionVdw()

Parameters
referenceto the set of RMS(multiset<ranking_helper2> &), index(int)
Returns
corresponding Van der Wals percentage (double)
void nextLoop ( int &  start,
int &  end 
)

This routine extracts the next loop out of the spacer and returns the indices of the loop in the two variables.The indices start and end contain (counting starts with 0!) the first and last of the loop: [start, end] is the loop!.If no loop is found, start and end are set to -1

Parameters
referenceto the start and to the end position(int&,int&)
Returns
changes are made internally(void)
void setSpacer ( Spacer s)

sets the spacer in the object

Parameters
pointerto the Spacer to set(Spacer*)
Returns
changes are made internally(void)
void writeFile ( vector< double >  prop_percent,
vector< double >  vdw_percent,
multiset< ranking_helper2 > &  rmsh,
ofstream &  statOut 
)

The rms, the ranking of the solution regarded to the propensity and the VDW-forces is written to the file specified as a parameter.

Parameters
vectorcontaining the propensity percentages and van der whals percentages(vector<double>, vector<double>), reference to the set of RMS(multiset<ranking_helper2> &), the reference to the output file(ofstream &)
Returns
changes are made internally(void)

The documentation for this class was generated from the following files: