116 df_isAromatic = o.df_isAromatic;
117 df_isConjugated = o.df_isConjugated;
118 d_bondType = o.d_bondType;
119 d_dirTag = o.d_dirTag;
120 d_stereo = o.d_stereo;
122 d_beginAtomIdx = o.d_beginAtomIdx;
123 d_endAtomIdx = o.d_endAtomIdx;
126 dp_mol = std::exchange(o.dp_mol,
nullptr);
127 dp_stereoAtoms = std::exchange(o.dp_stereoAtoms,
nullptr);
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;
140 d_beginAtomIdx = o.d_beginAtomIdx;
141 d_endAtomIdx = o.d_endAtomIdx;
144 delete dp_stereoAtoms;
145 dp_mol = std::exchange(o.dp_mol,
nullptr);
146 dp_stereoAtoms = std::exchange(o.dp_stereoAtoms,
nullptr);
204 unsigned int getIdx()
const {
return d_index; }
211 void setIdx(
unsigned int index) { d_index = index; }
297 bool maintainOrder =
true);
326 PRECONDITION(((what != STEREOCIS && what != STEREOTRANS) ||
327 getStereoAtoms().size() == 2),
328 "Stereo atoms should be specified before specifying CIS/TRANS "
329 "bond stereochemistry")
351 if (!dp_stereoAtoms) {
352 const_cast<Bond *
>(
this)->dp_stereoAtoms =
new INT_VECT();
354 return *dp_stereoAtoms;
358 if (!dp_stereoAtoms) {
361 return *dp_stereoAtoms;
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::Bond &b)
allows Bond objects to be dumped to streams
#define PRECONDITION(expr, mess)
Pulls in all the query types.
Base class for all queries.
The class for representing atoms.
class for representing a bond
unsigned int getBeginAtomIdx() const
returns the index of our begin Atom
Atom * getEndAtom() const
returns a pointer to our end Atom
void updatePropertyCache(bool strict=true)
calculates any of our lazy properties
double getBondTypeAsDouble() const
returns our bondType as a double (e.g. SINGLE->1.0, AROMATIC->1.5, etc.)
void setEndAtomIdx(unsigned int what)
sets 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
INT_VECT * dp_stereoAtoms
@ DATIVER
standard two-electron dative
@ DATIVE
standard two-electron dative
@ DATIVEONE
one-electron dative (e.g. from a C in a Cp ring to a metal)
@ DATIVEL
standard two-electron dative
void setIsAromatic(bool what)
sets our isAromatic flag
unsigned int getIdx() const
returns our index within the ROMol
void setBeginAtom(Atom *at)
sets our begin Atom
bool getIsConjugated() const
returns the status of our isConjugated flag
bool hasOwningMol() const
returns whether or not this instance belongs to a molecule
virtual QUERYBOND_QUERY * getQuery() const
NOT CALLABLE.
virtual bool hasQuery() const
void setStereoAtoms(unsigned int bgnIdx, unsigned int endIdx)
sets the atoms to be considered as reference points for bond stereo
void setBeginAtomIdx(unsigned int what)
sets the index of our begin Atom
void setIsConjugated(bool what)
sets our isConjugated flag
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
BondType getBondType() const
returns our bondType
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this instance
virtual void setQuery(QUERYBOND_QUERY *what)
NOT CALLABLE.
Bond & operator=(const Bond &other)
void setOwningMol(ROMol *other)
sets our owning molecule
void setBondType(BondType bT)
sets our bondType
atomindex_t d_beginAtomIdx
Atom * getOtherAtom(Atom const *what) const
returns a pointer to the other Atom
INT_VECT & getStereoAtoms()
This is an overloaded member function, provided for convenience. It differs from the above function o...
BondDir
the bond's direction (for chirality)
@ EITHERDOUBLE
a "crossed" double bond
@ BEGINWEDGE
wedged: narrow at begin
@ UNKNOWN
intentionally unspecified stereochemistry
@ ENDDOWNRIGHT
for cis/trans
@ BEGINDASH
dashed: narrow at begin
virtual void expandQuery(QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
NOT CALLABLE.
Atom * getBeginAtom() const
returns a pointer to our begin Atom
void setOwningMol(ROMol &other)
sets our owning molecule
const INT_VECT & getStereoAtoms() const
returns the indices of our stereo atoms
BondStereo getStereo() const
returns our stereo code
void setStereo(BondStereo what)
sets our stereo code
void setIdx(unsigned int index)
sets our index within the ROMol
unsigned int getEndAtomIdx() const
returns the index of our end Atom
virtual Bond * copy() const
returns a copy
Bond & operator=(Bond &&o) noexcept
virtual double getValenceContrib(const Atom *at) const
returns our contribution to the explicit valence of an Atom
void setEndAtom(Atom *at)
sets our end Atom
void setBondDir(BondDir what)
sets our direction
BondStereo
the nature of the bond's stereochem (for cis/trans)
bool getIsAromatic() const
returns the status of our isAromatic flag
virtual bool Match(Bond const *what) const
returns whether or not we match the argument
BondDir getBondDir() const
returns our direction
Bond(BondType bT)
construct with a particular BondType
RWMol is a molecule class that is intended to be edited.
#define RDKIT_GRAPHMOL_EXPORT
std::vector< int > INT_VECT
bool rdvalue_is(const RDValue_cast_t)
bool canHaveDirection(const Bond &bond)
bool canSetDoubleBondStereo(const Bond &bond)
bool isDative(const Bond &bond)
std::uint32_t atomindex_t
RDKIT_GRAPHMOL_EXPORT uint8_t getTwiceBondType(const RDKit::Bond &b)