public class MDLV2000Writer
extends org.openscience.cdk.io.DefaultChemObjectWriter
Modifier and Type | Class and Description |
---|---|
static class |
MDLV2000Writer.SPIN_MULTIPLICITY
Enumeration of all valid radical values.
|
Constructor and Description |
---|
MDLV2000Writer() |
MDLV2000Writer(java.io.OutputStream output)
Constructs a new MDLWriter that can write an
IAtomContainer to a
given OutputStream. |
MDLV2000Writer(java.io.Writer out)
Constructs a new MDLWriter that can write an
IAtomContainer to
the MDL molfile format. |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.lang.Class classObject) |
void |
close()
Flushes the output and closes this object.
|
void |
customizeJob() |
protected static java.lang.String |
formatMDLFloat(float fl)
Formats a float to fit into the connectiontable and changes it to a
String.
|
protected static java.lang.String |
formatMDLInt(int i,
int l)
Formats an integer to fit into the connection table and changes it to a
String.
|
protected static java.lang.String |
formatMDLString(java.lang.String s,
int le)
Formats a String to fit into the connectiontable.
|
org.openscience.cdk.io.formats.IResourceFormat |
getFormat() |
void |
setWriter(java.io.OutputStream output) |
void |
setWriter(java.io.Writer out) |
void |
write(org.openscience.cdk.interfaces.IChemObject object)
Writes a
IChemObject to the MDL molfile formated output. |
void |
writeMolecule(org.openscience.cdk.interfaces.IAtomContainer container)
Writes a Molecule to an OutputStream in MDL sdf format.
|
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
public MDLV2000Writer(java.io.Writer out)
IAtomContainer
to
the MDL molfile format.out
- The Writer to write topublic MDLV2000Writer(java.io.OutputStream output)
IAtomContainer
to a
given OutputStream.output
- The OutputStream to write topublic MDLV2000Writer()
protected static java.lang.String formatMDLInt(int i, int l)
i
- The int to be formatedl
- Length of the Stringprotected static java.lang.String formatMDLFloat(float fl)
fl
- The float to be formatedprotected static java.lang.String formatMDLString(java.lang.String s, int le)
s
- The String to be formatedle
- The length of the Stringpublic org.openscience.cdk.io.formats.IResourceFormat getFormat()
public void setWriter(java.io.Writer out) throws org.openscience.cdk.exception.CDKException
out
- org.openscience.cdk.exception.CDKException
public void setWriter(java.io.OutputStream output) throws org.openscience.cdk.exception.CDKException
output
- org.openscience.cdk.exception.CDKException
public void close() throws java.io.IOException
java.io.IOException
public boolean accepts(java.lang.Class classObject)
classObject
- public void write(org.openscience.cdk.interfaces.IChemObject object) throws org.openscience.cdk.exception.CDKException
IChemObject
to the MDL molfile formated output. It can
only output ChemObjects of type IChemFile
,
IChemObject
and IAtomContainer
.object
- IChemObject
to writeorg.openscience.cdk.exception.CDKException
accepts(Class)
public void writeMolecule(org.openscience.cdk.interfaces.IAtomContainer container) throws java.lang.Exception
container
- Molecule that is written to an OutputStreamjava.lang.Exception
public void customizeJob()