Victor
 All Data Structures Functions Variables Friends Pages
globalStatistic.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 _globalStatistic_h_
19 #define _globalStatistic_h_
20 
21 // Includes:
22 #include "LoopExtractor.h"
23 #include <set>
24 #include "ranking_helper2.h"
25 
26 // Global constants, typedefs, etc. (to avoid):
27 namespace Victor { namespace Lobo {
28 
35  public:
36 
37  // CONSTRUCTORS/DESTRUCTOR:
40 
41  // PREDICATES:
42  void outputArray(ofstream &outF);
43 
44  static const int LOOP_MIN = 3; // lower limit of examined Loops
45  static const int LOOP_MAX = 13; // upper limit of examined loops
46 
47  // MODIFIERS:
48  void updateVPArray(vector<double> &vdw_percent,
49  vector<double> &prop_percent, int loopNr);
50  void updateRMSArray(int loopNr, multiset<ranking_helper2> rmsh);
51  void updateBadValuesArray(int loopNr,
52  multiset<ranking_helper> prop_ranking,
53  multiset<ranking_helper2> vdw_ranking,
54  multiset<ranking_helper2> rmsh);
55  void updateBadConsistencyArray(int loopNr, vector<int> consistency,
56  multiset<ranking_helper2> rmsh);
57 
58  void updateEndRMSArray(vector<double> &endRMS_percent, int loopNr);
59  void updateCompactnessArray(vector<double> &compactness_percent,
60  int loopNr);
61  void updateEnergyArray(vector<double> &energy_percent, int loopNr);
62 
63  void VdwCutoffGenerator(multiset<ranking_helper2> &rmsh,
64  multiset<ranking_helper2> &rhs, int count,
65  int loopNr);
66  void PropCutoffGenerator(multiset<ranking_helper2> &rmsh,
67  multiset<ranking_helper> &rhs, int count,
68  int loopNr);
69  void CompactnessCutoffGenerator(multiset<ranking_helper2> &rmsh,
70  multiset<ranking_helper2> &rhs, int count,
71  int loopNr);
72  void EndRMSCutoffGenerator(multiset<ranking_helper2> &rmsh,
73  multiset<ranking_helper2> &rhs, int count,
74  int loopNr);
75  void EnergyCutoffGenerator(multiset<ranking_helper2> &rmsh,
76  multiset<ranking_helper2> &rhs, int count,
77  int loopNr);
78  void FilterCutoffGenerator(vector<double> values, int count, int loopNr);
79  void updateRankedRmsArray(int loopNr, vector<double> rms);
80  void updateSidechainArray(vector<int> collisionCount,
81  multiset<ranking_helper2> rmsh, int loopNr);
82 
83 
84  // OPERATORS:
85 
86  protected:
87 
88  private:
89 
90  // HELPERS:
91  int calcRmsPercent(int index, multiset<ranking_helper2> rmsh);
92  double calcDeviation(vector<double> *values);
93  double calcMedian(vector<double> *values);
94  double giveRms(int index, multiset<ranking_helper2> &rmsh);
95 
96  // ATTRIBUTES:
97 
98  static const int BAD_PROPENSITY; // value from which we have
99  // a value to put into the bad prop statistic
100  static const int BAD_VDW;
101  // contains the value from which we have a value to put into the bad
102  // VDW statistic
103  static const int BAD_CONSISTENCY;
104  // contains the start value from which we put
105  // a consistency value into the badConsistency array
106 
107  vector<double> * filterCutoff[LOOP_MAX - LOOP_MIN + 1][20];
108  // used to calculate the filter-combination cutoff
109 
110  double statArrayRMS[LOOP_MAX - LOOP_MIN + 1][6];
111  // contains the statistic for the RMS @ 6!!
112  int statArrayRMSCount[LOOP_MAX - LOOP_MIN + 1][6];
113  // counts the entries in statArrayRMS @ 6!!
114 
115  double statArrayRankedRms[LOOP_MAX - LOOP_MIN + 1][6];
116  // contains the rms values of the surviving solutions
117  // ranked by the filter results
118  int statArrayRankedRmsCount[LOOP_MAX - LOOP_MIN + 1][6];
119  // contains the number of entries in statArrayRankedRms
120 
121  long solutionSum; // contains the sum of all surviving solutions
122  int loopCount; // contains the number of loops we have examined
123 
124  vector<double> *deviationRms[LOOP_MAX - LOOP_MIN + 1][6];
125  // used to calculate the standard deviation for the RMS
126  vector<double> *deviationRankedRms[LOOP_MAX - LOOP_MIN + 1][6];
127  // used to calculate the standard deviation for the ranked RMS
128 
129 
130  // counts the entries in statArrayEndRMS @ 6!!
131 
132  };
133 
134 
135 }}
136 #endif
void outputArray(ofstream &outF)
Definition: globalStatistic.cc:82
void FilterCutoffGenerator(vector< double > values, int count, int loopNr)
Definition: globalStatistic.cc:243
globalStatistic()
Definition: globalStatistic.cc:36
Methods to manages the global statistic data.
Definition: globalStatistic.h:34
void updateRankedRmsArray(int loopNr, vector< double > rms)
Definition: globalStatistic.cc:203
~globalStatistic()
Definition: globalStatistic.cc:64
void updateRMSArray(int loopNr, multiset< ranking_helper2 > rmsh)
Definition: globalStatistic.cc:167