RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::v1::SDMolSupplier Class Reference

#include <MolSupplier.v1API.h>

Inheritance diagram for RDKit::v1::SDMolSupplier:
RDKit::v1::ForwardSDMolSupplier RDKit::v1::MolSupplier

Public Types

using ContainedType = v2::FileParsers::SDMolSupplier
 
- Public Types inherited from RDKit::v1::ForwardSDMolSupplier
using ContainedType = v2::FileParsers::ForwardSDMolSupplier
 

Public Member Functions

 SDMolSupplier ()
 
 SDMolSupplier (const std::string &fileName, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
 
 SDMolSupplier (std::istream *inStream, bool takeOwnership=true, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
 
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 setData (const std::string &text, bool sanitize, bool removeHs, bool strictParsing)
 
void setStreamIndices (const std::vector< std::streampos > &locs)
 
- Public Member Functions inherited from RDKit::v1::ForwardSDMolSupplier
 ForwardSDMolSupplier ()
 
 ForwardSDMolSupplier (std::istream *inStream, bool takeOwnership=true, bool sanitize=true, bool removeHs=true, bool strictParsing=false)
 
 ~ForwardSDMolSupplier () override
 
void setProcessPropertyLists (bool val)
 
bool getProcessPropertyLists () const
 
bool getEOFHitOnRead () const
 
- Public Member Functions inherited from RDKit::v1::MolSupplier
 MolSupplier ()
 
virtual ~MolSupplier ()
 
void init ()
 
void reset ()
 
bool atEnd ()
 
ROMolnext ()
 
virtual void close ()
 

Additional Inherited Members

- Protected Attributes inherited from RDKit::v1::MolSupplier
std::unique_ptr< v2::FileParsers::MolSupplierdp_supplier
 

Detailed Description

Definition at line 128 of file MolSupplier.v1API.h.

Member Typedef Documentation

◆ ContainedType

Constructor & Destructor Documentation

◆ SDMolSupplier() [1/3]

RDKit::v1::SDMolSupplier::SDMolSupplier ( )
inline

Definition at line 143 of file MolSupplier.v1API.h.

◆ SDMolSupplier() [2/3]

RDKit::v1::SDMolSupplier::SDMolSupplier ( const std::string &  fileName,
bool  sanitize = true,
bool  removeHs = true,
bool  strictParsing = true 
)
inlineexplicit
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)
strictParsing- if set to false, the parser is more lax about correctness of the contents.

Definition at line 154 of file MolSupplier.v1API.h.

References RDKit::v2::FileParsers::MolFileParserParams::removeHs, RDKit::v2::FileParsers::MolFileParserParams::sanitize, and RDKit::v2::FileParsers::MolFileParserParams::strictParsing.

◆ SDMolSupplier() [3/3]

RDKit::v1::SDMolSupplier::SDMolSupplier ( std::istream *  inStream,
bool  takeOwnership = true,
bool  sanitize = true,
bool  removeHs = true,
bool  strictParsing = true 
)
inlineexplicit

Member Function Documentation

◆ getItemText()

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

returns the text block for a particular item

Parameters
idx- which item to return

Definition at line 188 of file MolSupplier.v1API.h.

References PRECONDITION.

◆ length()

unsigned int RDKit::v1::SDMolSupplier::length ( )
inline

Definition at line 192 of file MolSupplier.v1API.h.

References PRECONDITION.

◆ moveTo()

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

Definition at line 174 of file MolSupplier.v1API.h.

References PRECONDITION.

◆ operator[]()

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

Definition at line 178 of file MolSupplier.v1API.h.

References PRECONDITION.

◆ setData() [1/2]

void RDKit::v1::SDMolSupplier::setData ( const std::string &  text,
bool  sanitize,
bool  removeHs,
bool  strictParsing 
)
inline

◆ setData() [2/2]

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

◆ setStreamIndices()

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

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.

Definition at line 224 of file MolSupplier.v1API.h.

References PRECONDITION.


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