MDLV2000Reader
should be used
instead. The V2000 reader can actually read files missing the version tag when
in relaxed mode.@Deprecated public class MDLReader extends 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
IChemObjectReader.Mode
errorHandler, mode
Constructor and Description |
---|
MDLReader()
Deprecated.
|
MDLReader(InputStream in)
Deprecated.
Constructs a new MDLReader that can read Molecule from a given InputStream.
|
MDLReader(InputStream in,
IChemObjectReader.Mode mode)
Deprecated.
|
MDLReader(Reader in)
Deprecated.
Constructs a new MDLReader that can read Molecule from a given Reader.
|
MDLReader(Reader in,
IChemObjectReader.Mode mode)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Class<? extends IChemObject> classObject)
Deprecated.
Returns whether the given
IChemObject can be read or written. |
void |
close()
Deprecated.
Closes this IChemObjectIO's resources.
|
void |
customizeJob()
Deprecated.
|
IResourceFormat |
getFormat()
Deprecated.
Returns the
IResourceFormat class for this IO class. |
<T extends IChemObject> |
read(T object)
Deprecated.
Takes an object which subclasses IChemObject, e.g.
|
void |
setReader(InputStream input)
Deprecated.
Sets the InputStream from which this ChemObjectReader should read
the contents.
|
void |
setReader(Reader input)
Deprecated.
Sets the Reader from which this ChemObjectReader should read
the contents.
|
fireFrameRead, handleError, handleError, handleError, handleError, setErrorHandler, setReaderMode
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
public MDLReader()
public MDLReader(InputStream in)
in
- The InputStream to read frompublic MDLReader(InputStream in, IChemObjectReader.Mode mode)
public MDLReader(Reader in)
in
- The Reader to read frompublic MDLReader(Reader in, IChemObjectReader.Mode mode)
public IResourceFormat getFormat()
IChemObjectIO
IResourceFormat
class for this IO class.public void setReader(Reader input) throws CDKException
IChemObjectReader
CDKException
public void setReader(InputStream input) throws CDKException
IChemObjectReader
CDKException
public boolean accepts(Class<? extends IChemObject> classObject)
IChemObjectIO
IChemObject
can be read or written.classObject
- IChemObject
of which is tested if it can be handled.IChemObject
can be handled.public <T extends IChemObject> T read(T object) throws CDKException
object
- The object that subclasses
IChemObjectCDKException
public void close() throws IOException
IChemObjectIO
IOException
- when the wrapper IO class cannot be closed.public void customizeJob()
Copyright © 2021. All rights reserved.