Package com.actelion.research.chem
Class IDCodeParser
- java.lang.Object
-
- com.actelion.research.chem.IDCodeParserWithoutCoordinateInvention
-
- com.actelion.research.chem.IDCodeParser
-
public class IDCodeParser extends IDCodeParserWithoutCoordinateInvention
-
-
Constructor Summary
Constructors Constructor Description IDCodeParser()
This default constructor creates molecules guaranteed to have 2D-atom-coordinates.IDCodeParser(boolean ensure2DCoordinates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
ensure2DCoordinates()
protected void
inventCoordinates(StereoMolecule mol)
-
Methods inherited from class com.actelion.research.chem.IDCodeParserWithoutCoordinateInvention
coordinatesAre3D, coordinatesAre3D, coordinatesAre3D, coordinatesAreAbsolute, coordinatesAreAbsolute, coordinatesAreAbsolute, getAtomAndBondCounts, getAtomAndBondCounts, getAtomCount, getAtomCount, getCompactMolecule, getCompactMolecule, getCompactMolecule, getCompactMolecule, getCompactMolecule, getCompactMolecule, getIDCodeVersion, getIDCodeVersion, neglectSpaceDelimitedCoordinates, parse, parse, parse, parse, parse, parse, parseCoordinates, parseMapping, parseMapping, printContent
-
-
-
-
Constructor Detail
-
IDCodeParser
public IDCodeParser()
This default constructor creates molecules guaranteed to have 2D-atom-coordinates. If 2D-coordinates are not supplied with the idcode, or if supplied coordinates are 3D, then new 2D-coordinates are created on the fly.
-
IDCodeParser
public IDCodeParser(boolean ensure2DCoordinates)
- Parameters:
ensure2DCoordinates
- If TRUE and no coordinates are passed with the idcode, then the parser generates atom coordinates of any molecule and assigns up/down bonds reflecting given atom parities. Generating coordinates is potentially error prone, such that providing original coordinates, where available, should be the preferred option.
WARNING: If FALSE: In this case stereo parities are taken directly from the idcode, missing explicitly 'unknown' parities, because they are not part of the idcode. Without atom coordinates up/down bonds cannot be assigned. If further processing relies on up/down bond stereo information or needs to distinguish parities 'none' from 'unknown', (e.g. idcode creation, checking for stereo centers, calculating the skeletonSpheres descriptor), or if you are not exactly sure, what to do, then use the constructor IDCodeParser(true). If you supply encoded 3D-coordinates, then use IDCodeParser(false).
-
-
Method Detail
-
ensure2DCoordinates
protected boolean ensure2DCoordinates()
- Overrides:
ensure2DCoordinates
in classIDCodeParserWithoutCoordinateInvention
-
inventCoordinates
protected void inventCoordinates(StereoMolecule mol)
- Overrides:
inventCoordinates
in classIDCodeParserWithoutCoordinateInvention
-
-