RDKit::ROMol Class Reference

ROMol is a molecule class that is intended to have a fixed topology. More...

#include <ROMol.h>

Inheritance diagram for RDKit::ROMol:

RDKit::RWMol

List of all members.

Public Types

typedef
boost::property_map
< MolGraph,
vertex_atom_t
GRAPH_MOL_ATOM_PMAP
typedef
boost::property_map
< MolGraph,
edge_bond_t
GRAPH_MOL_BOND_PMAP
typedef
boost::graph_traits
< MolGraph
GRAPH_MOL_TRAITS
typedef
GRAPH_MOL_TRAITS::edge_iterator 
EDGE_ITER
typedef
GRAPH_MOL_TRAITS::out_edge_iterator 
OEDGE_ITER
typedef
GRAPH_MOL_TRAITS::vertex_iterator 
VERTEX_ITER
typedef
GRAPH_MOL_TRAITS::adjacency_iterator 
ADJ_ITER
typedef std::pair
< EDGE_ITER,
EDGE_ITER
BOND_ITER_PAIR
typedef std::pair
< OEDGE_ITER,
OEDGE_ITER
OBOND_ITER_PAIR
typedef std::pair
< VERTEX_ITER,
VERTEX_ITER
ATOM_ITER_PAIR
typedef std::pair
< ADJ_ITER, ADJ_ITER
ADJ_ITER_PAIR
typedef std::vector
< ATOM_SPTR
ATOM_SPTR_VECT
typedef
ATOM_SPTR_VECT::iterator 
ATOM_SPTR_VECT_I
typedef
ATOM_SPTR_VECT::const_iterator 
ATOM_SPTR_VECT_CI
typedef std::vector
< BOND_SPTR
BOND_SPTR_VECT
typedef
BOND_SPTR_VECT::iterator 
BOND_SPTR_VECT_I
typedef
BOND_SPTR_VECT::const_iterator 
BOND_SPTR_VECT_CI
typedef std::vector
< Atom * > 
ATOM_PTR_VECT
typedef
ATOM_PTR_VECT::iterator 
ATOM_PTR_VECT_I
typedef
ATOM_PTR_VECT::const_iterator 
ATOM_PTR_VECT_CI
typedef std::vector
< Bond * > 
BOND_PTR_VECT
typedef
BOND_PTR_VECT::iterator 
BOND_PTR_VECT_I
typedef
BOND_PTR_VECT::const_iterator 
BOND_PTR_VECT_CI
typedef std::list
< Atom * > 
ATOM_PTR_LIST
typedef
ATOM_PTR_LIST::iterator 
ATOM_PTR_LIST_I
typedef
ATOM_PTR_LIST::const_iterator 
ATOM_PTR_LIST_CI
typedef std::list
< Bond * > 
BOND_PTR_LIST
typedef
BOND_PTR_LIST::iterator 
BOND_PTR_LIST_I
typedef
BOND_PTR_LIST::const_iterator 
BOND_PTR_LIST_CI
typedef std::list
< CONFORMER_SPTR
CONF_SPTR_LIST
typedef
CONF_SPTR_LIST::iterator 
CONF_SPTR_LIST_I
typedef
CONF_SPTR_LIST::const_iterator 
CONF_SPTR_LIST_CI
typedef std::pair
< CONF_SPTR_LIST_I,
CONF_SPTR_LIST_I
CONFS_I_PAIR
typedef AtomGRAPH_NODE_TYPE
typedef BondGRAPH_EDGE_TYPE
typedef Atom const * GRAPH_NODE_CONST_TYPE
typedef Bond const * GRAPH_EDGE_CONST_TYPE
typedef std::map
< int, ATOM_PTR_LIST
ATOM_BOOKMARK_MAP
typedef std::map
< int, BOND_PTR_LIST
BOND_BOOKMARK_MAP
typedef class
AtomIterator_< Atom,
ROMol,
GRAPH_MOL_ATOM_PMAP::type > 
AtomIterator
typedef class
AtomIterator_< const
Atom, const ROMol,
GRAPH_MOL_ATOM_PMAP::const_type > 
ConstAtomIterator
typedef class
AromaticAtomIterator_
< Atom, ROMol,
GRAPH_MOL_ATOM_PMAP::type > 
AromaticAtomIterator
typedef class
AromaticAtomIterator_
< const Atom, const
ROMol,
GRAPH_MOL_ATOM_PMAP::const_type > 
ConstAromaticAtomIterator
typedef class
HeteroatomIterator_
< Atom, ROMol,
GRAPH_MOL_ATOM_PMAP::type > 
HeteroatomIterator
typedef class
HeteroatomIterator_
< const Atom, const
ROMol,
GRAPH_MOL_ATOM_PMAP::const_type > 
ConstHeteroatomIterator
typedef class
QueryAtomIterator_
< Atom, ROMol,
GRAPH_MOL_ATOM_PMAP::type > 
QueryAtomIterator
typedef class
QueryAtomIterator_
< const Atom, const
ROMol,
GRAPH_MOL_ATOM_PMAP::const_type > 
ConstQueryAtomIterator
typedef class
BondIterator_ 
BondIterator
typedef class
ConstBondIterator_ 
ConstBondIterator
typedef CONF_SPTR_LIST_I ConformerIterator
typedef CONF_SPTR_LIST_CI ConstConformerIterator

