RDKit
Open-source cheminformatics and machine learning.
RDKit::CachedTrustedSmilesMolHolder Class Reference

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

#include <SubstructLibrary.h>

Inheritance diagram for RDKit::CachedTrustedSmilesMolHolder:
RDKit::MolHolderBase

Public Member Functions

 CachedTrustedSmilesMolHolder ()
 
virtual unsigned int addMol (const ROMol &m)
 
unsigned int addSmiles (const std::string &smiles)
 
virtual boost::shared_ptr< ROMolgetMol (unsigned int idx) const
 
virtual unsigned int size () const
 Get the current library size. More...
 
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 trusted smiles strings in memory.

A trusted smiles is essentially a smiles string that RDKit has generated. This indicates that fewer sanitization steps are required. See http://rdkit.blogspot.com/2016/09/avoiding-unnecessary-work-and.html

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 196 of file SubstructLibrary.h.

Constructor & Destructor Documentation

◆ CachedTrustedSmilesMolHolder()

RDKit::CachedTrustedSmilesMolHolder::CachedTrustedSmilesMolHolder ( )
inline

Definition at line 201 of file SubstructLibrary.h.

Member Function Documentation

◆ addMol()

virtual unsigned int RDKit::CachedTrustedSmilesMolHolder::addMol ( const ROMol m)
inlinevirtual

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

Implements RDKit::MolHolderBase.

Definition at line 203 of file SubstructLibrary.h.

References RDKit::MolToSmiles().

◆ addSmiles()

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

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

Definition at line 211 of file SubstructLibrary.h.

◆ getMol()

virtual boost::shared_ptr<ROMol> RDKit::CachedTrustedSmilesMolHolder::getMol ( unsigned int  idx) const
inlinevirtual

◆ getMols() [1/2]

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

Definition at line 228 of file SubstructLibrary.h.

◆ getMols() [2/2]

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

Definition at line 229 of file SubstructLibrary.h.

◆ size()

virtual unsigned int RDKit::CachedTrustedSmilesMolHolder::size ( ) const
inlinevirtual

Get the current library size.

Implements RDKit::MolHolderBase.

Definition at line 224 of file SubstructLibrary.h.


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