21 #include <boost/foreach.hpp> 27 typedef boost::shared_ptr<Atom>
ATOM_SPTR;
104 explicit Bond(BondType bT);
246 virtual void setQuery(QUERYBOND_QUERY *what);
248 virtual QUERYBOND_QUERY *
getQuery()
const;
253 bool maintainOrder=
true);
262 virtual bool Match(
Bond const *what)
const;
307 template <
typename T>
308 void setProp(
const char *key,T val,
bool computed=
false)
const{
310 std::string what(key);
314 template <
typename T>
315 void setProp(
const std::string &key,T val,
bool computed=
false )
const{
320 if (std::find(compLst.begin(), compLst.end(), key) == compLst.end()) {
321 compLst.push_back(key);
342 template <
typename T>
348 template <
typename T>
349 void getProp(
const std::string &key,T &res)
const {
355 template <
typename T>
360 template <
typename T>
368 template <
typename T>
373 template <
typename T>
398 std::string what(key);
405 STR_VECT_I svi = std::find(compLst.begin(), compLst.end(), key);
406 if (svi != compLst.end()) {
418 BOOST_FOREACH(
const std::string &sv,compLst){
void setBeginAtomIdx(unsigned int what)
sets the index of our begin Atom
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
void setVal(const std::string &what, T &val)
Sets the value associated with a key.
double getValenceContrib(const Atom *at) const
returns our contribution to the explicit valence of an Atom
bool hasProp(const char *key) const
returns whether or not we have a property with name key
bool getPropIfPresent(const std::string &key, T &res) const
std::ostream & operator<<(std::ostream &target, const RDKit::Bond &b)
allows Bond objects to be dumped to streams
void setProp(const std::string &key, T val, bool computed=false) const
STR_VECT keys() const
Returns the set of keys in the dictionary.
RWMol is a molecule class that is intended to be edited.
virtual bool Match(Bond const *what) const
returns whether or not we match the argument
STR_VECT getPropList() const
returns a list with the names of our properties
void getProp(const char *key, T &res) const
allows retrieval of a particular property value
bool df_isAromatic
sets our owning molecule
bool getValIfPresent(const std::string &what, T &res) const
Potentially gets the value associated with a particular key returns true on success/false on failure...
void clearComputedProps() const
clears all of our computed properties
void clearProp(const char *key) const
clears the value of a property
BondDir getBondDir() const
returns our direction
BondStereo getStereo() const
returns our stereo code
T getProp(const std::string &key) const
boost::shared_ptr< Atom > ATOM_SPTR
BondStereo
the nature of the bond's stereochem (for cis/trans)
void getProp(const std::string &key, T &res) const
void setIsConjugated(bool what)
sets our isConjugated flag
void setBondType(BondType bT)
sets our bondType
bool hasProp(const std::string &key) const
unsigned int getOtherAtomIdx(unsigned int thisIdx) const
given the index of one Atom, returns the index of the other
ROMol is a molecule class that is intended to have a fixed topology.
unsigned int getBeginAtomIdx() const
returns the index of our begin Atom
intentionally unspecified stereochemistry
standard two-electron dative
void clearVal(const std::string &what)
Clears the value associated with a particular key, removing the key from the dictionary.
void getVal(const std::string &what, T &res) const
Gets the value associated with a particular key.
void setIdx(unsigned int index)
sets our index within the ROMol
bool getIsConjugated() const
returns the status of our isConjugated flag
virtual bool hasQuery() const
Atom * getOtherAtom(Atom const *what) const
returns a pointer to the other Atom
INT_VECT * dp_stereoAtoms
virtual void expandQuery(QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
T getProp(const char *key) const
void clearProp(const std::string &key) const
std::vector< int > INT_VECT
void setIsAromatic(bool what)
sets our isAromatic flag
boost::uint8_t d_bondType
Atom * getEndAtom() const
returns a pointer to our end Atom
Includes a bunch of functionality for handling Atom and Bond queries.
unsigned int getEndAtomIdx() const
returns the index of our end Atom
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
const std::string computedPropName
INT_VECT & getStereoAtoms()
virtual QUERYBOND_QUERY * getQuery() const
NOT CALLABLE.
void setStereo(BondStereo what)
sets our stereo code
standard two-electron dative
class for representing a bond
bool hasVal(const char *what) const
Returns whether or not the dictionary contains a particular key.
void setOwningMol(ROMol *other)
sets our owning molecule
Zero-order bond (from http://pubs.acs.org/doi/abs/10.1021/ci200488k)
double getBondTypeAsDouble() const
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
standard two-electron dative
void setBeginAtom(Atom *at)
sets our begin Atom
BondDir
the bond's direction (for chirality)
atomindex_t d_beginAtomIdx
void setEndAtomIdx(unsigned int what)
sets the index of our end Atom
void setOwningMol(ROMol &other)
sets our owning molecule
const INT_VECT & getStereoAtoms() const
returns the indices of our stereo atoms
one-electron dative (e.g. from a C in a Cp ring to a metal)
#define PRECONDITION(expr, mess)
bool getIsAromatic() const
returns the status of our isAromatic flag
boost::uint16_t atomindex_t
bool getPropIfPresent(const char *key, T &res) const
Bond & operator=(const Bond &other)
boost::shared_ptr< Bond > BOND_SPTR
Pulls in all the query types.
std::vector< std::string >::iterator STR_VECT_I
void setEndAtom(Atom *at)
sets our end Atom
virtual Bond * copy() const
returns a copy
void setProp(const char *key, T val, bool computed=false) const
sets a property value
unsigned int getIdx() const
returns our index within the ROMol
Atom * getBeginAtom() const
returns a pointer to our begin Atom
void setBondDir(BondDir what)
sets our direction
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Bond
Base class for all queries.
The Dict class can be used to store objects of arbitrary type keyed by strings.
The class for representing atoms.
BondType getBondType() const
returns our bondType
std::vector< std::string > STR_VECT
virtual void setQuery(QUERYBOND_QUERY *what)
NOT CALLABLE.