Public Member Functions

 ROMol ()
 ROMol (const ROMol &other, bool quickCopy=false)
 copy constructor with a twist
 ROMol (const std::string &binStr)
 construct a molecule from a pickle string
virtual ~ROMol ()
unsigned int getNumAtoms (bool onlyHeavy=1) const
 returns our number of Atoms
GRAPH_NODE_TYPE getAtomWithIdx (unsigned int idx)
 returns a pointer to a particular Atom
GRAPH_NODE_CONST_TYPE getAtomWithIdx (unsigned int idx) const
unsigned int getAtomDegree (const Atom *at) const
 returns the degree (number of neighbors) of an Atom in the graph
unsigned int getAtomDegree (ATOM_SPTR at) const
unsigned int getNumBonds (bool onlyHeavy=1) const
 returns our number of Bonds
GRAPH_EDGE_TYPE getBondWithIdx (unsigned int idx)
 returns a pointer to a particular Bond
GRAPH_EDGE_CONST_TYPE getBondWithIdx (unsigned int idx) const
GRAPH_EDGE_TYPE getBondBetweenAtoms (unsigned int idx1, unsigned int idx2)
 returns a pointer to the bond between two atoms, Null on failure
GRAPH_EDGE_CONST_TYPE getBondBetweenAtoms (unsigned int idx1, unsigned int idx2) const
void setAtomBookmark (ATOM_SPTR at, int mark)
 associates an Atom pointer with a bookmark
void setAtomBookmark (Atom *at, int mark)
GRAPH_NODE_TYPE getAtomWithBookmark (int mark)
 returns the first Atom associated with the bookmark provided
ATOM_PTR_LISTgetAllAtomsWithBookmark (int mark)
 returns all Atoms associated with the bookmark provided
void clearAtomBookmark (const int mark)
 removes a bookmark from our collection
void clearAtomBookmark (const int mark, const Atom *atom)
 removes a particular Atom from the list associated with the bookmark
void clearAtomBookmark (const int mark, ATOM_SPTR atom)
void clearAllAtomBookmarks ()
 blows out all atomic bookmarks
bool hasAtomBookmark (int mark) const
 queries whether or not any atoms are associated with a bookmark
ATOM_BOOKMARK_MAPgetAtomBookmarks ()
 returns a pointer to all of our atom bookmarks
void setBondBookmark (BOND_SPTR bond, int mark)
 associates a Bond pointer with a bookmark
void setBondBookmark (Bond *bond, int mark)
GRAPH_EDGE_TYPE getBondWithBookmark (int mark)
 returns the first Bond associated with the bookmark provided
BOND_PTR_LISTgetAllBondsWithBookmark (int mark)
 returns all bonds associated with the bookmark provided
void clearBondBookmark (int mark)
 removes a bookmark from our collection
void clearBondBookmark (int mark, const Bond *bond)
 removes a particular Bond from the list associated with the bookmark
void clearBondBookmark (int mark, BOND_SPTR bond)
void clearAllBondBookmarks ()
 blows out all bond bookmarks
bool hasBondBookmark (int mark)
 queries whether or not any bonds are associated with a bookmark
BOND_BOOKMARK_MAPgetBondBookmarks ()
 returns a pointer to all of our bond bookmarks
ADJ_ITER_PAIR getAtomNeighbors (Atom const *at) const
 provides access to all neighbors around an Atom
ADJ_ITER_PAIR getAtomNeighbors (ATOM_SPTR at) const
OBOND_ITER_PAIR getAtomBonds (Atom const *at) const
 provides access to all Bond objects connected to an Atom
GRAPH_MOL_ATOM_PMAP::type getAtomPMap ()
 returns the atom PMap
GRAPH_MOL_BOND_PMAP::type getBondPMap ()
 returns the bond PMap (required to use Bond iterators)
GRAPH_MOL_ATOM_PMAP::const_type getAtomPMap () const
GRAPH_MOL_BOND_PMAP::const_type getBondPMap () const
ATOM_ITER_PAIR getVertices ()
 returns an iterator pair for looping over all Atoms
BOND_ITER_PAIR getEdges ()
 returns an iterator pair for looping over all Bonds
ATOM_ITER_PAIR getVertices () const
BOND_ITER_PAIR getEdges () const
MolGraph const * getTopology () const
 brief returns a pointer to our underlying BGL object
