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

MolBundle contains a collection of related ROMols. More...

#include <MolBundle.h>

Inheritance diagram for RDKit::MolBundle:
RDKit::RDProps RDKit::FixedMolSizeMolBundle

Public Member Functions

 MolBundle ()
 
 MolBundle (const MolBundle &other)
 copy constructor More...
 
virtual ~MolBundle ()
 
virtual const std::vector< boost::shared_ptr< ROMol > > & getMols () const
 returns our molecules More...
 
virtual size_t addMol (boost::shared_ptr< ROMol > nmol)
 adds a new molecule and returns the total number of molecules More...
 
virtual size_t size () const
 returns the number of molecules from the bundle More...
 
virtual const boost::shared_ptr< ROMolgetMol (size_t idx) const
 returns a particular molecule in the bundle More...
 
virtual const boost::shared_ptr< ROMoloperator[] (size_t idx) const
 returns a particular molecule from the bundle More...
 
- Public Member Functions inherited from RDKit::RDProps
 RDProps ()
 
 RDProps (const RDProps &rhs)
 
RDPropsoperator= (const RDProps &rhs)
 
 RDProps (RDProps &&o) noexcept=default
 
RDPropsoperator= (RDProps &&rhs) noexcept=default
 
void clear ()
 
const DictgetDict () const
 gets the underlying Dictionary More...
 
DictgetDict ()
 
STR_VECT getPropList (bool includePrivate=true, bool includeComputed=true) const
 returns a list with the names of our properties More...
 
template<typename T >
void setProp (const std::string &key, T val, bool computed=false) const
 sets a property value More...
 
template<typename T >
void getProp (const std::string &key, T &res) const
 allows retrieval of a particular property value More...
 
template<typename 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. More...
 
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. More...
 
void clearProp (const std::string &key) const
 clears the value of a property More...
 
void clearComputedProps () const
 clears all of our computed properties More...
 
void updateProps (const RDProps &source, bool preserveExisting=false)
 update the properties from another More...
 

Protected Attributes

std::vector< boost::shared_ptr< ROMol > > d_mols
 
- Protected Attributes inherited from RDKit::RDProps
Dict d_props
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MolBundle() [1/2]

RDKit::MolBundle::MolBundle ( )
inline

Definition at line 41 of file MolBundle.h.

◆ MolBundle() [2/2]

RDKit::MolBundle::MolBundle ( const MolBundle other)
inline

copy constructor

Definition at line 44 of file MolBundle.h.

References d_mols.

◆ ~MolBundle()

virtual RDKit::MolBundle::~MolBundle ( )
inlinevirtual

Definition at line 47 of file MolBundle.h.

Member Function Documentation

◆ addMol()

virtual size_t RDKit::MolBundle::addMol ( boost::shared_ptr< ROMol nmol)
inlinevirtual

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, and PRECONDITION.

◆ getMol()

virtual const boost::shared_ptr<ROMol> RDKit::MolBundle::getMol ( size_t  idx) const
inlinevirtual

returns a particular molecule in the bundle

Definition at line 63 of file MolBundle.h.

References d_mols.

Referenced by operator[]().

◆ getMols()

virtual const std::vector<boost::shared_ptr<ROMol> >& RDKit::MolBundle::getMols ( ) const
inlinevirtual

returns our molecules

Definition at line 50 of file MolBundle.h.

References d_mols.

◆ operator[]()

virtual const boost::shared_ptr<ROMol> RDKit::MolBundle::operator[] ( size_t  idx) const
inlinevirtual

returns a particular molecule from the bundle

Definition at line 70 of file MolBundle.h.

References getMol().

◆ size()

virtual size_t RDKit::MolBundle::size ( ) const
inlinevirtual

returns the number of molecules from the bundle

Definition at line 61 of file MolBundle.h.

References d_mols.

Member Data Documentation

◆ d_mols

std::vector<boost::shared_ptr<ROMol> > RDKit::MolBundle::d_mols
protected

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