Attention

This API is currently available in C++ and Python.

class OESubsetAdaptor : public OEMolAdaptor2


The OESubsetAdaptor class allows optimization of Cartesian coordinates for a subset of atoms in a molecule, while the remaining atoms are fixed. This is accomplished by subsetting the coordinates and gradients into the subsets which correspond to atoms being optimized. Additional facilities are provided for excluding invariant molecule function interactions, and controlling which subset of atoms are held fixed during an optimization.

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 OEFunc2:
The following methods are publicly inherited from OEMolFunc:
The following methods are publicly inherited from OEMolAdaptor:
The following methods are publicly inherited from OEMolAdaptor2:
The OESubsetAdaptor class defines the following public methods:

Constructors¶

OESubsetAdaptor(OEMolFunc1 &, bool own=false, bool excludeInteract=true)
OESubsetAdaptor(OEMolFunc2 &, bool own=false, bool excludeInteract=true)


Default and copy constructors.

The molecule function used for function evaluation must be provided as the first argument to the constructor. The second argument specifies whether the OESubsetAdaptor object takes ownership of the memory of the molecule function instance. By default that does not happen, so the OESubsetAdaptor destructor does not delete the molecule function instance. If ownership of the molecule function is transferred to the OESubsetAdaptor instance, the molecule function’s delete operator will be called in the OESubsetAdaptor destructor. The third argument controls the inclusion of invariant molecule function interactions. By default, interactions which remain constant during the optimization are excluded from calculation. Interactions composed entirely of atoms held fixed during the optimization will not change during the optimization. Excluding invariant interactions does not affect the optimization, however, the total energy calculated for a set of coordinates will be altered by the exclusion. If the third calling argument is false then all interactions will be computed during every function evaluation.

bool AdaptGrad(double *ga, const double *g) const


Takes a set of gradients from a molecule function evaluation as the second argument, and subsets the gradients into the array passed as the first argument.

bool AdaptHessian(double *ha, const double *h) const

bool Set(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>&)