void debugMol (std::ostream &str) const
 sends some debugging info to a stream
AtomIterator beginAtoms ()
 get an AtomIterator pointing at our first Atom
ConstAtomIterator beginAtoms () const
AtomIterator endAtoms ()
 get an AtomIterator pointing at the end of our Atoms
ConstAtomIterator endAtoms () const
AromaticAtomIterator beginAromaticAtoms ()
 get an AtomIterator pointing at our first aromatic Atom
ConstAromaticAtomIterator beginAromaticAtoms () const
AromaticAtomIterator endAromaticAtoms ()
 get an AtomIterator pointing at the end of our Atoms
ConstAromaticAtomIterator endAromaticAtoms () const
HeteroatomIterator beginHeteros ()
 get an AtomIterator pointing at our first hetero Atom
ConstHeteroatomIterator beginHeteros () const
HeteroatomIterator endHeteros ()
 get an AtomIterator pointing at the end of our Atoms
ConstHeteroatomIterator endHeteros () const
QueryAtomIterator beginQueryAtoms (QueryAtom const *query)
 get an AtomIterator pointing at our first Atom that matches query
ConstQueryAtomIterator beginQueryAtoms (QueryAtom const *) const
QueryAtomIterator endQueryAtoms ()
 gte an AtomIterator pointing at the end of our Atoms
ConstQueryAtomIterator endQueryAtoms () const
BondIterator beginBonds ()
 get a BondIterator pointing at our first Bond
ConstBondIterator beginBonds () const
BondIterator endBonds ()
 get a BondIterator pointing at the end of our Bonds
ConstBondIterator endBonds () const
STR_VECT getPropList () const
 returns a list with the names of our properties
template<typename T>
void setProp (const char *key, T val, bool computed=false) const
 sets a property value
template<typename T>
void setProp (const std::string key, T val, bool computed=false) const
template<typename T>
void getProp (const char *key, T &res) const
 allows retrieval of a particular property value
template<typename T>
void getProp (const std::string key, T &res) const
bool hasProp (const char *key) const
 returns whether or not we have a property with name key
bool hasProp (const std::string key) const
void clearProp (const char *key) const
 clears the value of a property
void clearProp (const std::string key) const
void clearComputedProps (bool includeRings=true) const
 clears all of our computed properties
void updatePropertyCache (bool strict=true)
 calculates any of our lazy properties
RingInfogetRingInfo () const
 returns a pointer to our RingInfo structure
const ConformergetConformer (int id=-1) const
ConformergetConformer (int id=-1)
void removeConformer (unsigned int id)
 Delete the conformation with the specified ID.
void clearConformers ()
 Clear all the conformations on the molecule.
unsigned int addConformer (Conformer *conf, bool assignId=false)
 Add a new conformation to the molecule.
unsigned int getNumConformers () const
 return a reference to the list of conformers
ConformerIterator beginConformers ()
ConformerIterator endConformers ()
ConstConformerIterator beginConformers () const
ConstConformerIterator endConformers () const

Friends

class MolPickler
class RWMol


Detailed Description

ROMol is a molecule class that is intended to have a fixed topology.

This is the primary class for most molecule operations.

