Package com.actelion.research.chem
Class MolfileParser
- java.lang.Object
-
- com.actelion.research.chem.MolfileParser
-
public class MolfileParser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static booleandebugstatic intMODE_KEEP_HYDROGEN_MAP
-
Constructor Summary
Constructors Constructor Description MolfileParser()Constructor of a MolFileParser, which will mirror Y,Z coordinatesMolfileParser(int mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StereoMoleculegetCompactMolecule(java.io.BufferedReader reader)StereoMoleculegetCompactMolecule(java.io.File file)StereoMoleculegetCompactMolecule(java.lang.String molFile)int[]getHandleHydrogenMap()If this MoflileParser was instantiated with MODE_KEEP_HYDROGEN_MAPbooleanisChiralFlagSet()booleanisV3000()booleanparse(StereoMolecule m, java.io.BufferedReader rd)booleanparse(StereoMolecule mol, java.io.File file)booleanparse(StereoMolecule mol, java.lang.String molFile)booleanparse(StereoMolecule mol, java.lang.StringBuffer molFile)voidsetAssumeChiralTrue(boolean b)Some software exports mol/sd-files with an unset chiral flag despite the original molecule is a pure enantiomer.
-
-
-
Field Detail
-
MODE_KEEP_HYDROGEN_MAP
public static final int MODE_KEEP_HYDROGEN_MAP
- See Also:
- Constant Field Values
-
debug
public static boolean debug
-
-
Method Detail
-
getHandleHydrogenMap
public int[] getHandleHydrogenMap()
If this MoflileParser was instantiated with MODE_KEEP_HYDROGEN_MAP- Returns:
-
setAssumeChiralTrue
public void setAssumeChiralTrue(boolean b)
Some software exports mol/sd-files with an unset chiral flag despite the original molecule is a pure enantiomer. This method allows the MolfileParser to override the molfile's chiral flag for such cases.- Parameters:
b-
-
isChiralFlagSet
public boolean isChiralFlagSet()
- Returns:
- whether the previous molfile's chiral flag was set
-
isV3000
public boolean isV3000()
- Returns:
- whether the previous molfile was a V3000
-
parse
public boolean parse(StereoMolecule mol, java.io.File file)
-
parse
public boolean parse(StereoMolecule mol, java.lang.String molFile)
-
parse
public boolean parse(StereoMolecule mol, java.lang.StringBuffer molFile)
-
parse
public boolean parse(StereoMolecule m, java.io.BufferedReader rd)
-
getCompactMolecule
public StereoMolecule getCompactMolecule(java.lang.String molFile)
-
getCompactMolecule
public StereoMolecule getCompactMolecule(java.io.BufferedReader reader)
-
getCompactMolecule
public StereoMolecule getCompactMolecule(java.io.File file)
-
-