Victor
 All Data Structures Functions Variables Friends Pages
PhiPsiOmega.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 _PHIPSIOMEGA_H_
19 #define _PHIPSIOMEGA_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 PhiPsiOmega : public TorsionPotential {
40  public:
41 
42  // CONSTRUCTORS/DESTRUCTOR:
43  PhiPsiOmega(int SET_ARC1 = 10,
44  string knownledge = "data/tor.par"); //default knownledge TOP500
45 
46  virtual ~PhiPsiOmega() {
47  pResetData();
48  }
49 
50  // PREDICATES:
51  virtual long double calculateEnergy(Spacer& sp);
52  virtual long double calculateEnergy(Spacer& sp, unsigned int index1,
53  unsigned int index2);
54  virtual long double calculateEnergy(AminoAcid& aa);
55  virtual long double calculateEnergy(AminoAcid& diheds, AminoAcidCode code);
56 
57  virtual long double calculateEnergy(AminoAcid& aa, Spacer& sp) {
58  return calculateEnergy(aa);
59  }
60  virtual double pReturnMaxPropensities(int amino);
61  virtual double pReturnMinPropensities(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  virtual vector< vector<ANGLES> >* getOrderedEnergyTable();
71 
72  string getLabel() {
73  return "phi-psi-omega";
74  }
75 
76  // MODIFIERS:
77  virtual int setRange_Omega(int n);
78  virtual void setArcStep(int n);
79 
80  // OPERATORS:
81 
82  protected:
83 
84  // HELPERS:
85  virtual void pConstructData();
86  virtual void pResetData();
87  virtual double pGetMaxPropensities(int amino);
88  virtual double pGetMinPropensities(int amino);
89  //not implemented in this class. No pre-angle considered.
90 
91  virtual double pGetMaxPropensities(int amino, int prephi, int prepsi) {
92  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
93  }
94  void sAddProp(int code, int x, int y, int z);
95  int sGetPropOmegaBin(double p);
96  int sGetPropBin(double p);
97  virtual void pConstructMaxPropensities();
98  virtual void pConstructMinPropensities();
99  virtual double getOmegaAngle(int prop, long RANGE_OMEGA);
100  virtual double getPhiPsiAngle(int prop, long SIZE_TABLE, int ARC_STEP);
101 
102 
103  //private:
104  public:
105 
106  // ATTRIBUTES:
107  int ARC_STEP; // important: must be a divisior of 360 !!!!
108  string TOR_PARAM_FILE; // File with prop torsion angles
109  int SIZE_OF_TABLE; // "granularity" props
110  int RANGE_OMEGA;
111  int amino_count[AminoAcid_CODE_SIZE]; //number of amino.
112  vector<vector<vector<vector<int>* >* >* > propensities; // the propensities table.
113  vector<vector<vector<int>* >* > all_propensities; // the sum of propropensities table.
114  double total; //total numer of ammino considered.
115  vector<double> amino_max_propensities; // vectors with max and min amino propensities
116  vector<double> amino_min_propensities; // according to knowledge.
117  };
118 
119  // ---------------------------------------------------------------------------
120  // TorsionPotential
121  // -----------------x-------------------x-------------------x-----------------
122 }} // namespace
123 #endif// _FULLTORSIONPOTENTIAL_H_
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
class manages the angle qualities and the energy
Definition: PhiPsiOmega.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