RDKit: BondStretch.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MMFF/BondStretch.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2013 Paolo Tosco
3 //
4 // Copyright (C) 2004-2006 Rational Discovery LLC
5 //
6 // @@ All Rights Reserved @@
7 // This file is part of the RDKit.
8 // The contents are covered by the terms of the BSD license
9 // which is included in the file license.txt, found at the root
10 // of the RDKit source tree.
11 //
12 #ifndef __RD_MMFFBONDSTRETCH_H__
13 #define __RD_MMFFBONDSTRETCH_H__
14 #include <ForceField/Contrib.h>
15
16 namespace ForceFields {
17 namespace MMFF {
18 class MMFFBond;
19 class MMFFBondStretchEmpiricalRule;
20
21 //! The bond-stretch term for MMFF
22 class BondStretchContrib : public ForceFieldContrib {
23 public:
24 BondStretchContrib() : d_at1Idx(-1), d_at2Idx(-1){};
25 //! Constructor
26 /*!
27 \param owner pointer to the owning ForceField
28 \param idx1 index of end1 in the ForceField's positions
29 \param idx2 index of end2 in the ForceField's positions
30 \param bondType MMFF94 type of the bond (as an unsigned int)
31 \param end1Params pointer to the parameters for end1
32 \param end2Params pointer to the parameters for end2
33
34 */
35 BondStretchContrib(ForceField *owner, const unsigned int idx1,
36 const unsigned int idx2, const MMFFBond *mmffBondParams);
37
38 double getEnergy(double *pos) const;
39
40 void getGrad(double *pos, double *grad) const;
41
42 virtual BondStretchContrib *copy() const {
43 return new BondStretchContrib(*this);
44 };
45
46 private:
47 int d_at1Idx, d_at2Idx; //!< indices of end points
48 double d_r0; //!< rest length of the bond
49 double d_kb; //!< force constant of the bond
50 };
51
52 namespace Utils {
53 //! returns the MMFF rest length for a bond
54 double calcBondRestLength(const MMFFBond *mmffBondParams);
55 //! returns the MMFF force constant for a bond
56 double calcBondForceConstant(const MMFFBond *mmffBondParams);
57 //! calculates and returns the bond stretching MMFF energy
58 double calcBondStretchEnergy(const double r0, const double kb,
59 const double distance);
60 }
61 }
62 }
63 #endif
ForceFields::MMFF::BondStretchContrib::getEnergy
double getEnergy(double *pos) const
returns our contribution to the energy of a position
ForceFields::ForceFieldContrib
abstract base class for contributions to ForceFields
Definition: Contrib.h:17
ForceFields::MMFF::Utils::calcBondRestLength
double calcBondRestLength(const MMFFBond *mmffBondParams)
returns the MMFF rest length for a bond
Contrib.h
ForceFields::MMFF::Utils::calcBondForceConstant
double calcBondForceConstant(const MMFFBond *mmffBondParams)
returns the MMFF force constant for a bond
ForceFields::MMFF::Utils::calcBondStretchEnergy
double calcBondStretchEnergy(const double r0, const double kb, const double distance)
calculates and returns the bond stretching MMFF energy
ForceFields
Definition: TorsionAngleM6.h:23
ForceFields::MMFF::BondStretchContrib::BondStretchContrib
BondStretchContrib()
Definition: MMFF/BondStretch.h:24
ForceFields::MMFF::MMFFBond
class to store MMFF parameters for bond stretching
Definition: MMFF/Params.h:86
ForceFields::MMFF::BondStretchContrib::copy
virtual BondStretchContrib * copy() const
return a copy
Definition: MMFF/BondStretch.h:42
ForceFields::MMFF::BondStretchContrib::getGrad
void getGrad(double *pos, double *grad) const
calculates our contribution to the gradients of a position
ForceFields::MMFF::BondStretchContrib
The bond-stretch term for MMFF.
Definition: MMFF/BondStretch.h:22
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition: ForceField.h:56