OEGenerate2DCoordinates

bool OEGenerate2DCoordinates(OEMolBase &mol);

Assigns 2D coordinates to the given OEMolBase object. The coordinates of each explicit atom are assigned using the OEMolBase.SetCoords method. This function automatically set the dimensionality of the molecule to two, using the OEMolBase.SetDimension method.

Note

OEGenerate2DCoordinates is a low-level function that only generates 2D coordinates but does not perform any other perceptions.

OEGenerate2DCoordinates will clear MDL bond stereo information that can be re-perceived by calling the OEMDLPerceiveBondStereo function.

If OEGenerate2DCoordinates fails to generate 2D coordinates that correspond to the atom and bond stereo information of the molecule it returns false. This problem occurs when no built-in ring template exists for a specific stereo configuration. To avoid this issue specifying user-defined ring template might be necessary. For more information see the 2D Coordinate Generation chapter.

See also

OEInit2DRingDictionary function