BALL  1.4.79
PLP.h
Go to the documentation of this file.
1 /* PLP.h
2 *
3 * Copyright (C) 2011 Marcel Schumann
4 *
5 * This program free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 // ----------------------------------------------------
20 // $Maintainer: Marcel Schumann $
21 // $Authors: Jan Fuhrmann, Marcel Schumann $
22 // ----------------------------------------------------
23 
24 #ifndef BALL_SCORING_COMPONENTS_PLP_H
25 #define BALL_SCORING_COMPONENTS_PLP_H
26 
31 
32 
33 namespace BALL
34 {
37  {
38  public:
40  {
42 
43  enum Type
44  {
45  steric = 0,
46  hydrogen_bond = 1,
47  // an atom pair of which both partners are taken from the same ligand molecule in order to evaluate the ligand nonbonded energy
48  conformation = 2
49  };
50 
51  /*
52  NonBondedPairData();
53 
54  double eij;
55  double rij;
56  double rij_7;
57  double vdw_energy; // for debugging
58  // for electrostatics:
59  bool is_1_4;
60  double qi;
61  double qj;
62  double es_energy; // for debugging
63  */
64  };
65 
67  #define MMFF94_ES_ENABLED "enable ES"
68 
70  #define MMFF94_VDW_ENABLED "enable VDW"
71 
72  BALL_CREATE(PLP)
73 
74 
75  PLP() throw();
76 
78  PLP(ForceField& force_field) throw();
79 
81  PLP(const PLP& MMFF94_non_bonded) throw();
82 
84  virtual ~PLP() throw();
85 
87  const PLP& operator = (const PLP& anb) throw();
88 
91  void setRotatableBonds(std::vector<Bond*>& bonds);
92 
99  static Size getAtomType(const Atom* atom);
100 
102  void update(const std::vector<std::pair<Atom*, Atom*> >& atom_vector);
103 
105  virtual void clear() throw();
106 
108  bool operator == (const PLP& anb) throw();
109 
111  bool setup(Options& options);
112 
114  virtual double updateEnergy() throw();
115 
117  virtual void updateForces() throw();
118 
123  virtual void update()
124  throw(Exception::TooManyErrors);
125 
126  double getVDWEnergy() const;
127 
128  double getESEnergy() const;
129 
130  protected:
131  //_ Value of the electrostatic energy
132  double es_energy_;
133 
134  //_ Value of the vdw energy
135  double vdw_energy_;
136 
137  static bool isNSp3(const Atom* at);
138  static bool isSp3(const Atom* at);
139 
140  private:
141  struct GhTorsion
142  {
143  Atom* at1;
144  Atom* at2;
145  Atom* at3;
146  Atom* at4;
147  Size type;
148  };
149 
150  void e1(double& d, double& e, double& delta);
151  void e2(double& d, double& e, double& delta);
152 
153  std::vector<GhTorsion> ghtorsions_;
154 
155  ForceField::PairVector atom_pair_vector_;
156 
157  std::vector<NonBondedPairData> non_bonded_data_;
158 
159  double cut_off_;
160  double vdw_cut_on_, vdw_cut_off_;
161  double es_cut_on_, es_cut_off_;
162  MMFF94VDWParameters vdw_parameters_;
163 
164  // dielectric constant
165  double dc_;
166  // dielectric model exponent
167  double n_;
168  bool es_enabled_;
169  bool vdw_enabled_;
170  bool enable_es_switch_;
171  bool enable_vdw_switch_;
172  double es_d_on2_, es_d_off2_,
173  es_d_on_, es_d_off_,
174  es_ac_, es_bc_,
175  es_cc_, es_dc_, es_denom_, es_con_, es_cover3_, es_dover5_,
176  es_eadd_, es_eaddr_, es_const_, es_constr_;
177 
178  std::vector<bool> dismiss_vector_;
179 
180  std::vector<double> rotgrad_;
181  };
182 } //
183 
184 #endif // BALL_SCORING_COMPONENTS_PLP_H
#define BALL_CREATE(name)
Definition: create.h:62
Definition: PLP.h:36
STL namespace.
std::vector< std::pair< Atom *, Atom * > > PairVector
Definition: forceField.h:99
BALL_SIZE_TYPE Size
-*- Mode: C++; tab-width: 2; -*-
Definition: constants.h:12
BALL_EXPORT BondList bonds(const AtomContainer &fragment, bool selected_only=false)
char Atom[5]
Definition: PDBdefs.h:257
#define BALL_EXPORT
Definition: COMMON/global.h:50