Victor
 All Data Structures Functions Variables Friends Pages
Omega.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 _OMEGA_H_
19 #define _OMEGA_H_
20 
21 
22 // Includes:
23 #include <TorsionPotential.h>
24 #include <vector>
25 #include <Spacer.h>
26 #include <AminoAcidCode.h>
27 
28 // Global constants, typedefs, etc. (to avoid):
29 
30 using namespace Victor::Biopool;
31 using namespace Victor::Energy;
32 using namespace Victor;
33 namespace Victor { namespace Energy {
34 
39  class Omega : public TorsionPotential {
40  public:
41 
42  // CONSTRUCTORS/DESTRUCTOR:
43  Omega(string knownledge);
44 
45  virtual ~Omega() {
46  pResetData();
47  }
48 
49  // PREDICATES:
50  virtual long double calculateEnergy(Spacer& sp);
51  virtual long double calculateEnergy(AminoAcid& aa);
52 
53  virtual long double calculateEnergy(AminoAcid& aa, Spacer& sp) {
54  return calculateEnergy(aa);
55  }
56  virtual long double calculateEnergy(Spacer& sp, unsigned int index1, unsigned int index2);
57 
58  virtual long double calculateEnergy(AminoAcid& diheds, AminoAcidCode code) {
59  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
60  }
61  virtual double pReturnMaxPropensities(int amino);
62 
63  virtual double pReturnMaxPropensitiesPreAngle(int amino, int prephi, int prepsi) {
64  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
65  }
66 
67  virtual int sGetPropBin2(double p) {
68  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
69  }
70 
71  // MODIFIERS:
72  virtual void setRange_Omega(int n);
73 
74  // OPERATORS:
75 
76  protected:
77 
78  // HELPERS:
79  virtual void pConstructData();
80  virtual void pResetData();
81  virtual double pGetMaxPropensities(int amino);
82  //not implemented in this class. No pre-angle considered.
83 
84  virtual double pGetMaxPropensities(int amino, int prephi, int prepsi) {
85  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
86  }
87  void sAddProp(int code, int x);
88  int sGetPropOmegaBin(double p);
89  virtual void pConstructMaxPropensities();
90 
91  private:
92 
93  // ATTRIBUTES:
94  string TOR_PARAM_FILE; // File with prop torsion angles
95  int RANGE_OMEGA;
96  int amino_count[AminoAcid_CODE_SIZE];
97  // total number of entries for all amino acids
98  vector<vector<int>* > propensities;
99  vector<int> all_propensities;
100  double total;
101  vector<double> amino_max_propensities; //vector with max amino propensities
102  // according to knowledge.
103  };
104 
105  // ---------------------------------------------------------------------------
106  // Omega
107  // -----------------x-------------------x-------------------x-----------------
108 }} // namespace
109 #endif //_OMEGA_H_
110 
111 
class manages the angle qualities and the energy
Definition: Omega.h:39
It mplements a simple amino acid.
Definition: AminoAcid.h:43
This class implements a simple torsion potential based on the statistical preference of aminoacid typ...
Definition: TorsionPotential.h:40
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42