Victor
 All Data Structures Functions Variables Friends Pages
PhiPsiOmegaChi1Chi2PreAngle.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 _PHIPSIOMEGACHI1CHI2PREANGLE_H_
19 #define _PHIPSIOMEGACHI1CHI2PREANGLE_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 
41  public:
42 
43  // CONSTRUCTORS/DESTRUCTOR:
44  PhiPsiOmegaChi1Chi2PreAngle(int SET_ARC1 = 10,
45  int SET_ARC2 = 40,
46  string knownledge = "data/tor.par");
47 
48  virtual ~PhiPsiOmegaChi1Chi2PreAngle() {
49  pResetData();
50  }
51 
52  // PREDICATES:
53  virtual long double calculateEnergy(Spacer& sp);
54  virtual long double calculateEnergy(Spacer& sp, unsigned int index1,
55  unsigned int index2);
56  virtual long double calculateEnergy(AminoAcid& aa);
57 
58  virtual long double calculateEnergy(AminoAcid& aa, Spacer& sp) {
59  return calculateEnergy(aa);
60  }
61 
62  virtual long double calculateEnergy(AminoAcid& diheds, AminoAcidCode code) {
63  ERROR("ERROR. NOT IMPLEMENTED FOR THIS CLASS.", exception)
64  }
65  virtual double pReturnMaxPropensities(int amino);
66  virtual double pReturnMaxPropensitiesPreAngle(int amino, int prephi, int prepsi);
67  virtual int sGetPropBin2(double p);
68 
69  // MODIFIERS:
70  virtual void setArcStep(int n);
71  virtual int setRange_Omega(int n);
72 
73  // OPERATORS:
74  protected:
75 
76  // HELPERS:
77  virtual void pConstructData();
78  virtual void pResetData();
79  virtual double pGetMaxPropensities(int amino);
80  virtual double pGetMaxPropensities(int amino, int prephi, int prepsi);
81  virtual void sAddProp(int code, int x, int y, int z, int m, int n, int o, int l);
82  virtual int sGetPropChiBin(double p);
83  virtual int sGetPropBin(double p);
84  virtual int sGetPropOmegaBin(double p);
85  virtual void pConstructMaxPropensities();
86 
87  private:
88 
89  // ATTRIBUTES:
90  string TOR_PARAM_FILE; // File with prop torsion angles
91  int CHI_RANGE;
92  int RANGE_OMEGA;
93  int ARC_STEP; // important: must be a divisior of 360 !!!!
94  int ARC_STEP2; // the Arcstep for the pre-angles
95  int SIZE_OF_TABLE; // "granularity" props
96  int SIZE_OF_TABLE2; //"granularity" props for pre-angles
97  int amino_count[AminoAcid_CODE_SIZE]; // total number of entries for all amino acids
98  vector<vector<vector<vector<vector<vector<vector<vector<int>* >* >* >* >* >* >* > propensities;
99  vector<vector<vector<vector<vector<vector<vector<int>* >* >* >* >* >* > all_propensities;
100 
101  double total;
102  vector<double> amino_max_propensities; //vector with max amino propensities
103  // according to knowledge.
104  vector<vector<vector<double>* >* > amino_max_propensities_pre_angle;
105 
106  };
107 
108  // ---------------------------------------------------------------------------
109  // PhiPsiOmegaChi1Chi2PreAngle
110  // -----------------x-------------------x-------------------x-----------------
111 }} // namespace
112 #endif //_PHIPSIOMEGACHI1CHI2PREANGLE_H_
113 
114 
class manages the angle qualities and the energy
Definition: PhiPsiOmegaChi1Chi2PreAngle.h:40
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