![]() |
RDKit
Open-source cheminformatics and machine learning.
|
Class for storing atomic queries. More...
#include <QueryAtom.h>
Public Types | |
typedef Queries::Query< int, Atom const *, true > | QUERYATOM_QUERY |
![]() | |
enum | HybridizationType { UNSPECIFIED = 0 , S , SP , SP2 , SP3 , SP2D , SP3D , SP3D2 , OTHER } |
store hybridization More... | |
enum | ChiralType { CHI_UNSPECIFIED = 0 , CHI_TETRAHEDRAL_CW , CHI_TETRAHEDRAL_CCW , CHI_OTHER , CHI_TETRAHEDRAL , CHI_ALLENE , CHI_SQUAREPLANAR , CHI_TRIGONALBIPYRAMIDAL , CHI_OCTAHEDRAL } |
store type of chirality More... | |
typedef Queries::Query< int, Atom const *, true > | QUERYATOM_QUERY |
Public Member Functions | |
QueryAtom () | |
QueryAtom (int num) | |
QueryAtom (const Atom &other) | |
QueryAtom (const QueryAtom &other) | |
QueryAtom & | operator= (const QueryAtom &other) |
QueryAtom (QueryAtom &&other) noexcept | |
QueryAtom & | operator= (QueryAtom &&other) noexcept |
~QueryAtom () override | |
Atom * | copy () const override |
returns a copy of this query, owned by the caller More... | |
bool | hasQuery () const override |
std::string | getQueryType () const override |
returns the label associated to this query More... | |
void | setQuery (QUERYATOM_QUERY *what) override |
replaces our current query with the value passed in More... | |
QUERYATOM_QUERY * | getQuery () const override |
returns our current query More... | |
void | expandQuery (QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) override |
expands our current query More... | |
bool | Match (Atom const *what) const override |
returns true if we match Atom what More... | |
bool | QueryMatch (QueryAtom const *what) const |
returns true if our query details match those of QueryAtom what More... | |
![]() | |
Atom () | |
Atom (unsigned int num) | |
construct an Atom with a particular atomic number More... | |
Atom (const std::string &what) | |
Atom (const Atom &other) | |
Atom & | operator= (const Atom &other) |
Atom (Atom &&other)=default | |
Atom & | operator= (Atom &&other)=default |
virtual | ~Atom () |
virtual Atom * | copy () const |
makes a copy of this Atom and returns a pointer to it. More... | |
int | getAtomicNum () const |
returns our atomic number More... | |
void | setAtomicNum (int newNum) |
sets our atomic number More... | |
std::string | getSymbol () const |
returns our symbol (determined by our atomic number) More... | |
bool | hasOwningMol () const |
returns whether or not this instance belongs to a molecule More... | |
ROMol & | getOwningMol () const |
returns a reference to the ROMol that owns this instance More... | |
unsigned int | getIdx () const |
returns our index within the ROMol More... | |
void | setIdx (unsigned int index) |
sets our index within the ROMol More... | |
template<class U > | |
void | setIdx (const U index) |
overload More... | |
unsigned int | getDegree () const |
unsigned int | getTotalDegree () const |
unsigned int | getTotalNumHs (bool includeNeighbors=false) const |
returns the total number of Hs (implicit and explicit) that this Atom is bound to More... | |
unsigned int | getTotalValence () const |
returns the total valence (implicit and explicit) for an atom More... | |
unsigned int | getNumImplicitHs () const |
returns the number of implicit Hs this Atom is bound to More... | |
int | getExplicitValence () const |
returns the explicit valence (including Hs) of this atom More... | |
int | getImplicitValence () const |
returns the implicit valence for this Atom More... | |
unsigned int | getNumRadicalElectrons () const |
returns the number of radical electrons for this Atom More... | |
void | setNumRadicalElectrons (unsigned int num) |
int | getFormalCharge () const |
returns the formal charge of this atom More... | |
void | setFormalCharge (int what) |
set's the formal charge of this atom More... | |
void | setNoImplicit (bool what) |
sets our noImplicit flag, indicating whether or not we are allowed to have implicit Hs More... | |
bool | getNoImplicit () const |
returns the noImplicit flag More... | |
void | setNumExplicitHs (unsigned int what) |
sets our number of explicit Hs More... | |
unsigned int | getNumExplicitHs () const |
returns our number of explicit Hs More... | |
void | setIsAromatic (bool what) |
sets our isAromatic flag, indicating whether or not we are aromatic More... | |
bool | getIsAromatic () const |
returns our isAromatic flag More... | |
double | getMass () const |
returns our mass More... | |
void | setIsotope (unsigned int what) |
sets our isotope number More... | |
unsigned int | getIsotope () const |
returns our isotope number More... | |
void | setChiralTag (ChiralType what) |
sets our chiralTag More... | |
bool | invertChirality () |
inverts our chiralTag , returns whether or not a change was made More... | |
ChiralType | getChiralTag () const |
returns our chiralTag More... | |
void | setHybridization (HybridizationType what) |
sets our hybridization More... | |
HybridizationType | getHybridization () const |
returns our hybridization More... | |
virtual bool | hasQuery () const |
virtual std::string | getQueryType () const |
virtual void | setQuery (QUERYATOM_QUERY *what) |
NOT CALLABLE. More... | |
virtual QUERYATOM_QUERY * | getQuery () const |
NOT CALLABLE. More... | |
virtual void | expandQuery (QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) |
NOT CALLABLE. More... | |
virtual bool | Match (Atom const *what) const |
returns whether or not we match the argument More... | |
int | getPerturbationOrder (const INT_LIST &probe) const |
returns the perturbation order for a list of integers More... | |
void | updatePropertyCache (bool strict=true) |
calculates any of our lazy properties More... | |
bool | needsUpdatePropertyCache () const |
int | calcExplicitValence (bool strict=true) |
calculates and returns our explicit valence More... | |
int | calcImplicitValence (bool strict=true) |
calculates and returns our implicit valence More... | |
AtomMonomerInfo * | getMonomerInfo () |
const AtomMonomerInfo * | getMonomerInfo () const |
void | setMonomerInfo (AtomMonomerInfo *info) |
takes ownership of the pointer More... | |
void | setAtomMapNum (int mapno, bool strict=true) |
Set the atom map Number of the atom. More... | |
int | getAtomMapNum () const |
![]() | |
RDProps () | |
RDProps (const RDProps &rhs) | |
RDProps & | operator= (const RDProps &rhs) |
RDProps (RDProps &&o) noexcept=default | |
RDProps & | operator= (RDProps &&rhs) noexcept=default |
void | clear () |
const Dict & | getDict () const |
gets the underlying Dictionary More... | |
Dict & | getDict () |
STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const |
returns a list with the names of our properties More... | |
template<typename T > | |
void | setProp (const std::string &key, T val, bool computed=false) const |
sets a property value More... | |
template<typename T > | |
void | getProp (const std::string &key, T &res) const |
allows retrieval of a particular property value More... | |
template<typename T > | |
T | getProp (const std::string &key) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
template<typename T > | |
bool | getPropIfPresent (const std::string &key, T &res) const |
bool | hasProp (const std::string &key) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
void | clearProp (const std::string &key) const |
clears the value of a property More... | |
void | clearComputedProps () const |
clears all of our computed properties More... | |
void | updateProps (const RDProps &source, bool preserveExisting=false) |
update the properties from another More... | |
Additional Inherited Members | |
![]() | |
void | setOwningMol (ROMol *other) |
sets our owning molecule More... | |
void | setOwningMol (ROMol &other) |
sets our owning molecule More... | |
void | initAtom () |
void | initFromOther (const Atom &other) |
![]() | |
bool | df_isAromatic |
bool | df_noImplicit |
std::uint8_t | d_numExplicitHs |
std::int8_t | d_formalCharge |
std::uint8_t | d_atomicNum |
std::int8_t | d_implicitValence |
std::int8_t | d_explicitValence |
std::uint8_t | d_numRadicalElectrons |
std::uint8_t | d_chiralTag |
std::uint8_t | d_hybrid |
std::uint16_t | d_isotope |
atomindex_t | d_index |
ROMol * | dp_mol |
AtomMonomerInfo * | dp_monomerInfo |
![]() | |
Dict | d_props |
Class for storing atomic queries.
QueryAtom objects are derived from Atom objects, so they can be added to molecules and the like, but they have much fancier querying capabilities.
Definition at line 28 of file QueryAtom.h.
typedef Queries::Query<int, Atom const *, true> RDKit::QueryAtom::QUERYATOM_QUERY |
Definition at line 30 of file QueryAtom.h.
|
inline |
Definition at line 32 of file QueryAtom.h.
|
inlineexplicit |
Definition at line 33 of file QueryAtom.h.
|
inlineexplicit |
Definition at line 34 of file QueryAtom.h.
References Queries::COMPOSITE_AND, RDKit::Atom::getFormalCharge(), RDKit::Atom::getIsotope(), RDKit::Atom::getNumRadicalElectrons(), RDKit::makeAtomFormalChargeQuery(), RDKit::makeAtomIsotopeQuery(), and RDKit::makeAtomNumRadicalElectronsQuery().
|
inline |
Definition at line 50 of file QueryAtom.h.
References Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy().
|
inlinenoexcept |
Definition at line 71 of file QueryAtom.h.
|
override |
|
overridevirtual |
returns a copy of this query, owned by the caller
Reimplemented from RDKit::Atom.
|
overridevirtual |
expands our current query
what | the Queries::Query to be added. The ownership of the query is passed to the current object, where it might be deleted, so that the pointer should not be used again in the calling code. |
how | the operator to be used in the expansion |
maintainOrder | (optional) flags whether the relative order of the queries needs to be maintained, if this is false, the order is reversed Notes:
|
Reimplemented from RDKit::Atom.
|
inlineoverridevirtual |
returns our current query
Reimplemented from RDKit::Atom.
Definition at line 100 of file QueryAtom.h.
|
inlineoverridevirtual |
returns the label associated to this query
Reimplemented from RDKit::Atom.
Definition at line 92 of file QueryAtom.h.
|
inlineoverridevirtual |
Reimplemented from RDKit::Atom.
Definition at line 89 of file QueryAtom.h.
|
overridevirtual |
returns true if we match Atom what
Reimplemented from RDKit::Atom.
Definition at line 57 of file QueryAtom.h.
References Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), and RDKit::Atom::operator=().
Referenced by operator=().
Definition at line 74 of file QueryAtom.h.
References operator=().
bool RDKit::QueryAtom::QueryMatch | ( | QueryAtom const * | what | ) | const |
returns true if our query details match those of QueryAtom what
|
inlineoverridevirtual |
replaces our current query with the value passed in
Reimplemented from RDKit::Atom.
Definition at line 95 of file QueryAtom.h.