RDKit: RDKit::v1::SDMolSupplier Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
RDKit::v1::SDMolSupplier Class Reference

`#include <MolSupplier.v1API.h>`

Inheritance diagram for RDKit::v1::SDMolSupplier:

## 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)
ROMol * | operator[] (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 ()
ROMol * | next ()
virtual void | close ()

## Additional Inherited Members
Protected Attributes inherited from RDKit::v1::MolSupplier
std::unique_ptr< v2::FileParsers::MolSupplier > | dp_supplier

## Detailed Description

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

## Member Typedef Documentation

## ◆ ContainedType

using RDKit::v1::SDMolSupplier::ContainedType = v2::FileParsers::SDMolSupplier

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

## Constructor & Destructor Documentation

## ◆ SDMolSupplier() [1/3]

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

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

References RDKit::v1::MolSupplier::dp_supplier.

## ◆ 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::v1::MolSupplier::dp_supplier, 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

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

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

## 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 RDKit::v1::MolSupplier::dp_supplier, and PRECONDITION.

## ◆ length()

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

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

References RDKit::v1::MolSupplier::dp_supplier, and PRECONDITION.

## ◆ moveTo()

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

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

References RDKit::v1::MolSupplier::dp_supplier, and PRECONDITION.

## ◆ operator[]()

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

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

References RDKit::v1::MolSupplier::dp_supplier, and PRECONDITION.

## ◆ setData() [1/2]

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

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

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

## ◆ setData() [2/2]

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

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

References RDKit::v1::MolSupplier::dp_supplier, PRECONDITION, RDKit::v2::FileParsers::MolFileParserParams::removeHs, and RDKit::v2::FileParsers::MolFileParserParams::sanitize.

## ◆ 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 RDKit::v1::MolSupplier::dp_supplier, and PRECONDITION.

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

- MolSupplier.v1API.h