OEFFParams

Attention

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

class OEFFParams

The OEFFParams is an abstract base class. This class defines the interface to retrieve parameters defined by a force field. In addition, simple methods are included for facile extraction of idealized geometric information base on the force field.

The OEFFParams class defines the following public methods:
The following classes derive from this class:

Constructors

OEFFParams() = default;
OEFFParams(const OEFFParams&) = default;

Constructor and copy constructor.

Assignment operator

OEFFParams& operator=(const OEFFParams&) = default;

Assignment operator.

CreateCopy

OEFFParams *CreateCopy() const

This method returns a deep copy of the OEFFParams derived object. The copy of the object returned is in memory owned by the user making the function call. The delete operator must be called for the returned pointer when the copy is no longer needed in order to avoid memory leaks.

GetAtomTypeIndex

unsigned int GetAtomTypeIndex(unsigned int) const

Provides interface to get an atom type index for the atom identified by the force field type passed as an argument. The point is that a number of chemically different atom types in the force field can belong to a single type for which force field parameters are defined.

GetAtomTypeName

const char *GetAtomTypeName(unsigned int) const

Provides interface to convert the integer force field atom type into a symbolic type.

GetContactDistance

bool GetContactDistance(double &, const OEChem::OEAtomBase *,
                        const OEChem::OEAtomBase *) const

Provides the interface for retrieving the distance between two atoms corresponding to the minimum on their VdW potential curve. The double precision floating point reference passed as the first argument to the method is assigned to the contact distance for the two atoms if it is defined by the force field. The method returns true only if a valid force field parameter for the interaction exists. OEFFParams.PrepMol must be called for the molecule prior to using this method.

GetCoulombParams

bool GetCoulombParams(OEInteractParams &, const OEChem::OEAtomBase *,
                      const OEChem::OEAtomBase *) const

Defines the interface for retrieving the parameters used in calculating an electrostatic interaction for two atoms. Overriding methods return true only if valid parameters exist for the atoms passed as the second and third arguments, otherwise they return false. OEFFParams.PrepMol must be called for the molecule prior to using this method.

GetEquilibriumAngle

bool GetEquilibriumAngle(double &, const OEChem::OEAtomBase *,
                         const OEChem::OEAtomBase *,
                         const OEChem::OEAtomBase *) const

This method is used to retrieve the equilibrium bond angle for the three atoms passed to it. The second atom passed to the method (atom2) must be the central atom of the requested bond angle. The double precision floating point reference passed as the first argument to the method is assigned to the equilibrium bond angle if it is defined by the force field. The method returns true only if a valid force field parameter for the interaction exists. OEFFParams.PrepMol must be called for the molecule prior to using this method.

GetEquilibriumBondLength

bool GetEquilibriumBondLength(double &, const OEChem::OEBondBase *) const

This method is used to retrieve the equilibrium bond length for the bond passed as the second argument. The double precision floating point reference passed as the first argument to the method is assigned to the equilibrium bond length if it is defined by the force field. The method returns true only if a valid force field parameter for the bond exists. OEFFParams.PrepMol must be called for the molecule prior to using this method.

GetStretchBendParams

bool GetStretchBendParams(OEInteractParams &, const OEChem::OEAtomBase *,
                          const OEChem::OEAtomBase *,
                          const OEChem::OEAtomBase *) const

Defines the interface for retrieving the parameters used in calculating a stretch-bend interaction. The central atom of the bond-angle must be passed as the third argument to the method. Overriding methods return true only if valid parameters exist for the atoms passed as arguments, otherwise they should return false. OEFFParams.PrepMol must be called for the molecule prior to using this method.

GetVdwRadius

bool GetVdwRadius(double &, const OEChem::OEAtomBase *atm) const

Defines the interface for retrieving the VdW radius for an atom. Overriding methods return true only if a VdW radius can be calculated or retrieved for an atom, false otherwise. OEFFParams.PrepMol must be called for the molecule prior to using this method.

PrepMol

bool PrepMol(OEChem::OEMolBase &mol, bool sweep=true, bool closestTypeAllowed=true) const

Defines the interface for preparing a molecule for force field parameter retrieval. Atom types, names, partial charges, and indices stored within the molecule may be modified by overriding methods. The second argument to the method specifies whether a call to OEMolBase.Sweep is allowed during the preparation. By default, sweeping a molecule is allowed by the method. A return value of true indicates a successful preparation, however, if the method returns false calculations with the resultant modified molecule should not be attempted. The return value of this method should always be checked before use with its associated force field and components.

closestTypeAllowed

If true then the MMFF typing method will substitute close atom types if exact atom types do not exist.

See also

OEMMFFAtomType function

GetVdwParams

bool GetVdwParams(OEMolPotential::OEInteractParams&, const OEChem::OEAtomBase*,
                  const OEChem::OEAtomBase*) const

Fills the first argument, OEInteractParams, with the Vdw parameters for the two non-bonded atoms specified by the second and the third arguments, OEAtomBase. If parameters were not found, it returns false; otherwise, it returns true.

OESystem::OEIterBase<OEMolPotential::OEVdwParams>*
GetVdwParams(const OEChem::OEMolBase& mol,
             const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>* pred=0,
             const double rcut=0.0) const

