16 #ifndef __RD_RWMOL_H__ 17 #define __RD_RWMOL_H__ 44 RWMol(
const ROMol &other,
bool quickCopy =
false,
int confId = -1)
45 :
ROMol(other, quickCopy, confId) {
46 d_partialBonds.clear();
64 unsigned int addAtom(
bool updateLabel =
true);
78 bool takeOwnership =
false) {
79 return ROMol::addAtom(atom, updateLabel, takeOwnership);
97 return ROMol::addAtom(atom, updateLabel);
109 void replaceAtom(
unsigned int idx,
Atom *atom,
bool updateLabel =
false,
110 bool preserveProps =
false);
137 unsigned int addBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx,
156 return ROMol::addBond(bond, takeOwnership);
210 void removeBond(
unsigned int beginAtomIdx,
unsigned int endAtomIdx);
219 void replaceBond(
unsigned int idx,
Bond *bond,
bool preserveProps=
false);
225 d_atomBookmarks.clear();
226 d_bondBookmarks.clear();
233 if (dp_ringInfo) dp_ringInfo->reset();
237 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 setVal(const std::string &what, T &val)
Sets the value associated with a key.
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 getNumAtoms(bool onlyExplicit=1) const
returns our number of atoms
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 replaceBond(unsigned int idx, Bond *bond, bool preserveProps=false)
replaces a particular Bond
void replaceAtom(unsigned int idx, Atom *atom, bool updateLabel=false, bool preserveProps=false)
replaces a particular Atom
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
boost::shared_ptr< RWMol > RWMOL_SPTR
unsigned int addAtom(ATOM_SPTR atom, bool updateLabel=true)
adds an Atom to our collection
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
void reset()
Clears all keys (and values) from the dictionary.
const std::string computedPropName
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