public class MDLReader
extends org.openscience.cdk.io.DefaultChemObjectReader
IChemSequence of IChemModel's. Each
ChemModel will contain one Molecule. If the MDL molfile contains a property
block, the MDLV2000Reader should be used.
If all z coordinates are 0.0, then the xy coordinates are taken as 2D, otherwise the coordinates are read as 3D.
The title of the MOL file is read and can be retrieved with:
molecule.getProperty(CDKConstants.TITLE);
MDLV2000Reader| Constructor and Description |
|---|
MDLReader() |
MDLReader(InputStream in)
Constructs a new MDLReader that can read Molecule from a given
InputStream.
|
MDLReader(InputStream in,
org.openscience.cdk.io.IChemObjectReader.Mode mode) |
MDLReader(Reader in)
Constructs a new MDLReader that can read Molecule from a given Reader.
|
MDLReader(Reader in,
org.openscience.cdk.io.IChemObjectReader.Mode mode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Class classObject) |
void |
close() |
void |
customizeJob() |
org.openscience.cdk.io.formats.IResourceFormat |
getFormat() |
org.openscience.cdk.io.setting.IOSetting[] |
getIOSettings() |
org.openscience.cdk.interfaces.IChemObject |
read(org.openscience.cdk.interfaces.IChemObject object)
Takes an object which subclasses IChemObject, e.g.
|
void |
setReader(InputStream input) |
void |
setReader(Reader input) |
fireFrameRead, handleError, handleError, handleError, handleError, setErrorHandler, setReaderModeaddChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerpublic MDLReader()
public MDLReader(InputStream in)
in - The InputStream to read frompublic MDLReader(InputStream in, org.openscience.cdk.io.IChemObjectReader.Mode mode)
public MDLReader(Reader in)
in - The Reader to read frompublic MDLReader(Reader in, org.openscience.cdk.io.IChemObjectReader.Mode mode)
public org.openscience.cdk.io.formats.IResourceFormat getFormat()
public void setReader(Reader input) throws org.openscience.cdk.exception.CDKException
org.openscience.cdk.exception.CDKExceptionpublic void setReader(InputStream input) throws org.openscience.cdk.exception.CDKException
org.openscience.cdk.exception.CDKExceptionpublic boolean accepts(Class classObject)
public org.openscience.cdk.interfaces.IChemObject read(org.openscience.cdk.interfaces.IChemObject object)
throws org.openscience.cdk.exception.CDKException
object - The object that subclasses IChemObjectorg.openscience.cdk.exception.CDKExceptionpublic void close()
throws IOException
IOExceptionpublic void customizeJob()
public org.openscience.cdk.io.setting.IOSetting[] getIOSettings()
getIOSettings in interface org.openscience.cdk.io.IChemObjectIOgetIOSettings in class org.openscience.cdk.io.ChemObjectIOCopyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.