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 (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 ()
 

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 ( )
inlinevirtual

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 ( )
inlinevirtual

flush the ostream

Implements RDKit::MolWriter.

Definition at line 148 of file MolWriters.h.

References PRECONDITION.

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

Definition at line 168 of file MolWriters.h.

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

Definition at line 171 of file MolWriters.h.

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

get the number of molecules written so far

Implements RDKit::MolWriter.

Definition at line 165 of file MolWriters.h.

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

Definition at line 167 of file MolWriters.h.

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

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