RDKit: RDKit::v2::FileParsers::SmilesMolSupplier Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
RDKit::v2::FileParsers::SmilesMolSupplier Class Reference

lazy file parser for Smiles tables More...

`#include <MolSupplier.h>`

Inheritance diagram for RDKit::v2::FileParsers::SmilesMolSupplier:

## Public Member Functions
| SmilesMolSupplier (const std::string &fileName, const SmilesMolSupplierParams &params=SmilesMolSupplierParams())
| SmilesMolSupplier ()
| SmilesMolSupplier (std::istream *inStream, bool takeOwnership=true, const SmilesMolSupplierParams &params=SmilesMolSupplierParams())
| ~SmilesMolSupplier () override
void | setData (const std::string &text, const SmilesMolSupplierParams &params=SmilesMolSupplierParams())
void | init () override
void | reset () override
std::unique_ptr< RWMol > | next () override
bool | atEnd () override
void | moveTo (unsigned int idx)
std::unique_ptr< RWMol > | 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::v2::FileParsers::MolSupplier
| MolSupplier ()
virtual | ~MolSupplier ()
virtual void | close ()

## Additional Inherited Members
Protected Member Functions inherited from RDKit::v2::FileParsers::MolSupplier
std::istream * | openAndCheckStream (const std::string &filename)
Protected Attributes inherited from RDKit::v2::FileParsers::MolSupplier
std::istream * | dp_inStream = nullptr
bool | df_owner = false

## Detailed Description

lazy file parser for Smiles tables

Definition at line 248 of file MolSupplier.h.

## Constructor & Destructor Documentation

## ◆ SmilesMolSupplier() [1/3]

RDKit::v2::FileParsers::SmilesMolSupplier::SmilesMolSupplier | ( | const std::string & | fileName,
|  | const SmilesMolSupplierParams & | params = SmilesMolSupplierParams() )
| 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

## ◆ SmilesMolSupplier() [2/3]

RDKit::v2::FileParsers::SmilesMolSupplier::SmilesMolSupplier | ( |  | ) |

## ◆ SmilesMolSupplier() [3/3]

RDKit::v2::FileParsers::SmilesMolSupplier::SmilesMolSupplier | ( | std::istream * | inStream,
|  | bool | takeOwnership = true,
|  | const SmilesMolSupplierParams & | params = SmilesMolSupplierParams() )
| explicit

## ◆ ~SmilesMolSupplier()

RDKit::v2::FileParsers::SmilesMolSupplier::~SmilesMolSupplier | ( |  | ) |
| inlineoverride

Definition at line 289 of file MolSupplier.h.

References RDKit::v2::FileParsers::MolSupplier::close().

## Member Function Documentation

## ◆ atEnd()

bool RDKit::v2::FileParsers::SmilesMolSupplier::atEnd | ( |  | ) |
| overridevirtual

Implements RDKit::v2::FileParsers::MolSupplier.

## ◆ getItemText()

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

returns the text block for a particular item

Parameters

  idx | - which item to return

## ◆ init()

void RDKit::v2::FileParsers::SmilesMolSupplier::init | ( |  | ) |
| overridevirtual

Implements RDKit::v2::FileParsers::MolSupplier.

## ◆ length()

unsigned int RDKit::v2::FileParsers::SmilesMolSupplier::length | ( |  | ) |

## ◆ moveTo()

void RDKit::v2::FileParsers::SmilesMolSupplier::moveTo | ( | unsigned int | idx | ) |

## ◆ next()

std::unique_ptr< RWMol > RDKit::v2::FileParsers::SmilesMolSupplier::next | ( |  | ) |
| overridevirtual

Implements RDKit::v2::FileParsers::MolSupplier.

## ◆ operator[]()

std::unique_ptr< RWMol > RDKit::v2::FileParsers::SmilesMolSupplier::operator[] | ( | unsigned int | idx | ) |

## ◆ reset()

void RDKit::v2::FileParsers::SmilesMolSupplier::reset | ( |  | ) |
| overridevirtual

Implements RDKit::v2::FileParsers::MolSupplier.

## ◆ setData()

void RDKit::v2::FileParsers::SmilesMolSupplier::setData | ( | const std::string & | text,
|  | const SmilesMolSupplierParams & | params = SmilesMolSupplierParams() )

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

- MolSupplier.h