OEGenericFF2

Attention

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

class OEGenericFF2 : public OEMolPotential::OEForceField,  public OEMolPotential::OEMolFunc2

The OEGenericFF2 class facilitates creation of a user defined force field of type OEMolFunc2. The force field instance can be extended by adding internally or externally defined potential functions.

../../_images/OEGenericFF2.png
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 OEForceField:
The OEGenericFF2 class defines the following public methods:
The following classes derive from this class:

Constructors

OEGenericFF2()

Default and copy constructors.

AddMolFunc

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.

GetComponents

std::vector<OEMolPotential::OEMolFunc2*> GetComponents() const

Method returns a vector of pointers to the currently contained OEMolFunc2 instances on this OEGenericFF2.

RemoveMolFunc

bool RemoveMolFunc(OEMolPotential::OEMolFunc2&)

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.