23 #include <boost/foreach.hpp> 108 explicit Bond(BondType bT);
118 virtual Bond *copy()
const;
121 BondType
getBondType()
const {
return static_cast<BondType
>(d_bondType); };
126 double getBondTypeAsDouble()
const;
133 double getValenceContrib(
const Atom *at)
const;
151 void setOwningMol(
ROMol *other);
161 unsigned int getIdx()
const {
return d_index; };
168 void setIdx(
unsigned int index) { d_index = index; };
189 unsigned int getOtherAtomIdx(
unsigned int thisIdx)
const;
196 void setBeginAtomIdx(
unsigned int what);
202 void setEndAtomIdx(
unsigned int what);
209 void setBeginAtom(
Atom *at);
215 void setEndAtom(
Atom *at);
222 Atom *getBeginAtom()
const;
228 Atom *getEndAtom()
const;
234 Atom *getOtherAtom(
Atom const *what)
const;
246 virtual void setQuery(QUERYBOND_QUERY *what);
248 virtual QUERYBOND_QUERY *getQuery()
const;
251 virtual void expandQuery(
252 QUERYBOND_QUERY *what,
254 bool maintainOrder =
true);
263 virtual bool Match(
Bond const *what)
const;
268 BondDir
getBondDir()
const {
return static_cast<BondDir
>(d_dirTag); };
283 PRECONDITION(what <= STEREOE || getStereoAtoms().size() == 2,
284 "Stereo atoms should be specified before specifying CIS/TRANS " 285 "bond stereochemistry")
289 BondStereo
getStereo()
const {
return static_cast<BondStereo
>(d_stereo); };
303 void setStereoAtoms(
unsigned int bgnIdx,
unsigned int endIdx);
307 if (!dp_stereoAtoms) {
308 const_cast<Bond *
>(
this)->dp_stereoAtoms =
new INT_VECT();
310 return *dp_stereoAtoms;
314 if (!dp_stereoAtoms) dp_stereoAtoms =
new INT_VECT();
315 return *dp_stereoAtoms;
BondStereo getStereo() const
returns our stereo code
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Bond
RWMol is a molecule class that is intended to be edited.
virtual bool hasQuery() const
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Bond &b)
allows Bond objects to be dumped to streams
bool df_isAromatic
sets our owning molecule
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
BondStereo
the nature of the bond's stereochem (for cis/trans)
void setIsConjugated(bool what)
sets our isConjugated flag
void setBondType(BondType bT)
sets our bondType
intentionally unspecified stereochemistry
standard two-electron dative
BondDir getBondDir() const
returns our direction
#define RDKIT_GRAPHMOL_EXPORT
void setIdx(unsigned int index)
sets our index within the ROMol
bool getIsAromatic() const
returns the status of our isAromatic flag
INT_VECT * dp_stereoAtoms
bool getIsConjugated() const
returns the status of our isConjugated flag
std::vector< int > INT_VECT
void setIsAromatic(bool what)
sets our isAromatic flag
unsigned int getEndAtomIdx() const
returns the index of our end Atom
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
INT_VECT & getStereoAtoms()
void setStereo(BondStereo what)
sets our stereo code
standard two-electron dative
class for representing a bond
standard two-electron dative
BondDir
the bond's direction (for chirality)
unsigned int getBeginAtomIdx() const
returns the index of our begin Atom
void setOwningMol(ROMol &other)
sets our owning molecule
one-electron dative (e.g. from a C in a Cp ring to a metal)
#define PRECONDITION(expr, mess)
BondType getBondType() const
returns our bondType
Pulls in all the query types.
const INT_VECT & getStereoAtoms() const
returns the indices of our stereo atoms
void setBondDir(BondDir what)
sets our direction
Base class for all queries.
unsigned int getIdx() const
returns our index within the ROMol
The class for representing atoms.
std::uint32_t atomindex_t