16 #ifndef __RD_RWMOL_H__ 17 #define __RD_RWMOL_H__ 33 RWMol() { d_partialBonds.clear(); }
44 RWMol(
const ROMol &other,
bool quickCopy=
false,
int confId=-1) {
45 d_partialBonds.clear();
46 initFromOther(other,quickCopy,confId);
65 unsigned int addAtom(
bool updateLabel=
true);
77 unsigned int addAtom(
Atom *atom,
bool updateLabel=
true,
bool takeOwnership=
false){
78 return ROMol::addAtom(atom,updateLabel,takeOwnership);
95 return ROMol::addAtom(atom,updateLabel);
134 unsigned int addBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx,
153 return ROMol::addBond(bond,takeOwnership);
165 return ROMol::addBond(bsp);
209 void removeBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx);
214 d_atomBookmarks.clear();
215 d_bondBookmarks.clear();
223 if(dp_ringInfo) dp_ringInfo->reset();
228 std::vector<BOND_SPTR> d_partialBonds;
boost::shared_ptr< Bond > BOND_SPTR
void clear()
removes all atoms, bonds, properties, bookmarks, etc.
std::vector< RWMOL_SPTR > RWMOL_SPTR_VECT
void insertMol(const ROMol &other)
insert the atoms and bonds from other into this molecule
RWMol is a molecule class that is intended to be edited.
unsigned int addAtom(bool updateLabel=true)
adds an empty Atom to our collection
unsigned int addBond(BOND_SPTR bsp)
adds a Bond to our collection
Defines the primary molecule class ROMol as well as associated typedefs.
boost::shared_ptr< Atom > ATOM_SPTR
void replaceAtom(unsigned int idx, Atom *atom, bool updateLabel=false)
replaces a particular Atom
unsigned int getNumAtoms(bool onlyExplicit=1) const
returns our number of atoms
ROMol is a molecule class that is intended to have a fixed topology.
RWMol(const ROMol &other, bool quickCopy=false, int confId=-1)
copy constructor with a twist
unsigned int finishPartialBond(unsigned int endAtomIdx, int bondBookmark, Bond::BondType order=Bond::UNSPECIFIED)
finishes a partially constructed bond
Bond * createPartialBond(unsigned int beginAtomIdx, Bond::BondType order=Bond::UNSPECIFIED)
starts a Bond and sets its beginAtomIdx
Includes a bunch of functionality for handling Atom and Bond queries.
boost::shared_ptr< RWMol > RWMOL_SPTR
unsigned int addAtom(ATOM_SPTR atom, bool updateLabel=true)
adds an Atom to our collection
const std::string computedPropName
void removeBond(unsigned int beginAtomIdx, unsigned int endAtomIdx)
removes a bond from the molecule
class for representing a bond
unsigned int addBond(Bond *bond, bool takeOwnership=false)
adds a Bond to our collection
void removeAtom(unsigned int idx)
removes an Atom from the molecule
void setActiveAtom(Atom *atom)
sets our activeAtom
RWMol & operator=(const RWMol &)
Atom * getAtomWithIdx(unsigned int idx)
returns a pointer to a particular Atom
Atom * getActiveAtom()
returns a pointer to the "active" Atom
unsigned int addAtom(Atom *atom, bool updateLabel=true, bool takeOwnership=false)
adds an Atom to our collection
The class for representing atoms.
Atom * getLastAtom()
returns a pointer to the highest-numbered Atom
std::vector< std::string > STR_VECT
unsigned int addBond(unsigned int beginAtomIdx, unsigned int endAtomIdx, Bond::BondType order=Bond::UNSPECIFIED)
adds a Bond between the indicated Atoms