PRELIMINARY-IMAGE This is a preliminary API until Spring 2021 and may be improved based on user feedback. It is currently available in C++ and Python.

class OEComplexFF : public OEMolFunc1

The OEComplexFF is a generic class for force-fields of complexes. This class defines an interface for combining multiple OEForceField to easily construct a force field for a host/guest or protein/ligand complex. The OEComplexFF extends the OEMolFunc1 class to allow this being a collection of multiple force fields.

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 OEComplexFF class defines the following public methods:
The following classes derive from this class:


OEComplexFF(const OEMolPotential::OEForceField& ligandFF,
            const OEMolPotential::OEForceField& hostFF,
            const OEMolPotential::OEInterMolFunc1& interFF);
OEComplexFF(const OEComplexFF&)

Default and copy constructors.

Construction of a OEComplexFF requires a OEForceField for the guest or the ligand molecule, a OEForceField for the host or the protein molecule, and an OEInterMolFunc1 for the inter-molecular interactions.


bool AdaptHostCoords(double *coords, const double *var) const

Takes a set of variables as the second argument and provides the corresponding host molecule coordinates into the first argument. This method is used to obtain optimized coordinates for the flexible host or protein molecule.


void GetVar(double* var, const double* coords)

Takes reference coordinates of the molecule, and transforms them into the variable type or coordinate system (var) that will be used during an optimization. The transfored variables here provides the combined host/guest coordinates, whenoptimization involves flexible host or protein molecule.


bool Set(const OESystem::OEUnaryPredicate<OEChem::OEBondBase> &pred,
         unsigned int functype)
bool Set(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> &pred,
         unsigned int functype)
bool Set(const OESystem::OEBinaryPredicate<OEChem::OEAtomBase,
         OEChem::OEAtomBase> &pred, unsigned int functype)
bool Set(const OESystem::OEBinaryPredicate<OEChem::OEBondBase,
         OEChem::OEBondBase> &pred, unsigned int functype)

These methods assigns interaction-control predicates, and only applies to the guest or the ligand molecule. The first argument is the predicate type to be passed to the interaction component. The second argument is a value or a set of binary OR’ed values taken from the OEFuncType namespace which specifies the intended target for the predicate assignment.

The Set method passes on the interaction-control predicates to the appropriate force field components contained. Method returns false if predicate was not set to any of the components contained by the force field.

Set must be called before the Setup for it to be effective.


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

Set predicate to define the flexible portion of the host or protein molecule. If no predicate is set to define flexibility, the host or protein is considered rigid.

SetHostFlex must be called before the Setup for it to be effective.


bool SetupHost(const OEChem::OEMolBase& host)

This method defines the interface for initializing the host in the OEComplexFF.

SetupHost must be called before calling Setup .