OETorAdaptor¶
Attention
This API is currently available in C++ and Python.
class OETorAdaptor : public OEMolAdaptor
The OETorAdaptor class provides the ability to optimize torsion angles of a molecule while holding bond lengths and bond angles fixed. OEMolFunc1 derived classes typically require Cartesian coordinates for function evaluation. OETorAdaptor transforms a set of torsions into Cartesian coordinates, passes the resultant coordinates to the internally stored OEMolFunc1 type function, and transforms the Cartesian gradients back into torsion gradients. Additional facilities are provided for excluding invariant molecule function interactions, controlling the definition of a rotatable bond, and fixing atomic positions during coordinate transformation.
- The following methods are publicly inherited from OEAdaptor:
- The following methods are publicly inherited from OEFunc0:
- The following methods are publicly inherited from OEFunc1:
- The following methods are publicly inherited from OEMolFunc:
- The following methods are publicly inherited from OEMolAdaptor:
- The OETorAdaptor class defines the following public methods:
Constructors¶
OETorAdaptor(OEMolFunc1 &, bool own=false, bool excludeInteract=true)
Default and copy constructors.
Constructs an OETorAdaptor instance. The molecule function used
for function evaluation must be provided as the first argument to the constructor. The second
argument specifies whether the OETorAdaptor object takes ownership
of the memory of the molecule function instance. By default the
OETorAdaptor instance does not take ownership of the molecule function,
so the OETorAdaptor destructor does not delete the molecule function
instance. If ownership of the molecule function is transferred to the
OETorAdaptor instance, the molecule function’s delete operator will
be called in the OETorAdaptor destructor. The third argument
controls the inclusion of invariant molecule function interactions. By default, interactions
which remain constant during the torsion minimization are excluded from calculation (for
example bond stretch interactions). If the third calling argument is false
then all
interactions will be computed during every function evaluation.
AdaptGrad¶
bool AdaptGrad(double *torGrad, const double *grads) const
Takes a set of Cartesian gradients of a conformer (second argument), and transforms them into angular torsion gradients (first argument).
Set¶
bool Set(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>&)
bool Set(const OESystem::OEUnaryPredicate<OEChem::OEBondBase>&)
The first method assigns an atom predicate which is used to specify atoms which are to be held fixed in their starting positions during an optimization. The second method assigns a bond predicate which is used to determine which bonds of a molecule are to be rotated during an optimization. Both the Set
methods must be called before the Setup
for it to be effective.