RDKit: RDKit::CachedSmilesMolHolder Class Reference

| RDKit Open-source cheminformatics and machine learning.

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

Concrete class that holds smiles strings in memory. More...

`#include <SubstructLibrary.h>`

Inheritance diagram for RDKit::CachedSmilesMolHolder:

## Public Member Functions
| CachedSmilesMolHolder ()
unsigned int | addMol (const ROMol &m) override
unsigned int | addSmiles (const std::string &smiles)
boost::shared_ptr< ROMol > | getMol (unsigned int idx) const override
unsigned int | size () const override
| Get the current library size.
std::vector< std::string > & | getMols ()
const std::vector< std::string > & | getMols () const
Public Member Functions inherited from RDKit::MolHolderBase
virtual | ~MolHolderBase ()

## Detailed Description

Concrete class that holds smiles strings in memory.

This implementation uses quite a bit less memory than the cached binary or uncached implementation. However, due to the reduced speed it should be used in conjunction with a pattern fingerprinter.

See RDKit::FPHolder

Definition at line 166 of file SubstructLibrary.h.

## Constructor & Destructor Documentation

## ◆ CachedSmilesMolHolder()

RDKit::CachedSmilesMolHolder::CachedSmilesMolHolder | ( |  | ) |
| inline

Definition at line 171 of file SubstructLibrary.h.

## Member Function Documentation

## ◆ addMol()

unsigned int RDKit::CachedSmilesMolHolder::addMol | ( | const ROMol & | m | ) |
| inlineoverridevirtual

Add a new molecule to the substructure search library Returns the molecules index in the library

Implements RDKit::MolHolderBase.

Definition at line 173 of file SubstructLibrary.h.

References RDKit::MolToSmiles(), and size().

## ◆ addSmiles()

unsigned int RDKit::CachedSmilesMolHolder::addSmiles | ( | const std::string & | smiles | ) |
| inline

Add a smiles to the dataset, no validation is done to the inputs.

Definition at line 181 of file SubstructLibrary.h.

References size().

## ◆ getMol()

boost::shared_ptr< ROMol > RDKit::CachedSmilesMolHolder::getMol | ( | unsigned int | idx | ) | const
| inlineoverridevirtual

Implements RDKit::MolHolderBase.

Definition at line 186 of file SubstructLibrary.h.

## ◆ getMols() [1/2]

std::vector< std::string > & RDKit::CachedSmilesMolHolder::getMols | ( |  | ) |
| inline

Definition at line 199 of file SubstructLibrary.h.

## ◆ getMols() [2/2]

const std::vector< std::string > & RDKit::CachedSmilesMolHolder::getMols | ( |  | ) | const
| inline

Definition at line 200 of file SubstructLibrary.h.

## ◆ size()

unsigned int RDKit::CachedSmilesMolHolder::size | ( |  | ) | const
| inlineoverridevirtual

Get the current library size.

Implements RDKit::MolHolderBase.

Definition at line 195 of file SubstructLibrary.h.

References rdcast.

Referenced by addMol(), and addSmiles().

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

- SubstructLibrary.h