#include <openbabel/forcefield.h>
Public Member Functions | |
OBFFConstraints () | |
~OBFFConstraints () | |
void | Clear () |
double | GetConstraintEnergy () |
vector3 | GetGradient (int a) |
OBFFConstraints & | operator= (const OBFFConstraints &ai) |
void | Setup (OBMol &mol) |
Methods to set constraints | |
void | SetFactor (double factor) |
void | AddIgnore (int a) |
void | AddAtomConstraint (int a) |
void | AddAtomXConstraint (int a) |
void | AddAtomYConstraint (int a) |
void | AddAtomZConstraint (int a) |
void | AddDistanceConstraint (int a, int b, double length) |
void | AddAngleConstraint (int a, int b, int c, double angle) |
void | AddTorsionConstraint (int a, int b, int c, int d, double torsion) |
void | DeleteConstraint (int index) |
Methods to get information about set constraints | |
double | GetFactor () |
int | Size () const |
int | GetConstraintType (int index) const |
double | GetConstraintValue (int index) const |
int | GetConstraintAtomA (int index) const |
int | GetConstraintAtomB (int index) const |
int | GetConstraintAtomC (int index) const |
int | GetConstraintAtomD (int index) const |
bool | IsIgnored (int a) |
bool | IsFixed (int a) |
bool | IsXFixed (int a) |
bool | IsYFixed (int a) |
bool | IsZFixed (int a) |
OBBitVec | GetIgnoredBitVec () |
OBFFConstraints | ( | ) |
Constructor.
~OBFFConstraints | ( | ) | [inline] |
Destructor.
void Clear | ( | void | ) |
Clear all constraints.
double GetConstraintEnergy | ( | ) |
vector3 GetGradient | ( | int | a | ) |
Get the constraint gradient for atom with index a.
Referenced by OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::MolecularDynamicsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().
OBFFConstraints& operator= | ( | const OBFFConstraints & | ai | ) | [inline] |
Get the constrain gradient for the atom.
void Setup | ( | OBMol & | mol | ) |
Translate indices to OBAtom* objects, this function is called from OBForceField::Setup, this function doesn't have to be called from anywhere else.
Referenced by OBForceField::SetConstraints(), and OBForceField::Setup().
void SetFactor | ( | double | factor | ) |
Set Constraint factor.
void AddIgnore | ( | int | a | ) |
Ignore the atom while setting up calculations.
void AddAtomConstraint | ( | int | a | ) |
Fix the position of an atom.
void AddAtomXConstraint | ( | int | a | ) |
Fix the x coordinate of the atom position.
void AddAtomYConstraint | ( | int | a | ) |
Fix the y coordinate of the atom position.
void AddAtomZConstraint | ( | int | a | ) |
Fix the z coordinate of the atom position.
void AddDistanceConstraint | ( | int | a, | |
int | b, | |||
double | length | |||
) |
Constrain the bond length a-b.
void AddAngleConstraint | ( | int | a, | |
int | b, | |||
int | c, | |||
double | angle | |||
) |
Constrain the angle a-b-c.
void AddTorsionConstraint | ( | int | a, | |
int | b, | |||
int | c, | |||
int | d, | |||
double | torsion | |||
) |
Constrain the torsion angle a-b-c-d.
void DeleteConstraint | ( | int | index | ) |
Delete a constraint
double GetFactor | ( | ) |
Get Constraint factor.
int Size | ( | ) | const |
int GetConstraintType | ( | int | index | ) | const |
The following constraint types are known: OBFF_CONST_IGNORE (ignore the atom while setting up calculations, forcefield implementations need to check this value in their setup function), OBFF_CONST_ATOM (fix atom position), OBFF_CONST_ATOM_X (fix x coordinate), OBFF_CONST_ATOM_Y (fix y coordinate), OBFF_CONST_ATOM_Z (fix z coordinate), OBFF_CONST_BOND (constrain bond length), OBFF_CONST_ANGLE (constrain angle), OBFF_CONST_TORSION (constrain torsion angle)
double GetConstraintValue | ( | int | index | ) | const |
int GetConstraintAtomA | ( | int | index | ) | const |
int GetConstraintAtomB | ( | int | index | ) | const |
int GetConstraintAtomC | ( | int | index | ) | const |
int GetConstraintAtomD | ( | int | index | ) | const |
bool IsIgnored | ( | int | a | ) |
bool IsFixed | ( | int | a | ) |
Referenced by OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), OBForceField::MolecularDynamicsTakeNSteps(), and OBForceField::SteepestDescentTakeNSteps().
bool IsXFixed | ( | int | a | ) |
Referenced by OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and OBForceField::SteepestDescentTakeNSteps().
bool IsYFixed | ( | int | a | ) |
Referenced by OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and OBForceField::SteepestDescentTakeNSteps().
bool IsZFixed | ( | int | a | ) |
Referenced by OBForceField::ConjugateGradientsInitialize(), OBForceField::ConjugateGradientsTakeNSteps(), OBForceField::GenerateVelocities(), and OBForceField::SteepestDescentTakeNSteps().
OBBitVec GetIgnoredBitVec | ( | ) | [inline] |
Referenced by OBForceField::SetConstraints(), and OBForceField::Setup().