RDKit: Bond.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Bond.h
Go to the documentation of this file.
1//
2// Copyright (C) 2001-2021 Greg Landrum and other RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10#include <RDGeneral/export.h>
11#ifndef RD_BOND_H
12#define RD_BOND_H
13
14// std stuff
15#include <utility>
16
17// Ours
18#include <RDGeneral/Invariant.h>
19#include <Query/QueryObjects.h>
20#include <RDGeneral/types.h>
21#include <RDGeneral/RDProps.h>
22#include <GraphMol/details.h>
23
24namespace RDKit {
25class ROMol;
26class RWMol;
27class Atom;
28
29//! class for representing a bond
30/*!
31
32 <b>Notes:</b>
33 - many of the methods of Atom require that the Atom be associated
34 with a molecule (an ROMol).
35 - each Bond maintains a Dict of \c properties:
36 - Each \c property is keyed by name and can store an
37 arbitrary type.
38 - \c Properties can be marked as \c calculated, in which case
39 they will be cleared when the \c clearComputedProps() method
40 is called.
41 - Because they have no impact upon chemistry, all \c property
42 operations are \c const, this allows extra flexibility for
43 clients who need to store extra data on Bond objects.
44
45*/
46 class RDKIT_GRAPHMOL_EXPORT Bond : public RDProps {
47 friend class RWMol;
48 friend class ROMol;
49
50 public:
51 // FIX: grn...
52 typedef Queries::Query<int, Bond const *, true> QUERYBOND_QUERY;
53
54 //! the type of Bond
55 typedef enum {
56 UNSPECIFIED = 0,
57 SINGLE,
58 DOUBLE,
59 TRIPLE,
60 QUADRUPLE,
61 QUINTUPLE,
62 HEXTUPLE,
63 ONEANDAHALF,
64 TWOANDAHALF,
65 THREEANDAHALF,
66 FOURANDAHALF,
67 FIVEANDAHALF,
68 AROMATIC,
69 IONIC,
70 HYDROGEN,
71 THREECENTER,
72 DATIVEONE, //!< one-electron dative (e.g. from a C in a Cp ring to a metal)
73 DATIVE, //!< standard two-electron dative
74 DATIVEL, //!< standard two-electron dative
75 DATIVER, //!< standard two-electron dative
76 OTHER,
77 ZERO //!< Zero-order bond (from
78 // http://pubs.acs.org/doi/abs/10.1021/ci200488k)
79 } BondType;
80
81 //! the bond's direction (for chirality)
82 typedef enum {
83 NONE = 0, //!< no special style
84 BEGINWEDGE, //!< wedged: narrow at begin
85 BEGINDASH, //!< dashed: narrow at begin
86 // FIX: this may not really be adequate
87 ENDDOWNRIGHT, //!< for cis/trans
88 ENDUPRIGHT, //!< ditto
89 EITHERDOUBLE, //!< a "crossed" double bond
90 UNKNOWN, //!< intentionally unspecified stereochemistry
91 } BondDir;
92
93 //! the nature of the bond's stereochem (for cis/trans)
94 typedef enum { // stereochemistry of double bonds
95 STEREONONE = 0, // no special style
96 STEREOANY, // intentionally unspecified
97 // -- Put any true specifications about this point so
98 // that we can do comparisons like if(bond->getStereo()>Bond::STEREOANY)
99 STEREOZ, // Z double bond
100 STEREOE, // E double bond
101 STEREOCIS, // cis double bond
102 STEREOTRANS, // trans double bond
103 STEREOATROPCW, // atropisomer clockwise rotation
104 STEREOATROPCCW, // atropisomer counter clockwise rotation
105 } BondStereo;
106
107 Bond();
108 //! construct with a particular BondType
109 explicit Bond(BondType bT);
110 Bond(const Bond &other);
111 virtual ~Bond();
112 Bond &operator=(const Bond &other);
113
114 Bond(Bond &&o) noexcept : RDProps(std::move(o)) {
115 df_isAromatic = o.df_isAromatic;
116 df_isConjugated = o.df_isConjugated;
117 d_bondType = o.d_bondType;
118 d_dirTag = o.d_dirTag;
119 d_stereo = o.d_stereo;
120 d_index = o.d_index;
121 d_beginAtomIdx = o.d_beginAtomIdx;
122 d_endAtomIdx = o.d_endAtomIdx;
123 // NOTE: this is somewhat fraught for bonds associated with molecules since
124 // the molecule will still be pointing to the original object
125 dp_mol = std::exchange(o.dp_mol, nullptr);
126 dp_stereoAtoms = std::exchange(o.dp_stereoAtoms, nullptr);
127 d_flags = std::exchange(o.d_flags, 0);
128 }
129 Bond &operator=(Bond &&o) noexcept {
130 if (this == &o) {
131 return *this;
132 }
133 RDProps::operator=(std::move(o));
134 df_isAromatic = o.df_isAromatic;
135 df_isConjugated = o.df_isConjugated;
136 d_bondType = o.d_bondType;
137 d_dirTag = o.d_dirTag;
138 d_stereo = o.d_stereo;
139 d_index = o.d_index;
140 d_beginAtomIdx = o.d_beginAtomIdx;
141 d_endAtomIdx = o.d_endAtomIdx;
142 // NOTE: this is somewhat fraught for bonds associated with molecules since
143 // the molecule will still be pointing to the original object
144 delete dp_stereoAtoms;
145 dp_mol = std::exchange(o.dp_mol, nullptr);
146 dp_stereoAtoms = std::exchange(o.dp_stereoAtoms, nullptr);
147 d_flags = std::exchange(o.d_flags, 0);
148 return *this;
149 }
150
151 //! returns a copy
152 /*!
153 <b>Note:</b> the caller is responsible for <tt>delete</tt>ing
154 the returned pointer.
155 */
156 virtual Bond *copy() const;
157
158 //! returns our \c bondType
159 BondType getBondType() const { return static_cast<BondType>(d_bondType); }
160 //! sets our \c bondType
161 void setBondType(BondType bT) { d_bondType = bT; }
162 //! \brief returns our \c bondType as a double
163 //! (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
164 double getBondTypeAsDouble() const;
165
166 //! returns our contribution to the explicit valence of an Atom
167 /*!
168 <b>Notes:</b>
169 - requires an owning molecule
170 */
171 virtual double getValenceContrib(const Atom *at) const;
172
173 //! sets our \c isAromatic flag
174 void setIsAromatic(bool what) { df_isAromatic = what; }
175 //! returns the status of our \c isAromatic flag
176 bool getIsAromatic() const { return df_isAromatic; }
177
178 //! sets our \c isConjugated flag
179 void setIsConjugated(bool what) { df_isConjugated = what; }
180 //! returns the status of our \c isConjugated flag
181 bool getIsConjugated() const { return df_isConjugated; }
182
183 //! returns whether or not this instance belongs to a molecule
184 bool hasOwningMol() const { return dp_mol != nullptr; }
185
186 //! returns a reference to the ROMol that owns this instance
187 ROMol &getOwningMol() const {
188 PRECONDITION(dp_mol, "no owner");
189 return *dp_mol;
190 }
191 //! sets our owning molecule
192 void setOwningMol(ROMol *other);
193 //! sets our owning molecule
194 void setOwningMol(ROMol &other) { setOwningMol(&other); }
195
196 // inverts the chirality of an atropisomer
197 bool invertChirality();
198
199 //! returns our index within the ROMol
200 /*!
201 <b>Notes:</b>
202 - this makes no sense if we do not have an owning molecule
203
204 */
205 unsigned int getIdx() const { return d_index; }
206 //! sets our index within the ROMol
207 /*!
208 <b>Notes:</b>
209 - this makes no sense if we do not have an owning molecule
210 - the index should be <tt>< this->getOwningMol()->getNumBonds()</tt>
211 */
212 void setIdx(unsigned int index) { d_index = index; }
213
214 //! returns the index of our begin Atom
215 /*!
216 <b>Notes:</b>
217 - this makes no sense if we do not have an owning molecule
218 */
219 unsigned int getBeginAtomIdx() const { return d_beginAtomIdx; }
220
221 //! returns the index of our end Atom
222 /*!
223 <b>Notes:</b>
224 - this makes no sense if we do not have an owning molecule
225 */
226 unsigned int getEndAtomIdx() const { return d_endAtomIdx; }
227
228 //! given the index of one Atom, returns the index of the other
229 /*!
230 <b>Notes:</b>
231 - this makes no sense if we do not have an owning molecule
232 */
233 unsigned int getOtherAtomIdx(unsigned int thisIdx) const;
234
235 //! sets the index of our begin Atom
236 /*!
237 <b>Notes:</b>
238 - requires an owning molecule
239 */
240 void setBeginAtomIdx(unsigned int what);
241 //! sets the index of our end Atom
242 /*!
243 <b>Notes:</b>
244 - requires an owning molecule
245 */
246 void setEndAtomIdx(unsigned int what);
247
248 //! sets our begin Atom
249 /*!
250 <b>Notes:</b>
251 - requires an owning molecule
252 */
253 void setBeginAtom(Atom *at);
254 //! sets our end Atom
255 /*!
256 <b>Notes:</b>
257 - requires an owning molecule
258 */
259 void setEndAtom(Atom *at);
260
261 //! returns a pointer to our begin Atom
262 /*!
263 <b>Notes:</b>
264 - requires an owning molecule
265 */
266 Atom *getBeginAtom() const;
267 //! returns a pointer to our end Atom
268 /*!
269 <b>Notes:</b>
270 - requires an owning molecule
271 */
272 Atom *getEndAtom() const;
273 //! returns a pointer to the other Atom
274 /*!
275 <b>Notes:</b>
276 - requires an owning molecule
277 */
278 Atom *getOtherAtom(Atom const *what) const;
279
280 // ------------------------------------
281 // Please see the note in Atom.h for some explanation
282 // of these methods
283 // ------------------------------------
284
285 // This method can be used to distinguish query bonds from standard bonds
286 virtual bool hasQuery() const { return false; }
287
288 // FIX: the const crap here is all mucked up.
289 //! NOT CALLABLE
290 virtual void setQuery(QUERYBOND_QUERY *what);
291 //! NOT CALLABLE
292 virtual QUERYBOND_QUERY *getQuery() const;
293
294 //! NOT CALLABLE
295 virtual void expandQuery(
296 QUERYBOND_QUERY *what,
297 Queries::CompositeQueryType how = Queries::COMPOSITE_AND,
298 bool maintainOrder = true);
299
300 //! returns whether or not we match the argument
301 /*!
302 <b>Notes:</b>
303 - for Bond objects, "match" means that either one of the Bonds
304 has \c bondType Bond::UNSPECIFIED or both Bonds have the
305 same \c bondType.
306 */
307 virtual bool Match(Bond const *what) const;
308
309 //! sets our direction
310 void setBondDir(BondDir what) { d_dirTag = what; }
311 //! returns our direction
312 BondDir getBondDir() const { return static_cast<BondDir>(d_dirTag); }
313
314 //! sets our stereo code
315 /*!
316 STEREONONE, STEREOANY, STEREOE and STEREOZ can be set without
317 neighboring atoms specified in getStereoAtoms since they are
318 defined by the topology of the molecular graph. In order to set
319 STEREOCIS or STEREOTRANS the neighboring atoms must be set first
320 (using setStereoBonds()) to know what atoms are being considered.
321
322 <b>Notes:</b>
323 - MolOps::findPotentialStereoBonds can be used to set
324 getStereoAtoms before setting CIS/TRANS
325 */
326 void setStereo(BondStereo what) {
327 PRECONDITION(((what != STEREOCIS && what != STEREOTRANS) ||
328 getStereoAtoms().size() == 2),
329 "Stereo atoms should be specified before specifying CIS/TRANS "
330 "bond stereochemistry")
331 d_stereo = what;
332 }
333 //! returns our stereo code
334 BondStereo getStereo() const { return static_cast<BondStereo>(d_stereo); }
335
336 //! sets the atoms to be considered as reference points for bond stereo
337 /*!
338 These do not necessarily need to be the highest 'ranking' atoms
339 like CIP stereo requires. They can be any arbitrary atoms
340 neighboring the begin and end atoms of this bond
341 respectively. STEREOCIS or STEREOTRANS is then set relative to
342 only these atoms.
343
344 If CIP rankings are desired, use
345 MolOps::findPotentialStereoBonds, but this is a more costly
346 function as it takes the whole molecule topology into account.
347 */
348 void setStereoAtoms(unsigned int bgnIdx, unsigned int endIdx);
349
350 //! returns the indices of our stereo atoms
351 const INT_VECT &getStereoAtoms() const {
352 if (!dp_stereoAtoms) {
353 const_cast<Bond *>(this)->dp_stereoAtoms = new INT_VECT();
354 }
355 return *dp_stereoAtoms;
356 }
357 //! \overload
358 INT_VECT &getStereoAtoms() {
359 if (!dp_stereoAtoms) {
360 dp_stereoAtoms = new INT_VECT();
361 }
362 return *dp_stereoAtoms;
363 }
364
365 //! calculates any of our lazy \c properties
366 /*!
367 <b>Notes:</b>
368 - requires an owning molecule
369 */
370 void updatePropertyCache(bool strict = true) { (void)strict; }
371
372 //! Flags that can be used by to store information on bonds.
373 //! These are not serialized and should be treated as temporary values.
374 //! No guarantees are made about preserving these flags across library
375 //! calls.
376 void setFlags(std::uint64_t flags) { d_flags = flags; }
377 std::uint64_t getFlags() const { return d_flags; }
378 std::uint64_t &getFlags() { return d_flags; }
379
380 protected:
381 //! sets our owning molecule
382 /// void setOwningMol(ROMol *other);
383 //! sets our owning molecule
384 /// void setOwningMol(ROMol &other) { setOwningMol(&other); }
385 ROMol *dp_mol;
386 INT_VECT *dp_stereoAtoms;
387 atomindex_t d_index;
388 atomindex_t d_beginAtomIdx, d_endAtomIdx;
389 bool df_isAromatic;
390 bool df_isConjugated;
391 std::uint8_t d_bondType;
392 std::uint8_t d_dirTag;
393 std::uint8_t d_stereo;
394 std::uint64_t d_flags = 0;
395
396 void initBond();
397};
398
399 inline bool isDative(const Bond::BondType bt) {
400 return bt == Bond::BondType::DATIVE || bt == Bond::BondType::DATIVEL ||
401 bt == Bond::BondType::DATIVER || bt == Bond::BondType::DATIVEONE;
402}
403
404 inline bool isDative(const Bond &bond) {
405 auto bt = bond.getBondType();
406 return isDative(bt);
407}
408
409 inline bool canSetDoubleBondStereo(const Bond &bond) {
410 auto bondType = bond.getBondType();
411 return (bondType == Bond::SINGLE || bondType == Bond::AROMATIC ||
412 isDative(bond));
413}
414
415 inline bool canHaveDirection(const Bond &bond) {
416 auto bondType = bond.getBondType();
417 return (bondType == Bond::SINGLE || bondType == Bond::AROMATIC);
418}
419
420//! returns twice the \c bondType
421//! (e.g. SINGLE->2, AROMATIC->3, etc.)
422 RDKIT_GRAPHMOL_EXPORT extern uint8_t getTwiceBondType(const RDKit::Bond &b);
423
424}; // namespace RDKit
425
426//! allows Bond objects to be dumped to streams
427 RDKIT_GRAPHMOL_EXPORT extern std::ostream &operator<<(std::ostream &target,
428 const RDKit::Bond &b);
429
430#endif
operator<<
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Bond &b)
allows Bond objects to be dumped to streams
Invariant.h
PRECONDITION
#define PRECONDITION(expr, mess)
Definition Invariant.h:108
QueryObjects.h
Pulls in all the query types.
RDProps.h
Queries::Query
Base class for all queries.
Definition Query.h:45
RDKit::Atom
The class for representing atoms.
Definition Atom.h:74
RDKit::Bond
class for representing a bond
Definition Bond.h:46
RDKit::Bond::getBeginAtomIdx
unsigned int getBeginAtomIdx() const
returns the index of our begin Atom
Definition Bond.h:219
RDKit::Bond::d_index
atomindex_t d_index
Definition Bond.h:387
RDKit::Bond::getEndAtom
Atom * getEndAtom() const
returns a pointer to our end Atom
RDKit::Bond::updatePropertyCache
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
Definition Bond.h:370
RDKit::Bond::getFlags
std::uint64_t & getFlags()
Definition Bond.h:378
RDKit::Bond::getBondTypeAsDouble
double getBondTypeAsDouble() const
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
RDKit::Bond::setEndAtomIdx
void setEndAtomIdx(unsigned int what)
sets the index of our end Atom
RDKit::Bond::getOtherAtomIdx
unsigned int getOtherAtomIdx(unsigned int thisIdx) const
given the index of one Atom, returns the index of the other
RDKit::Bond::dp_stereoAtoms
INT_VECT * dp_stereoAtoms
Definition Bond.h:386
RDKit::Bond::~Bond
virtual ~Bond()
RDKit::Bond::BondType
BondType
the type of Bond
Definition Bond.h:55
RDKit::Bond::ZERO
@ ZERO
Zero-order bond (from.
Definition Bond.h:77
RDKit::Bond::DATIVER
@ DATIVER
standard two-electron dative
Definition Bond.h:75
RDKit::Bond::QUINTUPLE
@ QUINTUPLE
Definition Bond.h:61
RDKit::Bond::TWOANDAHALF
@ TWOANDAHALF
Definition Bond.h:64
RDKit::Bond::HYDROGEN
@ HYDROGEN
Definition Bond.h:70
RDKit::Bond::THREECENTER
@ THREECENTER
Definition Bond.h:71
RDKit::Bond::FIVEANDAHALF
@ FIVEANDAHALF
Definition Bond.h:67
RDKit::Bond::QUADRUPLE
@ QUADRUPLE
Definition Bond.h:60
RDKit::Bond::FOURANDAHALF
@ FOURANDAHALF
Definition Bond.h:66
RDKit::Bond::AROMATIC
@ AROMATIC
Definition Bond.h:68
RDKit::Bond::THREEANDAHALF
@ THREEANDAHALF
Definition Bond.h:65
RDKit::Bond::IONIC
@ IONIC
Definition Bond.h:69
RDKit::Bond::DOUBLE
@ DOUBLE
Definition Bond.h:58
RDKit::Bond::HEXTUPLE
@ HEXTUPLE
Definition Bond.h:62
RDKit::Bond::TRIPLE
@ TRIPLE
Definition Bond.h:59
RDKit::Bond::ONEANDAHALF
@ ONEANDAHALF
Definition Bond.h:63
RDKit::Bond::DATIVE
@ DATIVE
standard two-electron dative
Definition Bond.h:73
RDKit::Bond::SINGLE
@ SINGLE
Definition Bond.h:57
RDKit::Bond::OTHER
@ OTHER
Definition Bond.h:76
RDKit::Bond::DATIVEONE
@ DATIVEONE
one-electron dative (e.g. from a C in a Cp ring to a metal)
Definition Bond.h:72
RDKit::Bond::DATIVEL
@ DATIVEL
standard two-electron dative
Definition Bond.h:74
RDKit::Bond::UNSPECIFIED
@ UNSPECIFIED
Definition Bond.h:56
RDKit::Bond::Bond
Bond(const Bond &other)
RDKit::Bond::RWMol
friend class RWMol
Definition Bond.h:47
RDKit::Bond::initBond
void initBond()
RDKit::Bond::setIsAromatic
void setIsAromatic(bool what)
sets our isAromatic flag
Definition Bond.h:174
RDKit::Bond::getIdx
unsigned int getIdx() const
returns our index within the ROMol
Definition Bond.h:205
RDKit::Bond::setBeginAtom
void setBeginAtom(Atom *at)
sets our begin Atom
RDKit::Bond::getIsConjugated
bool getIsConjugated() const
returns the status of our isConjugated flag
Definition Bond.h:181
RDKit::Bond::hasOwningMol
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
Definition Bond.h:184
RDKit::Bond::getQuery
virtual QUERYBOND_QUERY * getQuery() const
NOT CALLABLE.
RDKit::Bond::hasQuery
virtual bool hasQuery() const
Definition Bond.h:286
RDKit::Bond::setStereoAtoms
void setStereoAtoms(unsigned int bgnIdx, unsigned int endIdx)
sets the atoms to be considered as reference points for bond stereo
RDKit::Bond::setBeginAtomIdx
void setBeginAtomIdx(unsigned int what)
sets the index of our begin Atom
RDKit::Bond::d_flags
std::uint64_t d_flags
Definition Bond.h:394
RDKit::Bond::setIsConjugated
void setIsConjugated(bool what)
sets our isConjugated flag
Definition Bond.h:179
RDKit::Bond::QUERYBOND_QUERY
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
Definition Bond.h:52
RDKit::Bond::getBondType
BondType getBondType() const
returns our bondType
Definition Bond.h:159
RDKit::Bond::getOwningMol
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
Definition Bond.h:187
RDKit::Bond::setQuery
virtual void setQuery(QUERYBOND_QUERY *what)
NOT CALLABLE.
RDKit::Bond::operator=
Bond & operator=(const Bond &other)
RDKit::Bond::setOwningMol
void setOwningMol(ROMol *other)
sets our owning molecule
RDKit::Bond::setBondType
void setBondType(BondType bT)
sets our bondType
Definition Bond.h:161
RDKit::Bond::df_isAromatic
bool df_isAromatic
Definition Bond.h:389
RDKit::Bond::Bond
Bond()
RDKit::Bond::d_beginAtomIdx
atomindex_t d_beginAtomIdx
Definition Bond.h:388
RDKit::Bond::d_endAtomIdx
atomindex_t d_endAtomIdx
Definition Bond.h:388
RDKit::Bond::getOtherAtom
Atom * getOtherAtom(Atom const *what) const
returns a pointer to the other Atom
RDKit::Bond::getStereoAtoms
INT_VECT & getStereoAtoms()
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition Bond.h:358
RDKit::Bond::ROMol
friend class ROMol
Definition Bond.h:48
RDKit::Bond::BondDir
BondDir
the bond's direction (for chirality)
Definition Bond.h:82
RDKit::Bond::EITHERDOUBLE
@ EITHERDOUBLE
a "crossed" double bond
Definition Bond.h:89
RDKit::Bond::BEGINWEDGE
@ BEGINWEDGE
wedged: narrow at begin
Definition Bond.h:84
RDKit::Bond::ENDUPRIGHT
@ ENDUPRIGHT
ditto
Definition Bond.h:88
RDKit::Bond::UNKNOWN
@ UNKNOWN
intentionally unspecified stereochemistry
Definition Bond.h:90
RDKit::Bond::NONE
@ NONE
no special style
Definition Bond.h:83
RDKit::Bond::ENDDOWNRIGHT
@ ENDDOWNRIGHT
for cis/trans
Definition Bond.h:87
RDKit::Bond::BEGINDASH
@ BEGINDASH
dashed: narrow at begin
Definition Bond.h:85
RDKit::Bond::Bond
Bond(Bond &&o) noexcept
Definition Bond.h:114
RDKit::Bond::expandQuery
virtual void expandQuery(QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
RDKit::Bond::getBeginAtom
Atom * getBeginAtom() const
returns a pointer to our begin Atom
RDKit::Bond::setOwningMol
void setOwningMol(ROMol &other)
sets our owning molecule
Definition Bond.h:194
RDKit::Bond::getStereoAtoms
const INT_VECT & getStereoAtoms() const
returns the indices of our stereo atoms
Definition Bond.h:351
RDKit::Bond::d_stereo
std::uint8_t d_stereo
Definition Bond.h:393
RDKit::Bond::getStereo
BondStereo getStereo() const
returns our stereo code
Definition Bond.h:334
RDKit::Bond::setStereo
void setStereo(BondStereo what)
sets our stereo code
Definition Bond.h:326
RDKit::Bond::setIdx
void setIdx(unsigned int index)
sets our index within the ROMol
Definition Bond.h:212
RDKit::Bond::getEndAtomIdx
unsigned int getEndAtomIdx() const
returns the index of our end Atom
Definition Bond.h:226
RDKit::Bond::copy
virtual Bond * copy() const
returns a copy
RDKit::Bond::setFlags
void setFlags(std::uint64_t flags)
Definition Bond.h:376
RDKit::Bond::d_dirTag
std::uint8_t d_dirTag
Definition Bond.h:392
RDKit::Bond::d_bondType
std::uint8_t d_bondType
Definition Bond.h:391
RDKit::Bond::operator=
Bond & operator=(Bond &&o) noexcept
Definition Bond.h:129
RDKit::Bond::getValenceContrib
virtual double getValenceContrib(const Atom *at) const
returns our contribution to the explicit valence of an Atom
RDKit::Bond::setEndAtom
void setEndAtom(Atom *at)
sets our end Atom
RDKit::Bond::dp_mol
ROMol * dp_mol
Definition Bond.h:385
RDKit::Bond::setBondDir
void setBondDir(BondDir what)
sets our direction
Definition Bond.h:310
RDKit::Bond::BondStereo
BondStereo
the nature of the bond's stereochem (for cis/trans)
Definition Bond.h:94
RDKit::Bond::STEREOTRANS
@ STEREOTRANS
Definition Bond.h:102
RDKit::Bond::STEREOE
@ STEREOE
Definition Bond.h:100
RDKit::Bond::STEREOZ
@ STEREOZ
Definition Bond.h:99
RDKit::Bond::STEREOATROPCCW
@ STEREOATROPCCW
Definition Bond.h:104
RDKit::Bond::STEREOCIS
@ STEREOCIS
Definition Bond.h:101
RDKit::Bond::STEREONONE
@ STEREONONE
Definition Bond.h:95
RDKit::Bond::STEREOATROPCW
@ STEREOATROPCW
Definition Bond.h:103
RDKit::Bond::STEREOANY
@ STEREOANY
Definition Bond.h:96
RDKit::Bond::getIsAromatic
bool getIsAromatic() const
returns the status of our isAromatic flag
Definition Bond.h:176
RDKit::Bond::getFlags
std::uint64_t getFlags() const
Definition Bond.h:377
RDKit::Bond::Match
virtual bool Match(Bond const *what) const
returns whether or not we match the argument
RDKit::Bond::getBondDir
BondDir getBondDir() const
returns our direction
Definition Bond.h:312
RDKit::Bond::invertChirality
bool invertChirality()
RDKit::Bond::Bond
Bond(BondType bT)
construct with a particular BondType
RDKit::Bond::df_isConjugated
bool df_isConjugated
Definition Bond.h:390
RDKit::RDProps::operator=
RDProps & operator=(const RDProps &rhs)
Definition RDProps.h:24
RDKit::RDProps::RDProps
RDProps()
Definition RDProps.h:22
RDKit::ROMol
Definition ROMol.h:199
RDKit::RWMol
RWMol is a molecule class that is intended to be edited.
Definition RWMol.h:32
details.h
export.h
RDKIT_GRAPHMOL_EXPORT
#define RDKIT_GRAPHMOL_EXPORT
Definition export.h:249
Queries::CompositeQueryType
CompositeQueryType
Definition QueryObjects.h:36
Queries::COMPOSITE_AND
@ COMPOSITE_AND
Definition QueryObjects.h:36
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::INT_VECT
std::vector< int > INT_VECT
Definition types.h:303
RDKit::canHaveDirection
bool canHaveDirection(const Bond &bond)
Definition Bond.h:415
RDKit::canSetDoubleBondStereo
bool canSetDoubleBondStereo(const Bond &bond)
Definition Bond.h:409
RDKit::isDative
bool isDative(const Bond::BondType bt)
Definition Bond.h:399
RDKit::atomindex_t
std::uint32_t atomindex_t
Definition details.h:14
RDKit::getTwiceBondType
RDKIT_GRAPHMOL_EXPORT uint8_t getTwiceBondType(const RDKit::Bond &b)
types.h