RDKit
Open-source cheminformatics and machine learning.
UFF/Nonbonded.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #include <RDGeneral/export.h>
11 #ifndef __RD_NONBONDED_H__
12 #define __RD_NONBONDED_H__
13 #include <ForceField/Contrib.h>
14 
15 namespace ForceFields {
16 namespace UFF {
17 class AtomicParams;
18 
19 //! the van der Waals term for the Universal Force Field
20 /*!
21  <b>The Distance Threshold</b>
22  For the sake of efficiency, each vdwContrib maintains a threshold
23  distance. When the distance between the two atoms exceeds this
24  threshold, the vdwContrib makes no contribution to either the
25  energy or the gradient.
26 
27  The threshold is set to a multiple of the vdW distance's preferred
28  length. This multiplier can be supplied to the constructor.
29 
30  */
32  public:
33  vdWContrib() : d_at1Idx(-1), d_at2Idx(-1){};
34 
35  //! Constructor
36  /*!
37  \param owner pointer to the owning ForceField
38  \param idx1 index of end1 in the ForceField's positions
39  \param idx2 index of end2 in the ForceField's positions
40  \param at1Params pointer to the parameters for end1
41  \param at2Params pointer to the parameters for end2
42  \param threshMultiplier (optional) multiplier for the threshold
43  calculation. See class documentation for details.
44 
45  */
46  vdWContrib(ForceField *owner, unsigned int idx1, unsigned int idx2,
47  const AtomicParams *at1Params, const AtomicParams *at2Params,
48  double threshMultiplier = 10.0);
49  double getEnergy(double *pos) const;
50  void getGrad(double *pos, double *grad) const;
51  virtual vdWContrib *copy() const { return new vdWContrib(*this); };
52 
53  private:
54  int d_at1Idx, d_at2Idx;
55  double d_xij; //!< the preferred length of the contact
56  double d_wellDepth; //!< the vdW well depth (strength of the interaction)
57  double d_thresh; //!< the distance threshold
58 };
59 namespace Utils {
60 //! calculates and returns the UFF minimum position for a vdW contact
61 /*!
62 
63  \param at1Params pointer to the parameters for end1
64  \param at2Params pointer to the parameters for end2
65 
66  \return the position of the minimum
67 
68 */
70  const AtomicParams *at1Params, const AtomicParams *at2Params);
71 
72 //! calculates and returns the UFF well depth for a vdW contact
73 /*!
74 
75  \param at1Params pointer to the parameters for end1
76  \param at2Params pointer to the parameters for end2
77 
78  \return the depth of the well
79 
80 */
82  const AtomicParams *at1Params, const AtomicParams *at2Params);
83 } // namespace Utils
84 } // namespace UFF
85 } // namespace ForceFields
86 #endif
ForceFields::UFF::vdWContrib::vdWContrib
vdWContrib()
Definition: UFF/Nonbonded.h:33
ForceFields::UFF::Utils::calcNonbondedMinimum
RDKIT_FORCEFIELD_EXPORT double calcNonbondedMinimum(const AtomicParams *at1Params, const AtomicParams *at2Params)
calculates and returns the UFF minimum position for a vdW contact
ForceFields::UFF::vdWContrib::copy
virtual vdWContrib * copy() const
return a copy
Definition: UFF/Nonbonded.h:51
ForceFields::UFF::vdWContrib
the van der Waals term for the Universal Force Field
Definition: UFF/Nonbonded.h:31
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition: ForceField.h:79
ForceFields::ForceFieldContrib
abstract base class for contributions to ForceFields
Definition: Contrib.h:18
RDKIT_FORCEFIELD_EXPORT
#define RDKIT_FORCEFIELD_EXPORT
Definition: export.h:255
ForceFields
Definition: TorsionAngleM6.h:24
ForceFields::UFF::Utils::calcNonbondedDepth
RDKIT_FORCEFIELD_EXPORT double calcNonbondedDepth(const AtomicParams *at1Params, const AtomicParams *at2Params)
calculates and returns the UFF well depth for a vdW contact
Contrib.h
ForceFields::UFF::AtomicParams
class to store atomic parameters for the Universal Force Field
Definition: UFF/Params.h:73
export.h