RDKit::SmilesMolSupplier Class Reference

lazy file parser for Smiles tables More...

`#include <MolSupplier.h>`

Inheritance diagram for RDKit::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 ()
| 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 | init ()
void | reset ()
ROMol * | next ()
bool | atEnd ()
void | moveTo (unsigned int idx)
ROMol * | operator[] (unsigned int idx)
std::string | getItemText (unsigned int idx)
| returns the text block for a particular item More...
unsigned int | length ()
Public Member Functions inherited from RDKit::MolSupplier
| MolSupplier ()
virtual | ~MolSupplier ()

## Additional Inherited Members

Protected Attributes inherited from RDKit::MolSupplier
std::istream * | dp_inStream
bool | df_owner

## Detailed Description

lazy file parser for Smiles tables

Definition at line 171 of file MolSupplier.h.

## Constructor & Destructor Documentation

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

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 seperated 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

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

RDKit::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`
| ) |  |

explicit

RDKit::SmilesMolSupplier::~SmilesMolSupplier | ( |  | ) |

## Member Function Documentation

bool RDKit::SmilesMolSupplier::atEnd | ( |  | ) |

virtual

Implements RDKit::MolSupplier.

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

returns the text block for a particular item

Parameters

  idx | - which item to return

void RDKit::SmilesMolSupplier::init | ( |  | ) |

virtual

Implements RDKit::MolSupplier.

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

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

ROMol* RDKit::SmilesMolSupplier::next | ( |  | ) |

virtual

Implements RDKit::MolSupplier.

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

void RDKit::SmilesMolSupplier::reset | ( |  | ) |

virtual

Implements RDKit::MolSupplier.

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

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

- MolSupplier.h