 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
23 #include <boost/foreach.hpp>
164 unsigned int getIdx()
const {
return d_index; };
171 void setIdx(
unsigned int index) { d_index = index; };
257 bool maintainOrder =
true);
286 PRECONDITION(what <= STEREOE || getStereoAtoms().size() == 2,
287 "Stereo atoms should be specified before specifying CIS/TRANS "
288 "bond stereochemistry")
310 if (!dp_stereoAtoms) {
311 const_cast<Bond *
>(
this)->dp_stereoAtoms =
new INT_VECT();
313 return *dp_stereoAtoms;
317 if (!dp_stereoAtoms) dp_stereoAtoms =
new INT_VECT();
318 return *dp_stereoAtoms;
virtual QUERYBOND_QUERY * getQuery() const
NOT CALLABLE.
@ BEGINDASH
dashed: narrow at begin
Atom * getBeginAtom() const
returns a pointer to our begin Atom
@ DATIVEL
standard two-electron dative
@ DATIVE
standard two-electron dative
void setBeginAtomIdx(unsigned int what)
sets the index of our begin Atom
BondStereo getStereo() const
returns our stereo code
Bond(BondType bT)
construct with a particular BondType
bool df_isAromatic
sets our owning molecule
@ DATIVER
standard two-electron dative
std::vector< int > INT_VECT
Pulls in all the query types.
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
void setIsConjugated(bool what)
sets our isConjugated flag
INT_VECT * dp_stereoAtoms
@ EITHERDOUBLE
a "crossed" double bond
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
INT_VECT & getStereoAtoms()
This is an overloaded member function, provided for convenience. It differs from the above function o...
class for representing a bond
void setIdx(unsigned int index)
sets our index within the ROMol
RWMol is a molecule class that is intended to be edited.
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Bond &b)
allows Bond objects to be dumped to streams
virtual void setQuery(QUERYBOND_QUERY *what)
NOT CALLABLE.
void setOwningMol(ROMol &other)
sets our owning molecule
@ UNKNOWN
intentionally unspecified stereochemistry
void setBondDir(BondDir what)
sets our direction
double getBondTypeAsDouble() const
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
The class for representing atoms.
void setStereoAtoms(unsigned int bgnIdx, unsigned int endIdx)
sets the atoms to be considered as reference points for bond stereo
unsigned int getEndAtomIdx() const
returns the index of our end Atom
unsigned int getIdx() const
returns our index within the ROMol
virtual Bond * copy() const
returns a copy
const INT_VECT & getStereoAtoms() const
returns the indices of our stereo atoms
#define RDKIT_GRAPHMOL_EXPORT
virtual bool Match(Bond const *what) const
returns whether or not we match the argument
void setEndAtomIdx(unsigned int what)
sets the index of our end Atom
virtual void expandQuery(QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
Bond & operator=(const Bond &other)
@ BEGINWEDGE
wedged: narrow at begin
BondDir getBondDir() const
returns our direction
Atom * getEndAtom() const
returns a pointer to our end Atom
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
@ ENDDOWNRIGHT
for cis/trans
bool getIsConjugated() const
returns the status of our isConjugated flag
void setIsAromatic(bool what)
sets our isAromatic flag
void setBeginAtom(Atom *at)
sets our begin Atom
double getValenceContrib(const Atom *at) const
returns our contribution to the explicit valence of an Atom
void setBondType(BondType bT)
sets our bondType
Atom * getOtherAtom(Atom const *what) const
returns a pointer to the other Atom
virtual bool hasQuery() const
#define PRECONDITION(expr, mess)
Base class for all queries.
std::uint32_t atomindex_t
BondType getBondType() const
returns our bondType
unsigned int getOtherAtomIdx(unsigned int thisIdx) const
given the index of one Atom, returns the index of the other
void setOwningMol(ROMol *other)
sets our owning molecule
void setEndAtom(Atom *at)
sets our end Atom
BondStereo
the nature of the bond's stereochem (for cis/trans)
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
@ DATIVEONE
one-electron dative (e.g. from a C in a Cp ring to a metal)
bool getIsAromatic() const
returns the status of our isAromatic flag
BondDir
the bond's direction (for chirality)
unsigned int getBeginAtomIdx() const
returns the index of our begin Atom
void setStereo(BondStereo what)
sets our stereo code