#include <Bond.h>

Public Types | |
| enum | BondType { UNSPECIFIED = 0, SINGLE, DOUBLE, TRIPLE, QUADRUPLE, QUINTUPLE, HEXTUPLE, ONEANDAHALF, TWOANDAHALF, THREEANDAHALF, FOURANDAHALF, FIVEANDAHALF, AROMATIC, IONIC, HYDROGEN, THREECENTER, DATIVEONE, DATIVE, DATIVEL, DATIVER, OTHER } |
| the type of Bond More... | |
| enum | BondDir { NONE = 0, BEGINWEDGE, BEGINDASH, ENDDOWNRIGHT, ENDUPRIGHT, EITHERDOUBLE, UNKNOWN } |
| the bond's direction (for chirality) More... | |
| enum | BondStereo { STEREONONE = 0, STEREOANY, STEREOZ, STEREOE } |
| the nature of the bond's stereochem (for cis/trans) More... | |
| typedef boost::shared_ptr< Bond > | BOND_SPTR |
| typedef Queries::Query< int, Bond const *, true > | QUERYBOND_QUERY |
Public Member Functions | |
| Bond () | |
| Bond (BondType bT) | |
| construct with a particular BondType | |
| Bond (const Bond &other) | |
| virtual | ~Bond () |
| Bond & | operator= (const Bond &other) |
| virtual Bond * | copy () const |
| returns a copy | |
| const BondType | getBondType () const |
returns our bondType | |
| void | setBondType (BondType bT) |
sets our bondType | |
| double | getBondTypeAsDouble () const |
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.) | |
| double | getValenceContrib (const Atom *at) const |
| returns our contribution to the explicit valence of an Atom | |
| double | getValenceContrib (ATOM_SPTR at) const |
| void | setIsAromatic (bool what) |
sets our isAromatic flag | |
| bool | getIsAromatic () const |
returns the status of our isAromatic flag | |
| void | setIsConjugated (bool what) |
sets our isConjugated flag | |
| bool | getIsConjugated () const |
returns the status of our isConjugated flag | |
| ROMol & | getOwningMol () const |
| returns a reference to the ROMol that owns this Bond | |
| void | setOwningMol (ROMol *other) |
| sets our owning molecule | |
| void | setOwningMol (ROMol &other) |
| sets our owning molecule | |
| unsigned int | getIdx () const |
| returns our index within the ROMol | |
| void | setIdx (unsigned int index) |
| sets our index within the ROMol | |
| unsigned int | getBeginAtomIdx () const |
| returns the index of our begin Atom | |
| unsigned int | getEndAtomIdx () const |
| returns the index of our end Atom | |
| unsigned int | getOtherAtomIdx (unsigned int thisIdx) const |
| given the index of one Atom, returns the index of the other | |
| void | setBeginAtomIdx (unsigned int what) |
| sets the index of our begin Atom | |
| void | setEndAtomIdx (unsigned int what) |
| sets the index of our end Atom | |
| void | setBeginAtom (Atom *at) |
| sets our begin Atom | |
| void | setBeginAtom (ATOM_SPTR at) |
| void | setEndAtom (Atom *at) |
| sets our end Atom | |
| void | setEndAtom (ATOM_SPTR at) |
| Atom * | getBeginAtom () const |
| returns a pointer to our begin Atom | |
| Atom * | getEndAtom () const |
| returns a pointer to our end Atom | |
| Atom * | getOtherAtom (Atom const *what) const |
| returns a pointer to the other Atom | |
| virtual bool | hasQuery () const |
| virtual void | setQuery (QUERYBOND_QUERY *what) |
| NOT CALLABLE. | |
| virtual QUERYBOND_QUERY * | getQuery () const |
| NOT CALLABLE. | |
| void | expandQuery (QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) |
| NOT CALLABLE. | |
| virtual bool | Match (Bond const *what) const |
| returns whether or not we match the argument | |
| virtual bool | Match (const Bond::BOND_SPTR what) const |
| void | setBondDir (BondDir what) |
| sets our direction | |
| BondDir | getBondDir () const |
| returns our direction | |
| void | setStereo (BondStereo what) |
| sets our stereo code | |
| BondStereo | getStereo () const |
| returns our stereo code | |
| const INT_VECT & | getStereoAtoms () const |
| returns the indices of our stereo atoms | |
| INT_VECT & | getStereoAtoms () |
| 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 () const |
clears all of our computed properties | |
| void | updatePropertyCache (bool strict=true) |
calculates any of our lazy properties | |
Protected Member Functions | |
| void | initBond () |
Protected Attributes | |
| BondType | d_bondType |
| sets our owning molecule | |
| ROMol * | dp_mol |
| bool | df_isAromatic |
| bool | df_isConjugated |
| unsigned int | d_index |
| unsigned int | d_beginAtomIdx |
| unsigned int | d_endAtomIdx |
| BondDir | d_dirTag |
| BondStereo | d_stereo |
| INT_VECT | d_stereoAtoms |
| Dict * | dp_props |
Friends | |
| class | RWMol |
| class | ROMol |
Notes:
properties: property is keyed by name and can store an arbitrary type.Properties can be marked as calculated, in which case they will be cleared when the clearComputedProps() method is called.property operations are const, this allows extra flexibility for clients who need to store extra data on Bond objects. Definition at line 40 of file Bond.h.
| typedef boost::shared_ptr<Bond> RDKit::Bond::BOND_SPTR |
| typedef Queries::Query<int,Bond const *,true> RDKit::Bond::QUERYBOND_QUERY |
the type of Bond
| enum RDKit::Bond::BondDir |
| RDKit::Bond::Bond | ( | ) |
| RDKit::Bond::Bond | ( | BondType | bT | ) | [explicit] |
construct with a particular BondType
| RDKit::Bond::Bond | ( | const Bond & | other | ) |
| virtual RDKit::Bond::~Bond | ( | ) | [virtual] |
| virtual Bond* RDKit::Bond::copy | ( | ) | const [virtual] |
returns a copy
Note: the caller is responsible for deleteing the returned pointer.
Reimplemented in RDKit::QueryBond.
| const BondType RDKit::Bond::getBondType | ( | ) | const [inline] |
returns our bondType
Definition at line 110 of file Bond.h.
References d_bondType.
Referenced by RDKit::queryBondOrder().
| void RDKit::Bond::setBondType | ( | BondType | bT | ) | [inline] |
sets our bondType
Reimplemented in RDKit::QueryBond.
Definition at line 112 of file Bond.h.
References d_bondType.
| double RDKit::Bond::getBondTypeAsDouble | ( | ) | const |
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
| double RDKit::Bond::getValenceContrib | ( | const Atom * | at | ) | const |
| double RDKit::Bond::getValenceContrib | ( | ATOM_SPTR | at | ) | const |
| void RDKit::Bond::setIsAromatic | ( | bool | what | ) | [inline] |
| bool RDKit::Bond::getIsAromatic | ( | ) | const [inline] |
returns the status of our isAromatic flag
Definition at line 129 of file Bond.h.
References df_isAromatic.
| void RDKit::Bond::setIsConjugated | ( | bool | what | ) | [inline] |
| bool RDKit::Bond::getIsConjugated | ( | ) | const [inline] |
returns the status of our isConjugated flag
Definition at line 134 of file Bond.h.
References df_isConjugated.
| ROMol& RDKit::Bond::getOwningMol | ( | ) | const [inline] |
returns a reference to the ROMol that owns this Bond
Definition at line 137 of file Bond.h.
References dp_mol.
Referenced by RDKit::queryBondIsInRingOfSize(), RDKit::queryBondMinRingSize(), RDKit::queryIsBondInNRings(), and RDKit::queryIsBondInRing().
| void RDKit::Bond::setOwningMol | ( | ROMol * | other | ) |
| void RDKit::Bond::setOwningMol | ( | ROMol & | other | ) | [inline] |
| unsigned int RDKit::Bond::getIdx | ( | ) | const [inline] |
returns our index within the ROMol
Notes:
Definition at line 149 of file Bond.h.
References d_index.
Referenced by RDKit::queryBondIsInRingOfSize(), RDKit::queryBondMinRingSize(), RDKit::queryIsBondInNRings(), and RDKit::queryIsBondInRing().
| void RDKit::Bond::setIdx | ( | unsigned int | index | ) | [inline] |
sets our index within the ROMol
Notes:
< this->getOwningMol()->getNumBonds() Definition at line 156 of file Bond.h.
References d_index.
| unsigned int RDKit::Bond::getBeginAtomIdx | ( | ) | const [inline] |
returns the index of our begin Atom
Notes:
Definition at line 163 of file Bond.h.
References d_beginAtomIdx.
| unsigned int RDKit::Bond::getEndAtomIdx | ( | ) | const [inline] |
returns the index of our end Atom
Notes:
Definition at line 170 of file Bond.h.
References d_endAtomIdx.
| unsigned int RDKit::Bond::getOtherAtomIdx | ( | unsigned int | thisIdx | ) | const |
given the index of one Atom, returns the index of the other
Notes:
| void RDKit::Bond::setBeginAtomIdx | ( | unsigned int | what | ) |
| void RDKit::Bond::setEndAtomIdx | ( | unsigned int | what | ) |
| void RDKit::Bond::setBeginAtom | ( | ATOM_SPTR | at | ) |
| void RDKit::Bond::setEndAtom | ( | ATOM_SPTR | at | ) |
| Atom* RDKit::Bond::getBeginAtom | ( | ) | const |
| Atom* RDKit::Bond::getEndAtom | ( | ) | const |
| virtual bool RDKit::Bond::hasQuery | ( | ) | const [inline, virtual] |
| virtual void RDKit::Bond::setQuery | ( | QUERYBOND_QUERY * | what | ) | [virtual] |
| virtual QUERYBOND_QUERY* RDKit::Bond::getQuery | ( | ) | const [virtual] |
| void RDKit::Bond::expandQuery | ( | QUERYBOND_QUERY * | what, | |
| Queries::CompositeQueryType | how = Queries::COMPOSITE_AND, |
|||
| bool | maintainOrder = true | |||
| ) |
| virtual bool RDKit::Bond::Match | ( | Bond const * | what | ) | const [virtual] |
returns whether or not we match the argument
Notes:
bondType Bond::UNSPECIFIED or both Bonds have the same bondType. Reimplemented in RDKit::QueryBond.
| virtual bool RDKit::Bond::Match | ( | const Bond::BOND_SPTR | what | ) | const [virtual] |
Reimplemented in RDKit::QueryBond.
| void RDKit::Bond::setBondDir | ( | BondDir | what | ) | [inline] |
sets our direction
Reimplemented in RDKit::QueryBond.
Definition at line 260 of file Bond.h.
References d_dirTag.
| BondDir RDKit::Bond::getBondDir | ( | ) | const [inline] |
returns our direction
Definition at line 262 of file Bond.h.
References d_dirTag.
Referenced by RDKit::queryBondDir().
| void RDKit::Bond::setStereo | ( | BondStereo | what | ) | [inline] |
| BondStereo RDKit::Bond::getStereo | ( | ) | const [inline] |
| const INT_VECT& RDKit::Bond::getStereoAtoms | ( | ) | const [inline] |
returns the indices of our stereo atoms
Definition at line 270 of file Bond.h.
References d_stereoAtoms.
| INT_VECT& RDKit::Bond::getStereoAtoms | ( | ) | [inline] |
| STR_VECT RDKit::Bond::getPropList | ( | ) | const [inline] |
returns a list with the names of our properties
Definition at line 279 of file Bond.h.
References dp_props, and RDKit::Dict::keys().
| void RDKit::Bond::setProp | ( | const char * | key, | |
| T | val, | |||
| bool | computed = false | |||
| ) | const [inline] |
| void RDKit::Bond::setProp | ( | const std::string | key, | |
| T | val, | |||
| bool | computed = false | |||
| ) | const [inline] |
| void RDKit::Bond::getProp | ( | const char * | key, | |
| T & | res | |||
| ) | const [inline] |
allows retrieval of a particular property value
| 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. |
property with name key exists, a KeyErrorException will be thrown.boost::lexical_cast machinery is used to attempt type conversions. If this fails, a boost::bad_lexical_cast exception will be thrown. Definition at line 328 of file Bond.h.
References dp_props, RDKit::Dict::getVal(), and PRECONDITION.
Referenced by clearComputedProps(), clearProp(), and setProp().
| void RDKit::Bond::getProp | ( | const std::string | key, | |
| T & | res | |||
| ) | const [inline] |
Definition at line 334 of file Bond.h.
References dp_props, RDKit::Dict::getVal(), and PRECONDITION.
| bool RDKit::Bond::hasProp | ( | const char * | key | ) | const [inline] |
returns whether or not we have a property with name key
Definition at line 341 of file Bond.h.
References dp_props, and RDKit::Dict::hasVal().
Referenced by clearComputedProps(), clearProp(), and setProp().
| bool RDKit::Bond::hasProp | ( | const std::string | key | ) | const [inline] |
| void RDKit::Bond::clearProp | ( | const char * | key | ) | const [inline] |
clears the value of a property
Notes:
property with name key exists, a KeyErrorException will be thrown.property is marked as computed, it will also be removed from our list of computedProperties | void RDKit::Bond::clearProp | ( | const std::string | key | ) | const [inline] |
Definition at line 364 of file Bond.h.
References RDKit::Dict::clearVal(), dp_props, getProp(), hasProp(), and RDKit::Dict::setVal().
| void RDKit::Bond::clearComputedProps | ( | ) | const [inline] |
clears all of our computed properties
Definition at line 378 of file Bond.h.
References RDKit::Dict::clearVal(), dp_props, getProp(), hasProp(), and RDKit::Dict::setVal().
| void RDKit::Bond::updatePropertyCache | ( | bool | strict = true |
) | [inline] |
| void RDKit::Bond::initBond | ( | ) | [protected] |
BondType RDKit::Bond::d_bondType [protected] |
sets our owning molecule
sets our owning molecule
Definition at line 395 of file Bond.h.
Referenced by getBondType(), and setBondType().
ROMol* RDKit::Bond::dp_mol [protected] |
bool RDKit::Bond::df_isAromatic [protected] |
bool RDKit::Bond::df_isConjugated [protected] |
unsigned int RDKit::Bond::d_index [protected] |
unsigned int RDKit::Bond::d_beginAtomIdx [protected] |
unsigned int RDKit::Bond::d_endAtomIdx [protected] |
BondDir RDKit::Bond::d_dirTag [protected] |
BondStereo RDKit::Bond::d_stereo [protected] |
INT_VECT RDKit::Bond::d_stereoAtoms [protected] |
Dict* RDKit::Bond::dp_props [protected] |
Definition at line 412 of file Bond.h.
Referenced by clearComputedProps(), clearProp(), getProp(), getPropList(), hasProp(), and setProp().
1.5.5