chemaxon.marvin.io.formats.mdl
Class MolImport
java.lang.Object
chemaxon.marvin.io.MolImportModule
chemaxon.marvin.io.formats.mdl.MolImport
- All Implemented Interfaces:
- StereoConstants
public class MolImport
- extends MolImportModule
- implements 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
- Version:
- 5.3, 09/24/2009
- Author:
- Peter Csizmadia, Szabolcs Csepregi, Erika Biro
| 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_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MolImport
public MolImport()
setOptions
public void setOptions(java.lang.String opts)
- Sets the import options.
- Overrides:
setOptions in class MolImportModule
- Parameters:
opts - import options
initMolImport
public void initMolImport(MolInputStream is)
throws MolFormatException,
java.io.IOException
- Initializes the import module.
- Overrides:
initMolImport in class MolImportModule
- Parameters:
is - the molecule input stream
- Throws:
MolFormatException - if the file cannot be read because of
a molecule file format related error
java.io.IOException - an I/O error occured while reading the file
readMol
public boolean readMol(Molecule mol)
throws MolFormatException,
java.io.IOException
- 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 class MolImportModule
- 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 format
java.io.IOException - in case of I/O error
createMol
public Molecule createMol()
- Creates a new target molecule object.
- Specified by:
createMol in class MolImportModule
- Returns:
- new
Molecule, RgMolecule or RxnMolecule - Since:
- Marvin 3.4, 05/08/2004
getMolfileVersion
protected int getMolfileVersion()
- Gets the molfile version.
- Returns:
- 2 or 3
- Since:
- Marvin 3.4.1, 07/16/2004