OEGenericFF

Attention

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

class OEGenericFF : public OEMolPotential::OEForceField

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

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

Constructors

OEGenericFF()

Default and copy constructors.

AddMolFunc

bool AddMolFunc(OEMolPotential::OEMolFunc1 &f, bool own=false)

This method defines the interface for adding externally declared functions to an OEGenericFF derived instance. The second argument denotes whether the OEGenericFF 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 OEGenericFF derived class. Any object derived from the OEMolFunc1 may be added using this method. The method returns true if the object of OEMolFunc1 is successfully added. Only one copy of a OEMolFunc1 may be added to an OEGenericFF instance. Subsequent attempts to add the same function object to already contained in a OEGenericFF derived class will fail with a return value of false.

GetComponents

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

Method returns a vector of pointers to the currently contained OEMolFunc1 instances on this OEGenericFF.

RemoveMolFunc

bool RemoveMolFunc(OEMolPotential::OEMolFunc1&)

Defines an interface to remove a function previously added to an OEGenericFF instance. If the function is not contained in the OEGenericFF instance then the method will return false. If the function is found and removed successfully, then the method will return true.