OEChargeEngineBase

class OEChargeEngineBase

This is the abstract base class for all charge engines, containing methods used by the function OEAssignCharges.

The following charge engine classes derive from this base class:

operator!=

bool operator!=(const OEChargeEngineBase &rhs) const

Returns true if the charge engines are not equivalent.

operator==

bool operator==(const OEChargeEngineBase &rhs) const

Returns true if the charge engines are equivalent (the same class with the same parameters).

CheckCharges

bool CheckCharges(const OEChem::OEMolBase &mol) const
bool CheckCharges(const OEChem::OEMCMolBase &mcMol) const

Used by OEAssignCharges to determine if the charges on the molecule are as expected.

CreateCopy

OEChargeEngineBase *CreateCopy() const =0

Deep copy of the charge engine.

GetExpectValidMol

bool GetExpectValidMol() const

Returns true if an input molecule must be valid before OEAssignCharges attempts to assign charges.

GetName

std::string GetName() const

Returns the name of the charge engine.

GetRepairRequestedHint

bool GetRepairRequestedHint() const

Returns true if OEAssignCharges is requested to repair the input molecule before assigning charges. Examples of repairing a molecule include adding explicit hydrogens and perceiving residues.

GetRequirements

unsigned GetRequirements() const

Returns a bit mask used by OEAssignCharges describing aspects of the input molecule required for this charging method. Examples include 3D coordinates, explicit hydrogens, and PDB order.

IsValid

bool IsValid(OEChem::OEMolBase &mol) const
bool IsValid(OEChem::OEMCMolBase &mcMol) const
bool IsValid(const OEChem::OEMolBase &mol) const =0
bool IsValid(const OEChem::OEMCMolBase &mcMol) const

Returns true if the input molecule appears to be valid for use with this method.

SetExpectValidMol

void SetExpectValidMol(bool expect=true)

Defines whether an input molecule must be valid before OEAssignCharges attempts to assign charges. If set to true and the molecule is not valid, then OEAssignCharges attempt to charge the molecule anyway.

SetRepairRequestedHint

void SetRepairRequestedHint(bool repair=true)

Define whether OEAssignCharges is requested to repair the input molecule before assigning charges. Examples of repairing a molecule include adding explicit hydrogens and perceiving residues. If set to false and the molecule requires repairs, then OEAssignCharges will fail and return false.

TransferCharge

bool TransferCharge(OEChem::OEAtomBase *dstAtom,
                    const OEChem::OEAtomBase *srcAtom) const

If OEAssignCharges must make a copy of the input molecule before charges can be applied, this method is used to transfer charges back to the input molecule.