RDKit
Open-source cheminformatics and machine learning.
OopBend.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 #include <RDGeneral/export.h>
13 #ifndef __RD_MMFFOopBend_H__
14 #define __RD_MMFFOopBend_H__
15 
16 #include <ForceField/Contrib.h>
17 #include <Geometry/point.h>
18 
19 namespace ForceFields {
20 namespace MMFF {
21 class MMFFOop;
22 
23 //! the out-of-plane term for MMFF
25  public:
26  OopBendContrib() : d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1), d_at4Idx(-1){};
27  //! Constructor
28  /*!
29  The Wilson angle is between the vector formed by atom2-atom4
30 and the angle formed by atom1-atom2-atom3
31 
32  \param owner pointer to the owning ForceField
33  \param idx1 index of atom1 in the ForceField's positions
34  \param idx2 index of atom2 in the ForceField's positions
35  \param idx3 index of atom3 in the ForceField's positions
36  \param idx4 index of atom4 in the ForceField's positions
37  */
38  OopBendContrib(ForceField *owner, unsigned int idx1, unsigned int idx2,
39  unsigned int idx3, unsigned int idx4,
40  const MMFFOop *mmffOopParams);
41  double getEnergy(double *pos) const;
42  void getGrad(double *pos, double *grad) const;
43  virtual OopBendContrib *copy() const { return new OopBendContrib(*this); };
44 
45  private:
46  int d_at1Idx, d_at2Idx, d_at3Idx, d_at4Idx;
47  double d_koop;
48 };
49 
50 namespace Utils {
51 //! calculates and returns the Wilson angle (in degrees)
53  const RDGeom::Point3D &jPoint,
54  const RDGeom::Point3D &kPoint,
55  const RDGeom::Point3D &lPoint);
56 //! returns the out-of-plane force constant koop
58  const MMFFOop *mmffOopParams);
59 //! calculates and returns the out-of-plane MMFF energy
60 RDKIT_FORCEFIELD_EXPORT double calcOopBendEnergy(const double chi,
61  const double koop);
62 } // namespace Utils
63 } // namespace MMFF
64 } // namespace ForceFields
65 #endif
ForceFields::MMFF::Utils::calcOopChi
RDKIT_FORCEFIELD_EXPORT double calcOopChi(const RDGeom::Point3D &iPoint, const RDGeom::Point3D &jPoint, const RDGeom::Point3D &kPoint, const RDGeom::Point3D &lPoint)
calculates and returns the Wilson angle (in degrees)
point.h
RDGeom::Point3D
Definition: point.h:46
ForceFields::MMFF::MMFFOop
class to store MMFF parameters for out-of-plane bending
Definition: MMFF/Params.h:126
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition: ForceField.h:79
ForceFields::MMFF::OopBendContrib::OopBendContrib
OopBendContrib()
Definition: OopBend.h:26
ForceFields::MMFF::Utils::calcOopBendEnergy
RDKIT_FORCEFIELD_EXPORT double calcOopBendEnergy(const double chi, const double koop)
calculates and returns the out-of-plane MMFF energy
ForceFields::MMFF::Utils::calcOopBendForceConstant
RDKIT_FORCEFIELD_EXPORT double calcOopBendForceConstant(const MMFFOop *mmffOopParams)
returns the out-of-plane force constant koop
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::MMFF::OopBendContrib::copy
virtual OopBendContrib * copy() const
return a copy
Definition: OopBend.h:43
ForceFields
Definition: TorsionAngleM6.h:24
Contrib.h
ForceFields::MMFF::OopBendContrib
the out-of-plane term for MMFF
Definition: OopBend.h:24
export.h