@PublicAPI public class MolImport extends MolImportModule implements StereoConstants
MolImportModule.PreferredView
Modifier and Type | Field and Description |
---|---|
protected boolean |
fixSgroups |
protected java.util.List<Sgroup> |
sgroupList |
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
Constructor and Description |
---|
MolImport() |
Modifier and Type | Method and Description |
---|---|
Molecule |
createMol()
Creates a new target molecule object.
|
protected int |
getMolfileVersion()
Gets the molfile version.
|
void |
initMolImport(MolInputStream is)
Initializes the import module.
|
boolean |
readMol(Molecule mol)
Reads a molecule from MDL mol/sdf/rxn file.
|
void |
setOptions(java.lang.String opts)
Sets the import options.
|
getLineCount, getPreferredView, initMolImport, isDocumentImporter, readDocument
protected boolean fixSgroups
protected java.util.List<Sgroup> sgroupList
public void setOptions(java.lang.String opts)
setOptions
in class MolImportModule
opts
- import optionspublic void initMolImport(MolInputStream is) throws MolFormatException, java.io.IOException
initMolImport
in class MolImportModule
is
- the molecule input streamMolFormatException
- if the file cannot be read because of
a molecule file format related errorjava.io.IOException
- an I/O error occurred while reading the filepublic boolean readMol(Molecule mol) throws MolFormatException, java.io.IOException
readMol
in class MolImportModule
mol
- the molecule object to read intoMolFormatException
- if the file is in bad formatjava.io.IOException
- in case of I/O errorpublic Molecule createMol()
createMol
in class MolImportModule
Molecule
, RgMolecule
or RxnMolecule
protected int getMolfileVersion()