RDKit
Open-source cheminformatics and machine learning.
RDKit::SDWriter Class Reference

#include <MolWriters.h>

Inheritance diagram for RDKit::SDWriter:
RDKit::MolWriter

Public Member Functions

 SDWriter (const std::string &fileName)
 
 SDWriter (std::ostream *outStream, bool takeOwnership=false)
 
 ~SDWriter ()
 
void setProps (const STR_VECT &propNames)
 set a vector of property names that are need to be written out for each molecule More...
 
void write (const ROMol &mol, int confId=defaultConfId)
 write a new molecule to the file More...
 
void flush ()
 flush the ostream More...
 
void close ()
 close our stream (the writer cannot be used again) More...
 
unsigned int numMols () const
 get the number of molecules written so far More...
 
void setForceV3000 (bool val)
 
bool getForceV3000 () const
 
void setKekulize (bool val)
 
bool getKekulize () const
 
- Public Member Functions inherited from RDKit::MolWriter
virtual ~MolWriter ()
 

Static Public Member Functions

static std::string getText (const ROMol &mol, int confId=defaultConfId, bool kekulize=true, bool force_V3000=false, int molid=-1, STR_VECT *propNames=NULL)
 return the text that would be written to the file More...
 

Detailed Description

The SDWriter is for writing molecules and properties to SD files

Definition at line 125 of file MolWriters.h.

Constructor & Destructor Documentation

RDKit::SDWriter::SDWriter ( const std::string &  fileName)
Parameters
fileName: filename to write to ("-" to write to stdout)
RDKit::SDWriter::SDWriter ( std::ostream *  outStream,
bool  takeOwnership = false 
)
RDKit::SDWriter::~SDWriter ( )

Member Function Documentation

void RDKit::SDWriter::close ( )
inlinevirtual

close our stream (the writer cannot be used again)

Implements RDKit::MolWriter.

Definition at line 169 of file MolWriters.h.

References RDKit::MolWriter::flush().

void RDKit::SDWriter::flush ( )
inlinevirtual

flush the ostream

Implements RDKit::MolWriter.

Definition at line 155 of file MolWriters.h.

References PRECONDITION.

bool RDKit::SDWriter::getForceV3000 ( ) const
inline

Definition at line 183 of file MolWriters.h.

bool RDKit::SDWriter::getKekulize ( ) const
inline

Definition at line 186 of file MolWriters.h.

static std::string RDKit::SDWriter::getText ( const ROMol mol,
int  confId = defaultConfId,
bool  kekulize = true,
bool  force_V3000 = false,
int  molid = -1,
STR_VECT propNames = NULL 
)
static

return the text that would be written to the file

unsigned int RDKit::SDWriter::numMols ( ) const
inlinevirtual

get the number of molecules written so far

Implements RDKit::MolWriter.

Definition at line 180 of file MolWriters.h.

void RDKit::SDWriter::setForceV3000 ( bool  val)
inline

Definition at line 182 of file MolWriters.h.

void RDKit::SDWriter::setKekulize ( bool  val)
inline

Definition at line 185 of file MolWriters.h.

void RDKit::SDWriter::setProps ( const STR_VECT propNames)
virtual

set a vector of property names that are need to be written out for each molecule

Implements RDKit::MolWriter.

void RDKit::SDWriter::write ( const ROMol mol,
int  confId = defaultConfId 
)
virtual

write a new molecule to the file

Implements RDKit::MolWriter.


The documentation for this class was generated from the following file: