bool OE3DToAtomStereo(OEMolBase &mol)

Set the stereochemistry at the chiral atoms of a molecule, as specified by the molecule’s 3D coordinates. The affected atoms are those with a ‘chiral’ atom property of true, as perceived by a call to OEPerceiveChiral, or set manually by the user calling the OEAtomBase.SetChiral method. If no chirality has been perceived on the molecule, OEPerceiveChiral will be called inside this function.

This function will return false immediately, if the dimension of the molecule is not found to be 3.

The OE3DToAtomStereo function throws a warning and returns false at the end, if the geometry of any of the chiral atoms of the given molecule is not tetrahedral i.e. if the atom stereo can not be determined from the coordinates.

After stereochemistry is set SetPerceived is called with the OEPerceived.AtomStereo flag set to true. Subsequent calls to OE3DToAtomStereo will return true immediately as the value of HasPerceived is checked on entry. Stereochemistry can be forced to be reperceived by setting the OEPerceived.AtomStereo flag to false.