17#ifndef RD_MOLBUNDLE_AUG2017
18#define RD_MOLBUNDLE_AUG2017
25#include <boost/smart_ptr.hpp>
50 virtual const std::vector<boost::shared_ptr<ROMol>> &
getMols()
const {
63 virtual const boost::shared_ptr<ROMol>
getMol(
size_t idx)
const {
64 if (idx >=
d_mols.size()) {
70 virtual const boost::shared_ptr<ROMol>
operator[](
size_t idx)
const {
75 std::vector<boost::shared_ptr<ROMol>>
d_mols;
105 if (
nmol->getNumAtoms() !=
d_mols[0]->getNumAtoms()) {
107 "all molecules in a bundle must have the same number of atoms");
110 if (
nmol->getNumBonds() !=
d_mols[0]->getNumBonds()) {
112 "all molecules in a bundle must have the same number of bonds");
#define PRECONDITION(expr, mess)
Class to allow us to throw an IndexError from C++ and have it make it back to Python.
FixedMolSizeMolBundle(const FixedMolSizeMolBundle &other)
copy constructor
~FixedMolSizeMolBundle() override=default
size_t addMol(boost::shared_ptr< ROMol > nmol) override
MolBundle contains a collection of related ROMols.
std::vector< boost::shared_ptr< ROMol > > d_mols
virtual const boost::shared_ptr< ROMol > operator[](size_t idx) const
returns a particular molecule from the bundle
virtual size_t size() const
returns the number of molecules from the bundle
MolBundle(const MolBundle &other)
copy constructor
virtual const std::vector< boost::shared_ptr< ROMol > > & getMols() const
returns our molecules
virtual const boost::shared_ptr< ROMol > getMol(size_t idx) const
returns a particular molecule in the bundle
virtual size_t addMol(boost::shared_ptr< ROMol > nmol)
adds a new molecule and returns the total number of molecules
Class to allow us to throw a ValueError from C++ and have it make it back to Python.
bool rdvalue_is(const RDValue_cast_t)