Takes a molecule object, mol, and returns an iterator to all OEVdwParams objects created for that molecule. If the pointer to atom predicate is passed as the second argument, all atoms engaged in vdw non-bonded interactions will be tested against with that predicate. In this case, the returned iterator will contain parameters for only those pairs of atoms that pass the test. Similarly, all OEVdwParams objects for pairs outside the cutoff radius, rcut, will be eliminated. An rcut value of 0.0 or less assumes that all interactions should be included without any cutoff.

OESystem::OEIterBase<OEMolPotential::OEVdwParams>*
GetVdwParams(const OEChem::OEMolBase& mol,
             const OEChem::OEMolBase& host,
             const double rcut=0.0) const

Returns an iterator to all OEVdwParams objects created for host-ligand interactions specified by the ligand molecule, mol, and the host molecule, host. All OEVdwParams objects for pairs outside the cutoff radius, rcut, will be eliminated. An rcut value of 0.0 or less assumes that all interactions should be included without any cutoff.

GetStretchParams

bool GetStretchParams(OEMolPotential::OEInteractParams&, const OEChem::OEBondBase*) const

Fills the first argument, OEInteractParams, with the bond stretch parameters for the bond, OEBondBase. If the parameters were not found, it returns false; otherwise, it returns true.

OESystem::OEIterBase<OEMolPotential::OEStretchParams>*
GetStretchParams(const OEChem::OEMolBase& mol,
                 const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Takes a molecule object, mol, and returns an iterator to all OEStretchParams objects created for that molecule. If the pointer to an atom predicate is passed as the second argument, all atoms making bonds will be tested against with that predicate. In this case, the returned iterator will contain parameters for only those bonds made between the atoms that pass the test.

GetBendParams

bool GetBendParams(OEMolPotential::OEInteractParams&, const OEChem::OEAtomBase*,
                   const OEChem::OEAtomBase*, const OEChem::OEAtomBase*) const

Fills the first argument, OEInteractParams, with the bend parameters for a bond angle made by 3 atoms, OEAtomBase, passed as the second, third and the forth arguments. If the parameters were not found, it returns false; otherwise, it returns true.

OESystem::OEIterBase<OEMolPotential::OEBendParams>*
GetBendParams(const OEChem::OEMolBase& mol,
              const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Takes a molecule object, mol, and returns an iterator to all OEBendParams objects created for that molecule. If the pointer to an atom predicate is passed as the second argument, all atoms making bond angles will be tested against that with predicate and the returned iterator will contain parameters for only those bond angles whose atom members pass the test.

GetTorsionParams

bool GetTorsionParams(OEMolPotential::OEInteractParams&, const OEChem::OEAtomBase*,
                      const OEChem::OEAtomBase*, const OEChem::OEAtomBase*,
                      const OEChem::OEAtomBase*) const

Fills the first argument, OEInteractParams, with the torsion parameters for a torsion made by 4 atoms, OEAtomBase, passed as the second, third, forth and the fifth arguments. If the parameters were not found, it returns false; otherwise, it returns true.

OESystem::OEIterBase<OEMolPotential::OETorsionParams>*
GetTorsionParams(const OEChem::OEMolBase& mol,
                 const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Takes a molecule object, mol, and returns an iterator to all OETorsionParams objects created for that molecule. If the pointer to an atom predicate is passed as the second argument, all atoms making torsions will be tested against with that predicate and the returned iterator will contain parameters for only those torsions whose atom members pass the test.

GetOutOfPlaneParams

bool GetOutOfPlaneParams(OEMolPotential::OEInteractParams&, const OEChem::OEAtomBase*,
                         const OEChem::OEAtomBase*, const OEChem::OEAtomBase*,
                         const OEChem::OEAtomBase*) const

Fills the first argument, OEInteractParams, with the improper torsion parameters for an improper torsion made by 4 atoms, OEAtomBase, passed as the second, third, forth and the fifth arguments. If the parameters were not found, it returns false; otherwise, it returns true.

OESystem::OEIterBase<OEMolPotential::OEOutOfPlaneParams>*
GetOutOfPlaneParams(const OEChem::OEMolBase& mol,
                    const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Takes a molecule object, mol, and returns an iterator to all OESmirnoffOutOfPlane objects created for that molecule. If the pointer to an atom predicate is passed as the second argument, all atoms making improper torsions will be tested against with that predicate and the returned iterator will contain parameters for only those improper torsions whose atom members pass the test.

HasVdwParams

bool HasVdwParams(const OEChem::OEMolBase& mol,
             const OESystem::OEUnaryPredicate<OEChem::OEAtomBase>* pred=0,
             const double rcut=0.0) const
bool HasVdwParams(const OEChem::OEMolBase& mol,
                  const OEChem::OEMolBase& host,
                  const double rcut=0.0) const

Returns if the desired Vdw parameters exist for the specified molecule, mol. See the GetVdwParams method.

HasStretchParams

bool HasStretchParams(const OEChem::OEMolBase& mol,
                 const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Returns if the desired bond stretching parameters exist for the specified molecule, mol. See the GetStretchParams method.

HasBendParams

bool HasBendParams(const OEChem::OEMolBase& mol,
              const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Returns if the desired bend parameters exist for the specified molecule, mol. See the GetBendParams method.

HasTorsionParams

bool HasTorsionParams(const OEChem::OEMolBase& mol,
                 const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *pred=0) const

Returns if the desired torison parameters exist for the specified molecule, mol. See the GetTorsionParams method.

GetTitle

std::string GetTitle() const

Returns name of the force field parameter.