public class SDFWriter extends DefaultChemObjectWriter
| Name | Question | Default |
|---|---|---|
| ForceWriteAs2DCoordinates | Should coordinates always be written as 2D? | false |
| WriteAromaticBondTypes | Should aromatic bonds be written as bond type 4? | false |
| writeProperties | Should molecule properties be written as non-structural data | true |
| WriteQueryFormatValencies | Should valencies be written in the MDL Query format? (deprecated) | false |
| writeV3000 | Write all records as V3000 | false |
| Constructor and Description |
|---|
SDFWriter() |
SDFWriter(BufferedWriter wtr)
Create an SDfile writer that will output directly to the provided buffered writer.
|
SDFWriter(OutputStream output)
Create an SDfile writer, the provided output stream is wrapped
in a UTF-8 buffered writer.
|
SDFWriter(OutputStream output,
Set<String> propertiesToWrite)
Constructs a new SdfWriter that can write to a given
OutputStream. |
SDFWriter(Set<String> propertiesToWrite)
Writes SD-File to a String including the given properties
|
SDFWriter(Writer wtr)
Create an SDfile writer, the provided writer is buffered
if it's not an instance of BufferedWriter.
|
SDFWriter(Writer out,
Set<String> propertiesToWrite)
Constructs a new SDFWriter that writes to the given
Writer. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Class<? extends IChemObject> classObject) |
void |
close()
Flushes the output and closes this object.
|
void |
customizeJob() |
IResourceFormat |
getFormat() |
void |
setAlwaysV3000(boolean val) |
void |
setWriter(OutputStream output) |
void |
setWriter(Writer out) |
void |
write(IChemObject object)
Writes a IChemObject to the MDL SD file formated output.
|
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerpublic SDFWriter(BufferedWriter wtr)
wtr - writerpublic SDFWriter(Writer wtr)
BufferedWriter.wtr - writerpublic SDFWriter(OutputStream output)
output - out streampublic SDFWriter()
public SDFWriter(Writer out, Set<String> propertiesToWrite)
Writer.out - The Writer to write topublic SDFWriter(OutputStream output, Set<String> propertiesToWrite)
OutputStream.output - The OutputStream to write topublic IResourceFormat getFormat()
public void setWriter(Writer out) throws CDKException
CDKExceptionpublic void setWriter(OutputStream output) throws CDKException
CDKExceptionpublic void close()
throws IOException
IOExceptionpublic boolean accepts(Class<? extends IChemObject> classObject)
public void write(IChemObject object) throws CDKException
IChemFile, IAtomContainerSet
and IAtomContainerSet.object - an acceptable IChemObjectCDKExceptionaccepts(Class)public void setAlwaysV3000(boolean val)
public void customizeJob()
Copyright © 2017. All rights reserved.