Bond Class Reference
#include <bond.h>
List of all members.
Detailed Description
Bond class - Author:
- Dr Jean-Luc Perret (luc@kuicr.kyoto-u.ac.jp), Kyoto University, Japan
- Version:
- 0.3
- Date:
- 17 Jan 2004
CLASS NAME: Bond
FOR: SNSF SPONSORED PROJECT
PURPOSE:
this class implements the notion of bond between two atoms A bond is directed: it has a source atom and a target atom, so a chemical bond should be represented by two instances of class Bond, one for each direction.
A bond as implemented here contains a source and a target atom, a label describing the bond type (see constants.h). Since bond is a daughter of DataContainer other Descriptors may be added at runtime.
A bond is derived from DataContainer, so it has all the associated descriptors, but in addition bonds inplement an atomDescriptors map allowing to store atoms as descriptors to the bond. (in addition to source ant target atom).
For faster access, some descriptors are directly implemented in the class bond using native data type (double and int). This is the case for pt and label.
- Examples:
-
bond_example.cpp.
Constructor & Destructor Documentation
Bond::Bond |
( |
Atom * |
aSource, |
|
|
Atom * |
aTarget, |
|
|
int |
aLabel, |
|
|
int |
aPerretLabel = NAVALUE , |
|
|
int |
aBondStereo = 0 , |
|
|
int |
aBondNotUsed = 0 , |
|
|
int |
aBondTopology = 0 , |
|
|
int |
aBondReactionCenter = 0 |
|
) |
|
|
Member Function Documentation
void Bond::addRing |
( |
Ring * |
aRing |
) |
[inline] |
|
|
adds a ring to the set of rings the bond is member of. |
vector<Ring*>::iterator Bond::beginRing |
( |
|
) |
[inline] |
|
|
iterator on the first element of the set of rings the bond is member of. |
void Bond::describeShort |
( |
|
) |
|
|
|
writes a short string description of the bond to cout. |
vector<Ring*>::iterator Bond::endRing |
( |
|
) |
[inline] |
|
|
iterator on the last element of the set of rings the bond is member of. |
double Bond::getKashimaPT |
( |
|
) |
[inline] |
|
|
returns the transition probability used in the Kashima kernel. |
int Bond::getLabel |
( |
|
) |
[inline] |
|
int Bond::getNotUsed |
( |
|
) |
[inline] |
|
|
returns the 'not used' value. |
int Bond::getPerretLabel |
( |
|
) |
[inline] |
|
|
returns the value of the Perret label (set by setPerretLabel, called everytime a molecule is modified). |
int Bond::getReactionCenter |
( |
|
) |
[inline] |
|
|
returns the reaction center value. |
|
since bonds are represented directional, returns the reciprocal bond. |
|
returns a pointer to the source atom. |
int Bond::getStereo |
( |
|
) |
[inline] |
|
|
returns the stereo value. |
|
returns a pointer to the target atom. |
int Bond::getTopology |
( |
|
) |
[inline] |
|
|
returns the topology value. |
bool Bond::hasFlag |
( |
|
) |
[inline] |
|
bool Bond::hasFlagOriginal |
( |
|
) |
[inline] |
|
bool Bond::hasRing |
( |
|
) |
[inline] |
|
|
returns true if the bond is member of any ring. |
bool Bond::hasRing |
( |
Ring * |
aRing |
) |
|
|
|
returns true if the bond is member of the given ring. |
bool Bond::hasSource |
( |
|
) |
[inline] |
|
|
returns true if source atom is set. |
bool Bond::hasTarget |
( |
|
) |
[inline] |
|
|
returns true if target atom is set. |
void Bond::hideToFrom |
( |
|
) |
|
|
int Bond::numRings |
( |
|
) |
[inline] |
|
|
returns the number of rings the bond is member of. |
void Bond::restoreToFrom |
( |
|
) |
|
|
|
reverses the bond direction. |
void Bond::setFlag |
( |
|
) |
[inline] |
|
void Bond::setFlagOriginal |
( |
|
) |
[inline] |
|
|
sets 'flagOriginal' to true |
void Bond::setKashimaPT |
( |
double |
aPt |
) |
[inline] |
|
|
sets the transition probability used in the Kashima kernel. note that for performance reasons this function does not use the descriptors of DataContainer to store its values but rather uses a native double variable in the bond class. |
void Bond::setNotUsed |
( |
int |
a |
) |
[inline] |
|
|
sets the 'not used' value. |
void Bond::setPerretLabel |
( |
|
) |
|
|
|
sets the Perret label of the bond. |
void Bond::setReactionCenter |
( |
int |
a |
) |
[inline] |
|
|
sets the reaction center value. |
void Bond::setStereo |
( |
int |
a |
) |
[inline] |
|
void Bond::setTopology |
( |
int |
a |
) |
[inline] |
|
string Bond::toString |
( |
|
) |
|
|
|
returns a string description of the bond ( = string description of source and target atoms and bond label). |
string Bond::toStringShort |
( |
|
) |
|
|
|
returns a short string description of the bond ( = short string description of source and target atoms and bond label). |
void Bond::unsetFlag |
( |
|
) |
[inline] |
|
void Bond::unsetFlagOriginal |
( |
|
) |
[inline] |
|
|
sets 'flagOriginal' to false |
Member Data Documentation
|
Label of the bond. Possible values are defined in constants.h |
|
not used field (xxx in bond mol files). |
|
transition probability (used in Kashima Kernel). |
|
reaction center (ccc in mol files). |
|
vector of rings the bond is member of. |
|
Source atom of this bond. |
|
stereo information. one of: if single bond: STEREONOT, STEREOUP, STEREOEITHER, STERODOWN if double bond: STEROCISTRANSNOT, STEROCISTRANS |
|
Target atom of this bond. |
|
topology (rrr in bond mol files). DO NOT USE, just for storing informations contained in mol files. |
The documentation for this class was generated from the following file:
Generated on Wed Nov 28 12:12:51 2007 for ChemCpp by
1.4.6