RDKit: RDKit::FixedMolSizeMolBundle Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
RDKit::FixedMolSizeMolBundle Class Reference

`#include <MolBundle.h>`

Inheritance diagram for RDKit::FixedMolSizeMolBundle:

## Public Member Functions
| FixedMolSizeMolBundle ()
| FixedMolSizeMolBundle (const FixedMolSizeMolBundle &other)
| copy constructor
| ~FixedMolSizeMolBundle () override=default
size_t | addMol (boost::shared_ptr< ROMol > nmol) override
Public Member Functions inherited from RDKit::MolBundle
| MolBundle ()
| MolBundle (const MolBundle &other)
| copy constructor
| MolBundle (const std::string &pkl)
virtual | ~MolBundle ()
MolBundle & | operator= (const MolBundle &other)=default
virtual const std::vector< boost::shared_ptr< ROMol > > & | getMols () const
| returns our molecules
virtual size_t | size () const
| returns the number of molecules from the bundle
virtual bool | empty () const
| returns whether or not the bundle is empty
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
void | toStream (std::ostream &ss) const
| serializes (pickles) to a stream
std::string | serialize () const
| returns a string with a serialized (pickled) representation
void | initFromStream (std::istream &ss)
| initializes from a stream pickle
void | initFromString (const std::string &text)
| initializes from a string pickle
Public Member Functions inherited from RDKit::RDProps
| 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

## Additional Inherited Members
Protected Attributes inherited from RDKit::MolBundle
std::vector< boost::shared_ptr< ROMol > > | d_mols
Protected Attributes inherited from RDKit::RDProps
Dict | d_props

## Detailed Description

FixedMolSizeMolBundle contains a collection of ROMols with the same number of atoms and bonds.

This is designed to allow handling things like enhanced stereochemistry, but can no doubt be (ab)used in other ways.

Implementation note: at the moment this isn't taking advantage of the fact that the number of atoms and bonds remains constant. This may be used in the future to allow this to be more efficient.

Definition at line 173 of file MolBundle.h.

## Constructor & Destructor Documentation

## ◆ FixedMolSizeMolBundle() [1/2]

RDKit::FixedMolSizeMolBundle::FixedMolSizeMolBundle | ( |  | ) |
| inline

Definition at line 175 of file MolBundle.h.

References RDKit::MolBundle::MolBundle().

Referenced by FixedMolSizeMolBundle().

## ◆ FixedMolSizeMolBundle() [2/2]

RDKit::FixedMolSizeMolBundle::FixedMolSizeMolBundle | ( | const FixedMolSizeMolBundle & | other | ) |
| inline

copy constructor

Definition at line 178 of file MolBundle.h.

References FixedMolSizeMolBundle(), and RDKit::MolBundle::MolBundle().

## ◆ ~FixedMolSizeMolBundle()

RDKit::FixedMolSizeMolBundle::~FixedMolSizeMolBundle | ( |  | ) |
| overridedefault

## Member Function Documentation

## ◆ addMol()

size_t RDKit::FixedMolSizeMolBundle::addMol | ( | boost::shared_ptr< ROMol > | nmol | ) |
| inlineoverridevirtual

adds a new molecule and returns the total number of molecules enforces that the new molecule has the same number of atoms and bonds as the molecules that are already there.

Reimplemented from RDKit::MolBundle.

Definition at line 186 of file MolBundle.h.

References RDKit::MolBundle::d_mols, and PRECONDITION.

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

- MolBundle.h