# OEDesignUnitCharges¶

Attention

This is a preliminary API until 2020.Oct and may be improved based on user feedback. It is currently available in C++ and Python.

class OEDesignUnitCharges : public OEChargeEngineBase


This charge engine charges each component in the OEDesignUnit. The various components can be charged with different charging engines, and the default behavior is to do exactly that. The default behavior is for the protein engine to use OEAmberFF94Charges for the standard protein residues. It uses OEAM1BCCCharges for non-standard residues. The nucleic acid component uses the OEMMFF94Charges charges. The ligand and or any other heterogen in the system (e.g.g cofactors), are charged using OEAM1BCCCharges. The solvent uses OEAmberFF94Charges, but by default uses the the SZMAP water model, in which case it assigns the charges to match those described in The Szmap TK Standard Water Model. This is an option that can be turned off. Excipients is by default charged using the OEMMFF94Charges engine. The radii assignedis OERadiiType_BondiVdw, except in cases where AM1 charges have been used, in which case the radii is of the OERadiiType_Zap9 type. Metals in the system (often in cofactors or otherCofactors) are initially charged with the OEFormalToPartialCharges engine, and in the last step of the calculation, the metal charges are spread in the system using the OESpreadMetalCharges as part of the finalization stage. The fall back engine is the same for all components; in case an engine fails, the method will try to charge a component with the fall back engine, which by default is OEMMFF94Charges.

Note

Currently, there is a hard limit of 100 atoms for molecules being charged with the OEAM1BCCCharges charging engine.

Warning

It is currently not possible to use OEAM1BCCELF10Charges for the ligand, cofactors, or other components. The method requires passing a conformer ensemble of the molecule to charge, which is currently not possible with an OEDesignUnit. If a user tries to use this type of charging engine, it will be downgraded to AM1BCC with a warning. Since the OEAM1BCCELF10Charges is recommended for the molecular dynamics type of simulations, we recommend charging the ligand independently and updating it in the DesignUnit using OEUpdateDesignUnit.

The following methods are publicly inherited from OEChargeEngineBase:

## Constructors¶

OEDesignUnitCharges()
OEDesignUnitCharges(const OEDesignUnitCharges &rhs)


Default and copy constructors.

## operator=¶

OEDesignUnitCharges &operator=(const OEDesignUnitCharges &rhs)


Assignment operator.

## ApplyCharges¶

bool ApplyCharges(OEBio::OEDesignUnit &du) const


Returns the boolean whether or not charges are able to be applied to the input OEDesignUnit argument (du).

## CreateCopy¶

OEChargeEngineBase *CreateCopy() const


Creates a copy of the charge engine class. This class does not own the returned memory.

## IsValid¶

bool IsValid(const OEChem::OEMolBase &mol) const
bool IsValid(const OEBio::OEDesignUnit &du) const


Returns the boolean whether or not the input OEMolBase or OEDesignUnit can be assigned partial charges from the charging engine.

## SetCoFactorChargeEngine¶

void SetCoFactorChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for the OEDesignUnitComponents_Cofactors molecular component.

## SetFallbackChargeEngine¶

void SetFallbackChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets a backup charge engine for any molecular component where the charge engine cannot be applied.

## SetFinalizationChargeEngine¶

void SetFinalizationChargeEngine(const OEChargeEngineBase &chargeEngine)


## SetLigandChargeEngine¶

void SetLigandChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for the OEDesignUnitComponents_Ligand molecular component.

## SetMetalChargeEngine¶

void SetMetalChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for the OEDesignUnitComponents_Metals molecular component.

## SetNucleicChargeEngine¶

void SetNucleicChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for the OEDesignUnitComponents_Nucleic molecular component.

## SetOtherChargeEngine¶

void SetOtherChargeEngine(const OEChargeEngineBase &chargeEngine)


## SetProteinChargeEngine¶

void SetProteinChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for the OEDesignUnitComponents_Protein molecular component.

## SetProteinNonStandardChargeEngine¶

void SetProteinNonStandardChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for any non-standard amino acids in the OEDesignUnitComponents_Protein molecular component.

## SetSolventChargeEngine¶

void SetSolventChargeEngine(const OEChargeEngineBase &chargeEngine)


Sets the charge engine for any solvent molecules in the OEDesignUnitComponents_Solvent molecular component.

## TransferCharge¶

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


Returns the boolean whether or not the transfer of charges from the source atom (srcAtom) to the destination atom (dstAtom) was successful.

## UseSZMAPWaterModel¶

void UseSZMAPWaterModel(const bool value)


Sets the boolean of whether or not to use the Szmap water model within the context of charging the system (see Introduction for more information about the water model itself).