This API is currently available in C++ and Python.
class OEGenericFF2 : public OEMolPotential::OEForceField, public OEMolPotential::OEMolFunc2
Default and copy constructors.
bool AddMolFunc(OEMolPotential::OEMolFunc2 &f, bool own=false)
This method defines the interface for adding externally declared functions to an OEGenericFF2 derived instance. The second argument denotes whether the OEGenericFF2 derived instance is to take ownership of the memory occupied by the external function. If ownership is passed, then it would be deleted during destruction of the OEGenericFF2 derived class. Any object derived from the OEMolFunc2 may be added using this method. The method returns true if the object of OEMolFunc2 is successfully added. Only one copy of a OEMolFunc2 may be added to an OEGenericFF2 instance. Subsequent attempts to add the same function object to already contained in a OEGenericFF2 derived class will fail with a return value of false.
std::vector<OEMolPotential::OEMolFunc2*> GetComponents() const
Defines an interface to remove a function previously added to an OEGenericFF2 instance. If the function is not contained in the OEGenericFF2 instance then the method will return false. If the function is found and removed successfully, then the method will return true.