If you need to be manipulating the molecule (e.g. adding or deleting atoms or bonds, use an RWMol instead.

Notes:

Definition at line 93 of file ROMol.h.


Member Typedef Documentation

typedef boost::property_map<MolGraph,vertex_atom_t> RDKit::ROMol::GRAPH_MOL_ATOM_PMAP

Definition at line 99 of file ROMol.h.

typedef boost::property_map<MolGraph,edge_bond_t> RDKit::ROMol::GRAPH_MOL_BOND_PMAP

Definition at line 100 of file ROMol.h.

typedef boost::graph_traits<MolGraph> RDKit::ROMol::GRAPH_MOL_TRAITS

Definition at line 101 of file ROMol.h.

typedef GRAPH_MOL_TRAITS::edge_iterator RDKit::ROMol::EDGE_ITER

Definition at line 102 of file ROMol.h.

typedef GRAPH_MOL_TRAITS::out_edge_iterator RDKit::ROMol::OEDGE_ITER

Definition at line 103 of file ROMol.h.

typedef GRAPH_MOL_TRAITS::vertex_iterator RDKit::ROMol::VERTEX_ITER

Definition at line 104 of file ROMol.h.

typedef GRAPH_MOL_TRAITS::adjacency_iterator RDKit::ROMol::ADJ_ITER

Definition at line 105 of file ROMol.h.

typedef std::pair<EDGE_ITER,EDGE_ITER> RDKit::ROMol::BOND_ITER_PAIR

Definition at line 106 of file ROMol.h.

typedef std::pair<OEDGE_ITER,OEDGE_ITER> RDKit::ROMol::OBOND_ITER_PAIR

Definition at line 107 of file ROMol.h.

typedef std::pair<VERTEX_ITER,VERTEX_ITER> RDKit::ROMol::ATOM_ITER_PAIR

Definition at line 108 of file ROMol.h.

typedef std::pair<ADJ_ITER,ADJ_ITER> RDKit::ROMol::ADJ_ITER_PAIR

Definition at line 109 of file ROMol.h.

typedef std::vector<ATOM_SPTR> RDKit::ROMol::ATOM_SPTR_VECT

Definition at line 111 of file ROMol.h.

typedef ATOM_SPTR_VECT::iterator RDKit::ROMol::ATOM_SPTR_VECT_I

Definition at line 112 of file ROMol.h.

typedef ATOM_SPTR_VECT::const_iterator RDKit::ROMol::ATOM_SPTR_VECT_CI

Definition at line 113 of file ROMol.h.

typedef std::vector<BOND_SPTR> RDKit::ROMol::BOND_SPTR_VECT

Definition at line 114 of file ROMol.h.

typedef BOND_SPTR_VECT::iterator RDKit::ROMol::BOND_SPTR_VECT_I

Definition at line 115 of file ROMol.h.

typedef BOND_SPTR_VECT::const_iterator RDKit::ROMol::BOND_SPTR_VECT_CI

Definition at line 116 of file ROMol.h.

typedef std::vector<Atom *> RDKit::ROMol::ATOM_PTR_VECT

Definition at line 118 of file ROMol.h.

typedef ATOM_PTR_VECT::iterator RDKit::ROMol::ATOM_PTR_VECT_I

Definition at line 119 of file ROMol.h.

typedef ATOM_PTR_VECT::const_iterator RDKit::ROMol::ATOM_PTR_VECT_CI

Definition at line 120 of file ROMol.h.

typedef std::vector<Bond *> RDKit::ROMol::BOND_PTR_VECT

Definition at line 121 of file ROMol.h.

typedef BOND_PTR_VECT::iterator RDKit::ROMol::BOND_PTR_VECT_I

Definition at line 122 of file ROMol.h.

typedef BOND_PTR_VECT::const_iterator RDKit::ROMol::BOND_PTR_VECT_CI

Definition at line 123 of file ROMol.h.

typedef std::list<Atom *> RDKit::ROMol::ATOM_PTR_LIST

Definition at line 125 of file ROMol.h.

typedef ATOM_PTR_LIST::iterator RDKit::ROMol::ATOM_PTR_LIST_I

Definition at line 126 of file ROMol.h.

typedef ATOM_PTR_LIST::const_iterator RDKit::ROMol::ATOM_PTR_LIST_CI

Definition at line 127 of file ROMol.h.

typedef std::list<Bond *> RDKit::ROMol::BOND_PTR_LIST

Definition at line 128 of file ROMol.h.

typedef BOND_PTR_LIST::iterator RDKit::ROMol::BOND_PTR_LIST_I

Definition at line 129 of file ROMol.h.

typedef BOND_PTR_LIST::const_iterator RDKit::ROMol::BOND_PTR_LIST_CI

Definition at line 130 of file ROMol.h.

typedef std::list<CONFORMER_SPTR> RDKit::ROMol::CONF_SPTR_LIST

Definition at line 133 of file ROMol.h.

typedef CONF_SPTR_LIST::iterator RDKit::ROMol::CONF_SPTR_LIST_I

Definition at line 134 of file ROMol.h.

typedef CONF_SPTR_LIST::const_iterator RDKit::ROMol::CONF_SPTR_LIST_CI

Definition at line 135 of file ROMol.h.

typedef std::pair<CONF_SPTR_LIST_I, CONF_SPTR_LIST_I> RDKit::ROMol::CONFS_I_PAIR

Definition at line 136 of file ROMol.h.

typedef Atom* RDKit::ROMol::GRAPH_NODE_TYPE

Definition at line 139 of file ROMol.h.

typedef Bond* RDKit::ROMol::GRAPH_EDGE_TYPE

Definition at line 140 of file ROMol.h.

typedef Atom const* RDKit::ROMol::GRAPH_NODE_CONST_TYPE

Definition at line 141 of file ROMol.h.

typedef Bond const* RDKit::ROMol::GRAPH_EDGE_CONST_TYPE

Definition at line 142 of file ROMol.h.

typedef std::map<int,ATOM_PTR_LIST> RDKit::ROMol::ATOM_BOOKMARK_MAP

Definition at line 143 of file ROMol.h.

typedef std::map<int,BOND_PTR_LIST> RDKit::ROMol::BOND_BOOKMARK_MAP

Definition at line 144 of file ROMol.h.

typedef class AtomIterator_< Atom, ROMol, GRAPH_MOL_ATOM_PMAP::type > RDKit::ROMol::AtomIterator

Definition at line 146 of file ROMol.h.

typedef class AtomIterator_< const Atom, const ROMol, GRAPH_MOL_ATOM_PMAP::const_type > RDKit::ROMol::ConstAtomIterator

Definition at line 147 of file ROMol.h.

typedef class AromaticAtomIterator_< Atom, ROMol, GRAPH_MOL_ATOM_PMAP::type > RDKit::ROMol::AromaticAtomIterator

Definition at line 148 of file ROMol.h.

typedef class AromaticAtomIterator_< const Atom, const ROMol, GRAPH_MOL_ATOM_PMAP::const_type > RDKit::ROMol::ConstAromaticAtomIterator

Definition at line 149 of file ROMol.h.

typedef class HeteroatomIterator_< Atom, ROMol, GRAPH_MOL_ATOM_PMAP::type > RDKit::ROMol::HeteroatomIterator

Definition at line 150 of file ROMol.h.

typedef class HeteroatomIterator_< const Atom, const ROMol, GRAPH_MOL_ATOM_PMAP::const_type > RDKit::ROMol::ConstHeteroatomIterator

Definition at line 151 of file ROMol.h.

typedef class QueryAtomIterator_< Atom, ROMol, GRAPH_MOL_ATOM_PMAP::type > RDKit::ROMol::QueryAtomIterator

Definition at line 152 of file ROMol.h.

typedef class QueryAtomIterator_< const Atom, const ROMol, GRAPH_MOL_ATOM_PMAP::const_type > RDKit::ROMol::ConstQueryAtomIterator

Definition at line 153 of file ROMol.h.

typedef class BondIterator_ RDKit::ROMol::BondIterator

Definition at line 154 of file ROMol.h.

typedef class ConstBondIterator_ RDKit::ROMol::ConstBondIterator

Definition at line 155 of file ROMol.h.

typedef CONF_SPTR_LIST_I RDKit::ROMol::ConformerIterator

Definition at line 157 of file ROMol.h.

typedef CONF_SPTR_LIST_CI RDKit::ROMol::ConstConformerIterator

Definition at line 158 of file ROMol.h.


Constructor & Destructor Documentation

RDKit::ROMol::ROMol (  )  [inline]

Definition at line 160 of file ROMol.h.

RDKit::ROMol::ROMol ( const ROMol other,
bool  quickCopy = false 
) [inline]

copy constructor with a twist

Parameters:
other the molecule to be copied
quickCopy (optional) if this is true, the resulting ROMol will not copy any of the properties or bookmarks and conformers from other. This can make the copy substantially faster (thus the name).

Definition at line 169 of file ROMol.h.

RDKit::ROMol::ROMol ( const std::string &  binStr  ) 

construct a molecule from a pickle string

virtual RDKit::ROMol::~ROMol (  )  [inline, virtual]

Definition at line 173 of file ROMol.h.


Member Function Documentation

unsigned int RDKit::ROMol::getNumAtoms ( bool  onlyHeavy = 1  )  const

returns our number of Atoms

Referenced by RDKit::RWMol::getLastAtom().

GRAPH_NODE_TYPE RDKit::ROMol::getAtomWithIdx ( unsigned int  idx  ) 

returns a pointer to a particular Atom

Referenced by RDKit::RWMol::getLastAtom().

GRAPH_NODE_CONST_TYPE RDKit::ROMol::getAtomWithIdx ( unsigned int  idx  )  const

unsigned int RDKit::ROMol::getAtomDegree ( const Atom at  )  const

returns the degree (number of neighbors) of an Atom in the graph

unsigned int RDKit::ROMol::getAtomDegree ( ATOM_SPTR  at  )  const

unsigned int RDKit::ROMol::getNumBonds ( bool  onlyHeavy = 1  )  const

returns our number of Bonds

Referenced by RDKit::FragCatalogEntry::getOrder().

GRAPH_EDGE_TYPE RDKit::ROMol::getBondWithIdx ( unsigned int  idx  ) 

returns a pointer to a particular Bond

GRAPH_EDGE_CONST_TYPE RDKit::ROMol::getBondWithIdx ( unsigned int  idx  )  const

GRAPH_EDGE_TYPE RDKit::ROMol::getBondBetweenAtoms ( unsigned int  idx1,
unsigned int  idx2 
)

returns a pointer to the bond between two atoms, Null on failure

GRAPH_EDGE_CONST_TYPE RDKit::ROMol::getBondBetweenAtoms ( unsigned int  idx1,
unsigned int  idx2 
) const

void RDKit::ROMol::setAtomBookmark ( ATOM_SPTR  at,
int  mark 
) [inline]

associates an Atom pointer with a bookmark

Definition at line 218 of file ROMol.h.

void RDKit::ROMol::setAtomBookmark ( Atom at,
int  mark 
) [inline]

Definition at line 220 of file ROMol.h.

GRAPH_NODE_TYPE RDKit::ROMol::getAtomWithBookmark ( int  mark  ) 

returns the first Atom associated with the bookmark provided

ATOM_PTR_LIST& RDKit::ROMol::getAllAtomsWithBookmark ( int  mark  ) 

returns all Atoms associated with the bookmark provided

void RDKit::ROMol::clearAtomBookmark ( const int  mark  ) 

removes a bookmark from our collection

Referenced by clearAtomBookmark().

void RDKit::ROMol::clearAtomBookmark ( const int  mark,
const Atom atom 
)

removes a particular Atom from the list associated with the bookmark

void RDKit::ROMol::clearAtomBookmark ( const int  mark,
ATOM_SPTR  atom 
) [inline]

Definition at line 230 of file ROMol.h.

References clearAtomBookmark().

void RDKit::ROMol::clearAllAtomBookmarks (  )  [inline]

blows out all atomic bookmarks

Definition at line 232 of file ROMol.h.

bool RDKit::ROMol::hasAtomBookmark ( int  mark  )  const [inline]

queries whether or not any atoms are associated with a bookmark

Definition at line 234 of file ROMol.h.

ATOM_BOOKMARK_MAP* RDKit::ROMol::getAtomBookmarks (  )  [inline]

returns a pointer to all of our atom bookmarks

Definition at line 236 of file ROMol.h.

void RDKit::ROMol::setBondBookmark ( BOND_SPTR  bond,
int  mark 
) [inline]

associates a Bond pointer with a bookmark

Definition at line 239 of file ROMol.h.

void RDKit::ROMol::setBondBookmark ( Bond bond,
int  mark 
) [inline]

Definition at line 241 of file ROMol.h.

GRAPH_EDGE_TYPE RDKit::ROMol::getBondWithBookmark ( int  mark  ) 

returns the first Bond associated with the bookmark provided

BOND_PTR_LIST& RDKit::ROMol::getAllBondsWithBookmark ( int  mark  ) 

returns all bonds associated with the bookmark provided

void RDKit::ROMol::clearBondBookmark ( int  mark  ) 

removes a bookmark from our collection

Referenced by clearBondBookmark().

void RDKit::ROMol::clearBondBookmark ( int  mark,
const Bond bond 
)

removes a particular Bond from the list associated with the bookmark

void RDKit::ROMol::clearBondBookmark ( int  mark,
BOND_SPTR  bond 
) [inline]

Definition at line 251 of file ROMol.h.

References clearBondBookmark().

void RDKit::ROMol::clearAllBondBookmarks (  )  [inline]

blows out all bond bookmarks

Definition at line 253 of file ROMol.h.

bool RDKit::ROMol::hasBondBookmark ( int  mark  )  [inline]

queries whether or not any bonds are associated with a bookmark

Definition at line 255 of file ROMol.h.

BOND_BOOKMARK_MAP* RDKit::ROMol::getBondBookmarks (  )  [inline]

returns a pointer to all of our bond bookmarks

Definition at line 257 of file ROMol.h.

ADJ_ITER_PAIR RDKit::ROMol::getAtomNeighbors ( Atom const *  at  )  const

provides access to all neighbors around an Atom

Parameters:
at the atom whose neighbors we are looking for
Usage
        ... molPtr is a const ROMol * ...
        ... atomPtr is a const Atom * ...
        ROMol::ADJ_ITER nbrIdx,endNbrs;
        boost::tie(nbrIdx,endNbrs) = molPtr->getAtomNeighbors(atomPtr);
        while(nbrIdx!=endNbrs){
          const Atom *at=molPtr->getAtomWithIdx(*nbrIdx);
          ... do something with the Atom ...
          nbrIdx++;
        }

Notes:

ADJ_ITER_PAIR RDKit::ROMol::getAtomNeighbors ( ATOM_SPTR  at  )  const

OBOND_ITER_PAIR RDKit::ROMol::getAtomBonds ( Atom const *  at  )  const

provides access to all Bond objects connected to an Atom

Parameters:
at the atom whose neighbors we are looking for
Usage
        ... molPtr is a const ROMol * ...
        ... atomPtr is a const Atom * ...
        ROMol::OEDGE_ITER beg,end;
        ROMol::GRAPH_MOL_BOND_PMAP::const_type pMap = molPtr->getBondPMap();
        boost::tie(beg,end) = molPtr->getAtomBonds(atomPtr);
        while(beg!=end){
          const Bond *bond=pMap[*beg];
          ... do something with the Bond ...
          beg++;
        }
or, if you need a non-const Bond *:
        ... molPtr is a ROMol * ...
        ... atomPtr is a const Atom * ...
        ROMol::OEDGE_ITER beg,end;
        ROMol::GRAPH_MOL_BOND_PMAP::type pMap = molPtr->getBondPMap();
        boost::tie(beg,end) = molPtr->getAtomBonds(atomPtr);
        while(beg!=end){
          Bond *bond=pMap[*beg];
          ... do something with the Bond ...
          beg++;
        }

Referenced by RDKit::queryAtomRingBondCount().

GRAPH_MOL_ATOM_PMAP::type RDKit::ROMol::getAtomPMap (  ) 

returns the atom PMap

GRAPH_MOL_BOND_PMAP::type RDKit::ROMol::getBondPMap (  ) 

returns the bond PMap (required to use Bond iterators)

Referenced by RDKit::queryAtomRingBondCount().

GRAPH_MOL_ATOM_PMAP::const_type RDKit::ROMol::getAtomPMap (  )  const

GRAPH_MOL_BOND_PMAP::const_type RDKit::ROMol::getBondPMap (  )  const

ATOM_ITER_PAIR RDKit::ROMol::getVertices (  ) 

returns an iterator pair for looping over all Atoms

Usage

        ... molPtr is an ROMol * ...
        ROMol::GRAPH_MOL_ATOM_PMAP::type atomMap = molPtr->getAtomPMap();
        ROMol::VERTEX_ITER atBegin,atEnd;
        boost::tie(atBegin,atEnd) = mol.getVertices();  
        while(atBegin!=atEnd){
          Atom *at2=atomMap[*atBegin];
          ... do something with the Atom ...
          atBegin++;
        }

BOND_ITER_PAIR RDKit::ROMol::getEdges (  ) 

returns an iterator pair for looping over all Bonds

Usage

        ... molPtr is a ROMol * ...
        ROMol::EDGE_ITER firstB,lastB;
        boost::tie(firstB,lastB) = mol.getEdges();
        ROMol::GRAPH_MOL_BOND_PMAP::type bondMap = mol.getBondPMap();
        while(firstB!=lastB){
          Bond *bond = bondMap[*firstB];
          ... do something with the Bond ...
          firstB++;
        }

ATOM_ITER_PAIR RDKit::ROMol::getVertices (  )  const

BOND_ITER_PAIR RDKit::ROMol::getEdges (  )  const

MolGraph const* RDKit::ROMol::getTopology (  )  const [inline]

brief returns a pointer to our underlying BGL object

This can be useful if you need to call other BGL algorithms:

Here's an example:

           ... mol is a const ROMol ...
           ... mapping is an INT_VECT ...
           mapping.resize(mol.getNumAtoms());
           const MolGraph *G_p = mol.getTopology();
           int res = boost::connected_components(*G_p,&mapping[0]);

Definition at line 387 of file ROMol.h.

void RDKit::ROMol::debugMol ( std::ostream &  str  )  const

sends some debugging info to a stream

AtomIterator RDKit::ROMol::beginAtoms (  ) 

get an AtomIterator pointing at our first Atom

ConstAtomIterator RDKit::ROMol::beginAtoms (  )  const

AtomIterator RDKit::ROMol::endAtoms (  ) 

get an AtomIterator pointing at the end of our Atoms

ConstAtomIterator RDKit::ROMol::endAtoms (  )  const

AromaticAtomIterator RDKit::ROMol::beginAromaticAtoms (  ) 

get an AtomIterator pointing at our first aromatic Atom

ConstAromaticAtomIterator RDKit::ROMol::beginAromaticAtoms (  )  const

AromaticAtomIterator RDKit::ROMol::endAromaticAtoms (  ) 

get an AtomIterator pointing at the end of our Atoms

ConstAromaticAtomIterator RDKit::ROMol::endAromaticAtoms (  )  const

HeteroatomIterator RDKit::ROMol::beginHeteros (  ) 

get an AtomIterator pointing at our first hetero Atom

ConstHeteroatomIterator RDKit::ROMol::beginHeteros (  )  const

HeteroatomIterator RDKit::ROMol::endHeteros (  ) 

get an AtomIterator pointing at the end of our Atoms

ConstHeteroatomIterator RDKit::ROMol::endHeteros (  )  const

QueryAtomIterator RDKit::ROMol::beginQueryAtoms ( QueryAtom const *  query  ) 

get an AtomIterator pointing at our first Atom that matches query

ConstQueryAtomIterator RDKit::ROMol::beginQueryAtoms ( QueryAtom const *   )  const

QueryAtomIterator RDKit::ROMol::endQueryAtoms (  ) 

gte an AtomIterator pointing at the end of our Atoms

ConstQueryAtomIterator RDKit::ROMol::endQueryAtoms (  )  const

BondIterator RDKit::ROMol::beginBonds (  ) 

get a BondIterator pointing at our first Bond

ConstBondIterator RDKit::ROMol::beginBonds (  )  const

BondIterator RDKit::ROMol::endBonds (  ) 

get a BondIterator pointing at the end of our Bonds

ConstBondIterator RDKit::ROMol::endBonds (  )  const

STR_VECT RDKit::ROMol::getPropList (  )  const [inline]

returns a list with the names of our properties

Definition at line 450 of file ROMol.h.

References RDKit::Dict::keys().

template<typename T>
void RDKit::ROMol::setProp ( const char *  key,
val,
bool  computed = false 
) const [inline]

sets a property value

Parameters:
key the name under which the property should be stored. If a property is already stored under this name, it will be replaced.
val the value to be stored
computed (optional) allows the property to be flagged computed.

Definition at line 464 of file ROMol.h.

template<typename T>
void RDKit::ROMol::setProp ( const std::string  key,
val,
bool  computed = false 
) const [inline]

Definition at line 470 of file ROMol.h.

References getProp(), and RDKit::Dict::setVal().

template<typename T>
void RDKit::ROMol::getProp ( const char *  key,
T &  res 
) const [inline]

allows retrieval of a particular property value

Parameters:
key the name under which the property should be stored. If a property is already stored under this name, it will be replaced.
res a reference to the storage location for the value.
Notes:

Definition at line 497 of file ROMol.h.

References RDKit::Dict::getVal().

Referenced by clearProp(), and setProp().

template<typename T>
void RDKit::ROMol::getProp ( const std::string  key,
T &  res 
) const [inline]

Definition at line 502 of file ROMol.h.

References RDKit::Dict::getVal().

bool RDKit::ROMol::hasProp ( const char *  key  )  const [inline]

returns whether or not we have a property with name key

Definition at line 508 of file ROMol.h.

References RDKit::Dict::hasVal().

bool RDKit::ROMol::hasProp ( const std::string  key  )  const [inline]

Definition at line 513 of file ROMol.h.

References RDKit::Dict::hasVal().

void RDKit::ROMol::clearProp ( const char *  key  )  const [inline]

clears the value of a property

Notes:

Definition at line 527 of file ROMol.h.

void RDKit::ROMol::clearProp ( const std::string  key  )  const [inline]

Definition at line 532 of file ROMol.h.

References RDKit::Dict::clearVal(), getProp(), and RDKit::Dict::setVal().

void RDKit::ROMol::clearComputedProps ( bool  includeRings = true  )  const

clears all of our computed properties

void RDKit::ROMol::updatePropertyCache ( bool  strict = true  ) 

calculates any of our lazy properties

Notes:

RingInfo* RDKit::ROMol::getRingInfo (  )  const [inline]

returns a pointer to our RingInfo structure

Definition at line 554 of file ROMol.h.

Referenced by RDKit::queryAtomIsInRingOfSize(), RDKit::queryAtomMinRingSize(), RDKit::queryAtomRingBondCount(), RDKit::queryAtomRingMembership(), RDKit::queryBondIsInRingOfSize(), RDKit::queryBondMinRingSize(), RDKit::queryIsAtomInNRings(), RDKit::queryIsAtomInRing(), RDKit::queryIsBondInNRings(), and RDKit::queryIsBondInRing().

const Conformer& RDKit::ROMol::getConformer ( int  id = -1  )  const

return the conformer with a specified ID if the ID is negative the first conformation will be returned

Conformer& RDKit::ROMol::getConformer ( int  id = -1  ) 

return the conformer with a specified ID if the ID is negative the first conformation will be returned

void RDKit::ROMol::removeConformer ( unsigned int  id  ) 

Delete the conformation with the specified ID.

void RDKit::ROMol::clearConformers (  )  [inline]

Clear all the conformations on the molecule.

Definition at line 568 of file ROMol.h.

unsigned int RDKit::ROMol::addConformer ( Conformer conf,
bool  assignId = false 
)

Add a new conformation to the molecule.

Parameters:
conf - conformation to be added to the molecule, this molecule takes ownership of the conformer
assignId - a unique ID will be assigned to the the conformation if true otherwise it is assumed that the conformation already has an (unique) ID set

unsigned int RDKit::ROMol::getNumConformers (  )  const [inline]

return a reference to the list of conformers

Definition at line 589 of file ROMol.h.

ConformerIterator RDKit::ROMol::beginConformers (  )  [inline]

Definition at line 593 of file ROMol.h.

ConformerIterator RDKit::ROMol::endConformers (  )  [inline]

Definition at line 597 of file ROMol.h.

ConstConformerIterator RDKit::ROMol::beginConformers (  )  const [inline]

Definition at line 601 of file ROMol.h.

ConstConformerIterator RDKit::ROMol::endConformers (  )  const [inline]

Definition at line 605 of file ROMol.h.


Friends And Related Function Documentation

friend class MolPickler [friend]

Definition at line 95 of file ROMol.h.

friend class RWMol [friend]

Definition at line 96 of file ROMol.h.


The documentation for this class was generated from the following file:
Generated on Sat May 24 08:36:34 2008 for RDCode by  doxygen 1.5.3