Public Member Functions

RDKit::SDWriter Class Reference

#include <MolWriters.h>

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

List of all members.

Public Member Functions

 SDWriter (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
void write (ROMol &mol, int confId=defaultConfId)
 write a new molecule to the file
void flush ()
 flush the ostream
void close ()
 close our stream (the writer cannot be used again)
unsigned int numMols () const
 get the number of molecules written so far

Detailed Description

The SDWriter is for writing molecules and properties to SD files

Definition at line 124 of file MolWriters.h.


Constructor & Destructor Documentation

RDKit::SDWriter::SDWriter ( 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 (  )  [inline, virtual]

close our stream (the writer cannot be used again)

Implements RDKit::MolWriter.

Definition at line 154 of file MolWriters.h.

References PRECONDITION.

void RDKit::SDWriter::flush (  )  [inline, virtual]

flush the ostream

Implements RDKit::MolWriter.

Definition at line 148 of file MolWriters.h.

References PRECONDITION.

unsigned int RDKit::SDWriter::numMols (  )  const [inline, virtual]

get the number of molecules written so far

Implements RDKit::MolWriter.

Definition at line 169 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 ( 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: