Loading...
Searching...
No Matches
RDKit::v1::SmilesMolSupplier Class Reference

lazy file parser for Smiles tables More...

`#include <MolSupplier.v1API.h>`

Inheritance diagram for RDKit::v1::SmilesMolSupplier:

## Public Types

using | ContainedType = v2::FileParsers::SmilesMolSupplier

## Public Member Functions

| SmilesMolSupplier (const std::string &fileName, const std::string &delimiter=" \t", int smilesColumn=0, int nameColumn=1, bool titleLine=true, bool sanitize=true)
| SmilesMolSupplier (std::istream *inStream, bool takeOwnership=true, const std::string &delimiter=" \t", int smilesColumn=0, int nameColumn=1, bool titleLine=true, bool sanitize=true)
| SmilesMolSupplier ()
void | setData (const std::string &text, const std::string &delimiter=" ", int smilesColumn=0, int nameColumn=1, bool titleLine=true, bool sanitize=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 ()
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

lazy file parser for Smiles tables

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

## Member Typedef Documentation

## ContainedType

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

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

## Constructor & Destructor Documentation

## SmilesMolSupplier() [1/3]

RDKit::v1::SmilesMolSupplier::SmilesMolSupplier | ( | const std::string & | fileName,
|  | const std::string & | delimiter = " \t",
|  | int | smilesColumn = 0,
|  | int | nameColumn = 1,
|  | bool | titleLine = true,
|  | bool | sanitize = true )

inline explicit

Parameters

  fileName | - the name of smiles table file
  delimiter | - delimiting characters between records on a each line NOTE that this is not a string, the tokenizer looks for the individual characters in delimiter, not the full string itself. So the default delimiter: " \t", means " " or "\t".
  smilesColumn | - column number for the SMILES string (defaults to the first column)
  nameColumn | - column number for the molecule name (defaults to the second column) If set to -1 we assume that no name is available for the molecule and the name is defaulted to the smiles string
  titleLine | - if true, the first line is assumed to list the names of properties in order separated by 'delimiter'. It is also assume that the 'SMILES' column and the 'name' column are not specified here if false - no title line is assumed and the properties are recorded as the "columnX" where "X" is the column number
  sanitize | - if true sanitize the molecule before returning it

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

References RDKit::v2::FileParsers::SmilesMolSupplierParams::delimiter, RDKit::v1::MolSupplier::dp_supplier, RDKit::v2::FileParsers::SmilesMolSupplierParams::nameColumn, RDKit::v2::FileParsers::SmilesMolSupplierParams::parseParameters, RDKit::v2::SmilesParse::SmilesParserParams::sanitize, RDKit::v2::FileParsers::SmilesMolSupplierParams::smilesColumn, and RDKit::v2::FileParsers::SmilesMolSupplierParams::titleLine.

## SmilesMolSupplier() [2/3]

RDKit::v1::SmilesMolSupplier::SmilesMolSupplier | ( | std::istream * | inStream,
|  | bool | takeOwnership = true,
|  | const std::string & | delimiter = " \t",
|  | int | smilesColumn = 0,
|  | int | nameColumn = 1,
|  | bool | titleLine = true,
|  | bool | sanitize = true )

inline explicit

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

References RDKit::v2::FileParsers::SmilesMolSupplierParams::delimiter, RDKit::v1::MolSupplier::dp_supplier, RDKit::v2::FileParsers::SmilesMolSupplierParams::nameColumn, RDKit::v2::FileParsers::SmilesMolSupplierParams::parseParameters, RDKit::v2::SmilesParse::SmilesParserParams::sanitize, RDKit::v2::FileParsers::SmilesMolSupplierParams::smilesColumn, and RDKit::v2::FileParsers::SmilesMolSupplierParams::titleLine.

## SmilesMolSupplier() [3/3]

RDKit::v1::SmilesMolSupplier::SmilesMolSupplier | ( |  | ) |

inline

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

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

## Member Function Documentation

## getItemText()

std::string RDKit::v1::SmilesMolSupplier::getItemText | ( | unsigned int | idx | ) |

inline

returns the text block for a particular item

Parameters

  idx | - which item to return

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

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

## length()

unsigned int RDKit::v1::SmilesMolSupplier::length | ( |  | ) |

inline

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

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

## moveTo()

void RDKit::v1::SmilesMolSupplier::moveTo | ( | unsigned int | idx | ) |

inline

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

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

## operator[]()

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

inline

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

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

## setData()

void RDKit::v1::SmilesMolSupplier::setData | ( | const std::string & | text,
|  | const std::string & | delimiter = " ",
|  | int | smilesColumn = 0,
|  | int | nameColumn = 1,
|  | bool | titleLine = true,
|  | bool | sanitize = true )

inline

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

References RDKit::v2::FileParsers::SmilesMolSupplierParams::delimiter, RDKit::v1::MolSupplier::dp_supplier, RDKit::v2::FileParsers::SmilesMolSupplierParams::nameColumn, RDKit::v2::FileParsers::SmilesMolSupplierParams::parseParameters, PRECONDITION, RDKit::v2::SmilesParse::SmilesParserParams::sanitize, RDKit::v2::FileParsers::SmilesMolSupplierParams::smilesColumn, and RDKit::v2::FileParsers::SmilesMolSupplierParams::titleLine.

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

- MolSupplier.v1API.h