Victor
 All Data Structures Functions Variables Friends Pages
EffectiveSolvationPotential.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 #ifndef _EFFECTIVESOLVATIONPOTENTIAL_H_
18 #define _EFFECTIVESOLVATIONPOTENTIAL_H_
19 
20 
21 // Includes:
22 #include <vector>
23 #include <Spacer.h>
24 #include <Potential.h>
25 
26 // Global constants, typedefs, etc. (to avoid):
27 
28 using namespace Victor::Biopool;
29 using namespace Victor::Energy;
30 using namespace Victor;
31 namespace Victor { namespace Energy {
32 
33  const double SOLVATION_CUTOFF_DISTANCE_EFFECTIVE = 10.0;
34 
43  public:
44 
45  // CONSTRUCTORS/DESTRUCTOR:
47 
48  virtual ~EffectiveSolvationPotential() {
49  PRINT_NAME;
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, Spacer& sp);
57 
58  // MODIFIERS:
59 
60  // OPERATORS:
61 
62  protected:
63 
64  // HELPERS:
65  bool isPolar(AminoAcid& aa);
66  double pCalcFracBuried(unsigned int index, Spacer& sp);
67 
68  private:
69 
70  // ATTRIBUTES:
71 
72  vector<double> solvCoeff;
73 
74  };
75 
76  // ---------------------------------------------------------------------------
77  // EffectiveSolvationPotential
78  // -----------------x-------------------x-------------------x-----------------
79 
86  inline bool EffectiveSolvationPotential::isPolar(AminoAcid& aa) {
87  AminoAcidCode c = static_cast<AminoAcidCode> (aa.getCode());
88  if ((c == ARG) ||
89  (c == ASN) ||
90  (c == ASP) ||
91  (c == GLN) ||
92  (c == GLU) ||
93  (c == LYS) ||
94  (c == PRO))
95  return true;
96 
97  return false;
98  }
99 
100 
101 }} // namespace
102 #endif //_EFFECTIVESOLVATIONPOTENTIAL_H_
Implements a knowledge-based solvation with polar/hydrophobic information potential. A coefficient is used to normalize the propensity.
Definition: EffectiveSolvationPotential.h:42
Abstract class for the energy potential.
Definition: Potential.h:37
It mplements a simple amino acid.
Definition: AminoAcid.h:43
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42