Victor
 All Data Structures Functions Variables Friends Pages
LoopExtractor.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 
18 #ifndef _LOOPEXTRACTOR_H_
19 #define _LOOPEXTRACTOR_H_
20 
21 // Includes:
22 #include<Spacer.h>
23 #include<set>
24 #include<ranking_helper.h>
25 #include<ranking_helper2.h>
26 
27 // Global constants, typedefs, etc. (to avoid):
28 using namespace Victor::Biopool;
29 namespace Victor { namespace Lobo {
30 
34  class LoopExtractor {
35  public:
36 
37  // CONSTRUCTORS/DESTRUCTOR:
38  LoopExtractor();
40 
41  // PREDICATES:
42  void nextLoop(int& start, int& end);
43  double givePercentProp(multiset<ranking_helper> s, int count);
44  double givePercentVdw(multiset<ranking_helper2> s, int count);
45  void writeFile(vector<double> prop_percent, vector<double> vdw_percent,
46  multiset<ranking_helper2> &rmsh, ofstream &statOut);
47 
48  // MODIFIERS:
49  void setSpacer(Spacer* s);
50  void calcPropPercent(vector<double> &result, multiset<ranking_helper2> &rmsh,
51  multiset<ranking_helper> &rhs);
52  void calcVdwPercent(vector<double> &result, multiset<ranking_helper2> &rmsh,
53  multiset<ranking_helper2> &rhs);
54  static const int BEST_COUNT; // determines the number of solutions which
55  // are evaluated by propensities and collisions
56 
57  // OPERATORS:
58 
59  protected:
60 
61  private:
62 
63  // HELPERS:
64  int getPositionProp(multiset<ranking_helper> s, int index);
65  int getPositionVdw(multiset<ranking_helper2> s, int index);
66 
67  // ATTRIBUTES:
68  Spacer* sp; // contains the spacer which is examined
69  int position; // current working position (from where we start
70  // searching for the next loop)
71  };
72 
73 }} // namespace
74 #endif
Extracts all the loop regions (by numbers) from a given spacer.
Definition: LoopExtractor.h:34
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42