![]() |
RDKit
Open-source cheminformatics and machine learning.
|
MolBundle contains a collection of related ROMols. More...
#include <MolBundle.h>
Public Member Functions | |
MolBundle () | |
MolBundle (const MolBundle &other) | |
copy constructor | |
virtual | ~MolBundle () |
virtual const std::vector< boost::shared_ptr< ROMol > > & | getMols () const |
returns our molecules | |
virtual size_t | addMol (boost::shared_ptr< ROMol > nmol) |
adds a new molecule and returns the total number of molecules | |
virtual size_t | size () const |
returns the number of molecules from the bundle | |
virtual const boost::shared_ptr< ROMol > | getMol (size_t idx) const |
returns a particular molecule in the bundle | |
virtual const boost::shared_ptr< ROMol > | operator[] (size_t idx) const |
returns a particular molecule from the bundle | |
![]() | |
RDProps () | |
RDProps (const RDProps &rhs) | |
RDProps & | operator= (const RDProps &rhs) |
RDProps (RDProps &&o) noexcept=default | |
RDProps & | operator= (RDProps &&rhs) noexcept=default |
void | clear () |
const Dict & | getDict () const |
gets the underlying Dictionary | |
Dict & | getDict () |
STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const |
returns a list with the names of our properties | |
template<typename T > | |
void | setProp (const std::string &key, T val, bool computed=false) const |
sets a property value | |
template<typename T > | |
void | getProp (const std::string &key, T &res) const |
allows retrieval of a particular property value | |
template<typename T > | |
T | getProp (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. | |
template<typename T > | |
bool | getPropIfPresent (const std::string &key, T &res) const |
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 std::string &key) const |
clears the value of a property | |
void | clearComputedProps () const |
clears all of our computed properties | |
void | updateProps (const RDProps &source, bool preserveExisting=false) |
update the properties from another | |
Protected Attributes | |
std::vector< boost::shared_ptr< ROMol > > | d_mols |
![]() | |
Dict | d_props |
MolBundle contains a collection of related ROMols.
This is designed to allow handling things like enumerating link nodes, polymers, etc.
Definition at line 39 of file MolBundle.h.
|
inline |
Definition at line 41 of file MolBundle.h.
copy constructor
Definition at line 44 of file MolBundle.h.
References d_mols, and RDKit::rdvalue_is().
|
inlinevirtual |
Definition at line 47 of file MolBundle.h.
adds a new molecule and returns the total number of molecules
Reimplemented in RDKit::FixedMolSizeMolBundle.
Definition at line 55 of file MolBundle.h.
References d_mols, PRECONDITION, and RDKit::rdvalue_is().
returns a particular molecule in the bundle
Definition at line 63 of file MolBundle.h.
References d_mols.
Referenced by operator[]().
|
inlinevirtual |
returns a particular molecule from the bundle
Definition at line 70 of file MolBundle.h.
References getMol().
returns the number of molecules from the bundle
Definition at line 61 of file MolBundle.h.
References d_mols.
|
protected |
Definition at line 75 of file MolBundle.h.
Referenced by addMol(), RDKit::FixedMolSizeMolBundle::addMol(), getMol(), getMols(), MolBundle(), and size().