RDKit::SDMolSupplier Class Reference

#include <MolSupplier.h>

Inheritance diagram for RDKit::SDMolSupplier:

RDKit::MolSupplier

List of all members.

Public Member Functions

 SDMolSupplier ()
 SDMolSupplier (const std::string &fileName, bool sanitize=true, bool removeHs=true)
 SDMolSupplier (std::istream *inStream, bool takeOwnership=true, bool sanitize=true, bool removeHs=true)
 ~SDMolSupplier ()
void init ()
void reset ()
ROMolnext ()
bool atEnd ()
void moveTo (unsigned int idx)
ROMoloperator[] (unsigned int idx)
std::string getItemText (unsigned int idx)
 returns the text block for a particular item
unsigned int length ()
void setData (const std::string &text, bool sanitize=true, bool removeHs=true)
void setStreamIndices (const std::vector< std::streampos > &locs)


Detailed Description

Definition at line 64 of file MolSupplier.h.


Constructor & Destructor Documentation

RDKit::SDMolSupplier::SDMolSupplier (  )  [inline]

Definition at line 75 of file MolSupplier.h.

References init().

RDKit::SDMolSupplier::SDMolSupplier ( const std::string &  fileName,
bool  sanitize = true,
bool  removeHs = true 
) [explicit]

Parameters:
fileName - the name of the SD file
sanitize - if true sanitize the molecule before returning it
removeHs - if true remove Hs from the molecule before returning it (triggers sanitization)

RDKit::SDMolSupplier::SDMolSupplier ( std::istream *  inStream,
bool  takeOwnership = true,
bool  sanitize = true,
bool  removeHs = true 
) [explicit]

RDKit::SDMolSupplier::~SDMolSupplier (  ) 


Member Function Documentation

void RDKit::SDMolSupplier::init (  )  [virtual]

Implements RDKit::MolSupplier.

Referenced by SDMolSupplier().

void RDKit::SDMolSupplier::reset (  )  [virtual]

Implements RDKit::MolSupplier.

ROMol* RDKit::SDMolSupplier::next (  )  [virtual]

Implements RDKit::MolSupplier.

bool RDKit::SDMolSupplier::atEnd (  )  [virtual]

Implements RDKit::MolSupplier.

void RDKit::SDMolSupplier::moveTo ( unsigned int  idx  ) 

ROMol* RDKit::SDMolSupplier::operator[] ( unsigned int  idx  ) 

std::string RDKit::SDMolSupplier::getItemText ( unsigned int  idx  ) 

returns the text block for a particular item

Parameters:
idx - which item to return

unsigned int RDKit::SDMolSupplier::length (  ) 

void RDKit::SDMolSupplier::setData ( const std::string &  text,
bool  sanitize = true,
bool  removeHs = true 
)

void RDKit::SDMolSupplier::setStreamIndices ( const std::vector< std::streampos > &  locs  ) 

Resets our internal state and sets the indices of molecules in the stream. The client should be *very* careful about calling this method, as it's trivial to end up with a completely useless supplier.

Parameters:
locs - the vector of stream positions.
Note that this can be used not only to make reading selected molecules from a large SD file much faster, but it can also allow subsetting an SD file or rearranging the order of the molecules.


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

Generated on Tue Oct 7 06:10:12 2008 for RDCode by  doxygen 1.5.5