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:
ApplyCharges
ApplyCharges(du: OEDesignUnit) -> bool
Assigns partial charges to the atoms of the molecule. The OEMCMolBase
overload assigns charges using all conformers where applicable. The
OEDesignUnit overload charges the small-molecule component of the
design unit.
CheckCharges
CheckCharges(mol: Union[OEGraphMol,OEQMol]) -> bool
CheckCharges(mcMol: OEMol) -> bool
CheckCharges(du: OEDesignUnit) -> bool
Used by OEAssignCharges to
determine if the charges on the molecule are as expected.
CreateCopy
CreateCopy() -> OEChargeEngineBase
Deep copy of the charge engine.
GetExpectValidMol
GetExpectValidMol() -> bool
Returns true if an input molecule must be valid before
OEAssignCharges attempts to
assign charges.
GetName
GetName() -> str
Returns the name of the charge engine.
GetRepairRequestedHint
GetRepairRequestedHint() -> bool
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
GetRequirements() -> int
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
IsValid(mol: Union[OEGraphMol,OEQMol]) -> bool
IsValid(mcMol: OEMol) -> bool
IsValid(du: OEDesignUnit) -> bool
Returns true if the input molecule appears to be valid for use with
this method.
SetExpectValidMol
SetExpectValidMol(expect: bool = True) -> None
Defines whether an input molecule must be valid before
OEAssignCharges attempts to
assign charges. If set to false and the molecule is not valid,
then OEAssignCharges
attempt to charge the molecule anyway.
SetRepairRequestedHint
SetRepairRequestedHint(repair: bool = True) -> None
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
TransferCharge(dstAtom: OEAtomBase, srcAtom: OEAtomBase) -> bool
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.