Package chemaxon.marvin.io.formats.mdl
Class MolImport
java.lang.Object
chemaxon.marvin.io.MolImportModule
chemaxon.marvin.io.formats.mdl.MolImport
- All Implemented Interfaces:
StereoConstants
Imports MDL Molfile, SDfile, RGfile, RDfile, Rxnfile and
(Chemaxon) compressed molfile.
In the Molfiles
documentation, you can find details about import options.
- Since:
- Marvin 1.3
-
Nested Class Summary
Nested classes/interfaces inherited from class chemaxon.marvin.io.MolImportModule
MolImportModule.PreferredView
-
Field Summary
Fields inherited from interface chemaxon.struc.StereoConstants
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new target molecule object.void
Initializes the import module.boolean
Reads a molecule from MDL mol/sdf/rxn file.void
setOptions
(String opts) Sets the import options.Methods inherited from class chemaxon.marvin.io.MolImportModule
getLineCount, getPreferredView, initMolImport, isDocumentImporter, readDocument
-
Field Details
-
fixSgroups
protected boolean fixSgroups -
sgroupList
-
-
Constructor Details
-
MolImport
public MolImport()
-
-
Method Details
-
setOptions
Sets the import options.- Overrides:
setOptions
in classMolImportModule
- Parameters:
opts
- import options
-
initMolImport
Initializes the import module.- Overrides:
initMolImport
in classMolImportModule
- Parameters:
is
- the molecule input stream- Throws:
MolFormatException
- if the file cannot be read because of a molecule file format related errorIOException
- an I/O error occurred while reading the file
-
readMol
Reads a molecule from MDL mol/sdf/rxn file. All the nodes, edges, and properties are removed from mol before reading.- Specified by:
readMol
in classMolImportModule
- Parameters:
mol
- the molecule object to read into- Returns:
- true after successfully reading the molecule, false if no more molecule found
- Throws:
MolFormatException
- if the file is in bad formatIOException
- in case of I/O error
-
createMol
Creates a new target molecule object.- Specified by:
createMol
in classMolImportModule
- Returns:
- new
Molecule
,RgMolecule
orRxnMolecule
- Since:
- Marvin 3.4, 05/08/2004
-