RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::MolCatalogEntry Class Reference

This class is used to store ROMol objects in a MolCatalog. More...

#include <MolCatalogEntry.h>

Inheritance diagram for RDKit::MolCatalogEntry:
RDCatalog::CatalogEntry

Public Member Functions

 MolCatalogEntry ()
 
 MolCatalogEntry (const MolCatalogEntry &other)
 copy constructor
 
 MolCatalogEntry (const ROMol *omol)
 create an entry to hold the provided ROMol
 
 MolCatalogEntry (const std::string &pickle)
 construct from a pickle
 
 ~MolCatalogEntry () override
 
std::string getDescription () const override
 returns a text description of this entry
 
void setDescription (std::string val)
 
unsigned int getOrder () const
 
void setOrder (unsigned int order)
 
const ROMolgetMol () const
 
void setMol (const ROMol *molPtr)
 hold the provided ROMol
 
template<typename T >
void setProp (const char *key, T &val) const
 set a named property
 
template<typename T >
void setProp (const std::string &key, T &val) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
void getProp (const char *key, T &res) const
 get the value of a named property
 
template<typename T >
void getProp (const std::string &key, T &res) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
bool hasProp (const char *key) const
 returns true if such a property exists
 
bool hasProp (const std::string &key) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void clearProp (const char *key) const
 clears a named property
 
void clearProp (const std::string &key) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void toStream (std::ostream &ss) const override
 serializes this entry to the stream
 
std::string Serialize () const override
 returns a serialized (pickled) form of the entry
 
void initFromStream (std::istream &ss) override
 initialize from a stream containing a pickle
 
void initFromString (const std::string &text) override
 initialize from a string containing a pickle
 
- Public Member Functions inherited from RDCatalog::CatalogEntry
virtual ~CatalogEntry ()=0
 
void setBitId (int bid)
 sets our bit Id
 
int getBitId () const
 returns our bit Id
 

Detailed Description

This class is used to store ROMol objects in a MolCatalog.

Definition at line 17 of file MolCatalogEntry.h.

Constructor & Destructor Documentation

◆ MolCatalogEntry() [1/4]

RDKit::MolCatalogEntry::MolCatalogEntry ( )
inline

Definition at line 19 of file MolCatalogEntry.h.

◆ MolCatalogEntry() [2/4]

RDKit::MolCatalogEntry::MolCatalogEntry ( const MolCatalogEntry other)

copy constructor

◆ MolCatalogEntry() [3/4]

RDKit::MolCatalogEntry::MolCatalogEntry ( const ROMol omol)

create an entry to hold the provided ROMol

The MolCatalogEntry takes ownership of the pointer

◆ MolCatalogEntry() [4/4]

RDKit::MolCatalogEntry::MolCatalogEntry ( const std::string &  pickle)
inline

construct from a pickle

Definition at line 34 of file MolCatalogEntry.h.

◆ ~MolCatalogEntry()

RDKit::MolCatalogEntry::~MolCatalogEntry ( )
override

Member Function Documentation

◆ clearProp() [1/2]

void RDKit::MolCatalogEntry::clearProp ( const char key) const
inline

clears a named property

Definition at line 87 of file MolCatalogEntry.h.

◆ clearProp() [2/2]

void RDKit::MolCatalogEntry::clearProp ( const std::string &  key) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 89 of file MolCatalogEntry.h.

References clearProp().

Referenced by clearProp().

◆ getDescription()

std::string RDKit::MolCatalogEntry::getDescription ( ) const
inlineoverridevirtual

returns a text description of this entry

Implements RDCatalog::CatalogEntry.

Definition at line 38 of file MolCatalogEntry.h.

◆ getMol()

const ROMol * RDKit::MolCatalogEntry::getMol ( ) const
inline

Definition at line 45 of file MolCatalogEntry.h.

◆ getOrder()

unsigned int RDKit::MolCatalogEntry::getOrder ( ) const
inline

Definition at line 42 of file MolCatalogEntry.h.

◆ getProp() [1/2]

template<typename T >
void RDKit::MolCatalogEntry::getProp ( const char key,
T &  res 
) const
inline

get the value of a named property

Definition at line 67 of file MolCatalogEntry.h.

◆ getProp() [2/2]

template<typename T >
void RDKit::MolCatalogEntry::getProp ( const std::string &  key,
T &  res 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 72 of file MolCatalogEntry.h.

◆ hasProp() [1/2]

bool RDKit::MolCatalogEntry::hasProp ( const char key) const
inline

returns true if such a property exists

Definition at line 77 of file MolCatalogEntry.h.

◆ hasProp() [2/2]

bool RDKit::MolCatalogEntry::hasProp ( const std::string &  key) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 84 of file MolCatalogEntry.h.

References hasProp().

Referenced by hasProp().

◆ initFromStream()

void RDKit::MolCatalogEntry::initFromStream ( std::istream &  ss)
overridevirtual

initialize from a stream containing a pickle

Implements RDCatalog::CatalogEntry.

◆ initFromString()

void RDKit::MolCatalogEntry::initFromString ( const std::string &  text)
overridevirtual

initialize from a string containing a pickle

Implements RDCatalog::CatalogEntry.

◆ Serialize()

std::string RDKit::MolCatalogEntry::Serialize ( ) const
overridevirtual

returns a serialized (pickled) form of the entry

Implements RDCatalog::CatalogEntry.

◆ setDescription()

void RDKit::MolCatalogEntry::setDescription ( std::string  val)
inline

Definition at line 40 of file MolCatalogEntry.h.

◆ setMol()

void RDKit::MolCatalogEntry::setMol ( const ROMol molPtr)

hold the provided ROMol

The MolCatalogEntry takes ownership of the pointer. If the MolCatalogEntry already has a molecule, this one will be deleted.

◆ setOrder()

void RDKit::MolCatalogEntry::setOrder ( unsigned int  order)
inline

Definition at line 43 of file MolCatalogEntry.h.

◆ setProp() [1/2]

template<typename T >
void RDKit::MolCatalogEntry::setProp ( const char key,
T &  val 
) const
inline

set a named property

Definition at line 55 of file MolCatalogEntry.h.

◆ setProp() [2/2]

template<typename T >
void RDKit::MolCatalogEntry::setProp ( const std::string &  key,
T &  val 
) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 61 of file MolCatalogEntry.h.

◆ toStream()

void RDKit::MolCatalogEntry::toStream ( std::ostream &  ss) const
overridevirtual

serializes this entry to the stream

Implements RDCatalog::CatalogEntry.


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