OEMDLGetValence¶
unsigned int OEMDLGetValence(unsigned int atomicnum, int charge, unsigned int minvalence)
Returns the MDL valence for the given parameters.
- elemno
The atomic number returned by the
OEAtomBase.GetAtomicNummethod.- charge
The formal charge returned by the
OEAtomBase.GetFormalChargemethod.- minvalence
The minimum valence.
For example, OEMDLGetValence will return 4
in the case of the following input parameters:
atomic number:
OEElemNo.Nformal charge: “+1”
minimum valence: three single bonds to heavy atoms (value returned by the
OEAtomBase.GetExplicitDegreemethod)
This means that the atom has correct valence only if it has either one implicit or one explicit hydrogen.
See also
MDL Valence Model section
OEDefaultMDLHCountfunctionOEAssignMDLHydrogensfunction