RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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
19namespace ForceFields {
20namespace MMFF {
21class MMFFOop;
22
23//! the out-of-plane term for MMFF
25 public:
27 //! Constructor
28 /*!
29 The Wilson angle is between the vector formed by atom2-atom4
30and 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 override;
42 void getGrad(double *pos, double *grad) const override;
43 OopBendContrib *copy() const override { return new OopBendContrib(*this); }
44
45 private:
46 int d_at1Idx{-1}, d_at2Idx{-1}, d_at3Idx{-1}, d_at4Idx{-1};
47 double d_koop;
48};
49
50namespace Utils {
51//! calculates and returns the Wilson angle (in degrees)
52RDKIT_FORCEFIELD_EXPORT double calcOopChi(const RDGeom::Point3D &iPoint,
53 const RDGeom::Point3D &jPoint,
54 const RDGeom::Point3D &kPoint,
55 const RDGeom::Point3D &lPoint);
56//! returns the out-of-plane force constant koop
57RDKIT_FORCEFIELD_EXPORT double calcOopBendForceConstant(
58 const MMFFOop *mmffOopParams);
59//! calculates and returns the out-of-plane MMFF energy
60RDKIT_FORCEFIELD_EXPORT double calcOopBendEnergy(const double chi,
61 const double koop);
62} // namespace Utils
63} // namespace MMFF
64} // namespace ForceFields
65#endif
abstract base class for contributions to ForceFields
Definition Contrib.h:18
A class to store forcefields and handle minimization.
Definition ForceField.h:79
class to store MMFF parameters for out-of-plane bending
the out-of-plane term for MMFF
Definition OopBend.h:24
OopBendContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, const MMFFOop *mmffOopParams)
Constructor.
void getGrad(double *pos, double *grad) const override
calculates our contribution to the gradients of a position
double getEnergy(double *pos) const override
returns our contribution to the energy of a position
OopBendContrib * copy() const override
return a copy
Definition OopBend.h:43
#define RDKIT_FORCEFIELD_EXPORT
Definition export.h:185