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

Concrete class that holds binary cached molecules in memory. More...

#include <SubstructLibrary.h>

Inheritance diagram for RDKit::CachedMolHolder:

Public Member Functions

 CachedMolHolder ()
virtual unsigned int addMol (const ROMol &m)
unsigned int addBinary (const std::string &pickle)
virtual boost::shared_ptr< ROMolgetMol (unsigned int idx) const
virtual unsigned int size () const
 Get the current library size. More...
- Public Member Functions inherited from RDKit::MolHolderBase
virtual ~MolHolderBase ()

Detailed Description

Concrete class that holds binary cached molecules in memory.

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

See RDKit::FPHolder

Definition at line 100 of file SubstructLibrary.h.

Constructor & Destructor Documentation

RDKit::CachedMolHolder::CachedMolHolder ( )

Definition at line 104 of file SubstructLibrary.h.

Member Function Documentation

unsigned int RDKit::CachedMolHolder::addBinary ( const std::string &  pickle)

Adds a pickled binary molecule, no validity checking of the input is done.

Definition at line 114 of file SubstructLibrary.h.

References RDKit::MolHolderBase::size().

virtual unsigned int RDKit::CachedMolHolder::addMol ( const ROMol m)

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

Implements RDKit::MolHolderBase.

Definition at line 106 of file SubstructLibrary.h.

References RDKit::MolPickler::pickleMol(), and RDKit::MolHolderBase::size().

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

Implements RDKit::MolHolderBase.

Definition at line 119 of file SubstructLibrary.h.

References RDKit::MolPickler::molFromPickle().

virtual unsigned int RDKit::CachedMolHolder::size ( ) const

Get the current library size.

Implements RDKit::MolHolderBase.

Definition at line 127 of file SubstructLibrary.h.

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