private boolean ensure2dLayout ( IAtomContainer container ) throws CDKException { if ( ! GeometryUtil . has2DCoordinates ( container ) ) { StructureDiagramGenerator sdg = new StructureDiagramGenerator ( ) ; sdg . generateCoordinates ( container ) ; return true ; } return false ; }
Automatically generate coordinates if a user has provided a molecule without them .