QueryOps.h
Go to the documentation of this file.
//
// Copyright (C) 2003-2010 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
//! \file QueryOps.h
/*!
\brief Includes a bunch of functionality for handling Atom and Bond queries.
*/
#ifndef _RD_QUERY_OPS_H
#define _RD_QUERY_OPS_H
#include <GraphMol/RDKitBase.h>
#include <Query/QueryObjects.h>
#include <Query/Query.h>
#ifdef RDK_THREADSAFE_SSS
#include <boost/thread/mutex.hpp>
#endif
namespace RDKit{
typedef Queries::Query<bool,Atom const *,true> ATOM_BOOL_QUERY;
typedef Queries::Query<bool,Bond const *,true> BOND_BOOL_QUERY;
typedef Queries::AndQuery<int,Atom const *,true> ATOM_AND_QUERY;
typedef Queries::AndQuery<int,Bond const *,true> BOND_AND_QUERY;
typedef Queries::OrQuery<int,Atom const *,true> ATOM_OR_QUERY;
typedef Queries::OrQuery<int,Bond const *,true> BOND_OR_QUERY;
typedef Queries::XOrQuery<int,Atom const *,true> ATOM_XOR_QUERY;
typedef Queries::XOrQuery<int,Bond const *,true> BOND_XOR_QUERY;
typedef Queries::EqualityQuery<int,Atom const *,true> ATOM_EQUALS_QUERY;
typedef Queries::EqualityQuery<int,Bond const *,true> BOND_EQUALS_QUERY;
typedef Queries::GreaterQuery<int,Atom const *,true> ATOM_GREATER_QUERY;
typedef Queries::GreaterQuery<int,Bond const *,true> BOND_GREATER_QUERY;
typedef Queries::GreaterEqualQuery<int,Atom const *,true> ATOM_GREATEREQUAL_QUERY;
typedef Queries::GreaterEqualQuery<int,Bond const *,true> BOND_GREATEREQUAL_QUERY;
typedef Queries::LessQuery<int,Atom const *,true> ATOM_LESS_QUERY;
typedef Queries::LessQuery<int,Bond const *,true> BOND_LESS_QUERY;
typedef Queries::LessEqualQuery<int,Atom const *,true> ATOM_LESSEQUAL_QUERY;
typedef Queries::LessEqualQuery<int,Bond const *,true> BOND_LESSEQUAL_QUERY;
typedef Queries::RangeQuery<int,Atom const *,true> ATOM_RANGE_QUERY;
typedef Queries::RangeQuery<int,Bond const *,true> BOND_RANGE_QUERY;
typedef Queries::SetQuery<int,Atom const *,true> ATOM_SET_QUERY;
typedef Queries::SetQuery<int,Bond const *,true> BOND_SET_QUERY;
typedef Queries::Query<int,Bond const *,true> BOND_NULL_QUERY;
typedef Queries::Query<int,Atom const *,true> ATOM_NULL_QUERY;
// -------------------------------------------------
// common atom queries
static int queryAtomAromatic(Atom const * at) { return at->getIsAromatic(); };
static int queryAtomAliphatic(Atom const * at) { return !(at->getIsAromatic()); };
static int queryAtomExplicitDegree(Atom const * at) { return at->getDegree(); };
static int queryAtomTotalDegree(Atom const * at) { return at->getTotalDegree(); };
static int queryAtomHeavyAtomDegree(Atom const * at) { return at->getTotalDegree()-at->getTotalNumHs(true); };
static int queryAtomHCount(Atom const * at) { return at->getTotalNumHs(true); };
static int queryAtomImplicitHCount(Atom const * at) { return at->getTotalNumHs(false); };
static int queryAtomHasImplicitH(Atom const * at) { return int(at->getTotalNumHs(false)>0); };
static int queryAtomImplicitValence(Atom const * at) { return at->getImplicitValence(); };
static int queryAtomExplicitValence(Atom const * at) { return at->getExplicitValence() - at->getNumExplicitHs(); };
static int queryAtomTotalValence(Atom const * at) { return at->getExplicitValence()+at->getImplicitValence(); };
static int queryAtomUnsaturated(Atom const * at) { return static_cast<int>(at->getDegree())<at->getExplicitValence(); };
static int queryAtomNum(Atom const * at) { return at->getAtomicNum(); };
static int massIntegerConversionFactor=1000;
static int queryAtomMass(Atom const * at) {
return static_cast<int>(round(massIntegerConversionFactor*at->getMass()));
};
static int queryAtomIsotope(Atom const * at) {
return static_cast<int>(at->getIsotope());
};
static int queryAtomFormalCharge(Atom const * at) {
return static_cast<int>(at->getFormalCharge());
};
static int queryAtomHybridization(Atom const * at) { return at->getHybridization(); };
unsigned int queryAtomBondProduct(Atom const * at);
unsigned int queryAtomAllBondProduct(Atom const * at);
// -------------------------------------------------
// common bond queries
static int queryBondOrder(Bond const * bond) { return static_cast<int>(bond->getBondType()); };
static int queryBondDir(Bond const * bond) { return static_cast<int>(bond->getBondDir()); };
static int queryIsBondInNRings(Bond const * at) {
return at->getOwningMol().getRingInfo()->numBondRings(at->getIdx());
};
// -------------------------------------------------
// ring queries
static int queryIsAtomInNRings(Atom const * at) {
return at->getOwningMol().getRingInfo()->numAtomRings(at->getIdx());
};
static int queryIsAtomInRing(Atom const * at) {
return at->getOwningMol().getRingInfo()->numAtomRings(at->getIdx())!=0;
};
static int queryAtomHasRingBond(Atom const * at) {
ROMol::OBOND_ITER_PAIR atomBonds=at->getOwningMol().getAtomBonds(at);
while(atomBonds.first != atomBonds.second){
unsigned int bondIdx=at->getOwningMol().getTopology()[*atomBonds.first]->getIdx();
if(at->getOwningMol().getRingInfo()->numBondRings(bondIdx)) {
return 1;
}
++atomBonds.first;
}
return 0;
};
static int queryIsBondInRing(Bond const * bond) {
return bond->getOwningMol().getRingInfo()->numBondRings(bond->getIdx())!=0;
};
static int queryAtomMinRingSize(Atom const *at){
return at->getOwningMol().getRingInfo()->minAtomRingSize(at->getIdx());
};
static int queryBondMinRingSize(Bond const *bond){
return bond->getOwningMol().getRingInfo()->minBondRingSize(bond->getIdx());
};
static int queryAtomRingBondCount(Atom const *at) {
// EFF: cache this result
int res=0;
ROMol::OBOND_ITER_PAIR atomBonds=at->getOwningMol().getAtomBonds(at);
while(atomBonds.first != atomBonds.second){
unsigned int bondIdx=at->getOwningMol().getTopology()[*atomBonds.first]->getIdx();
if(at->getOwningMol().getRingInfo()->numBondRings(bondIdx)) {
res++;
}
++atomBonds.first;
}
return res;
}
template <int tgt>
int queryAtomIsInRingOfSize(Atom const *at) {
if(at->getOwningMol().getRingInfo()->isAtomInRingOfSize(at->getIdx(),tgt)){
return tgt;
} else {
return 0;
}
};
template <int tgt>
int queryBondIsInRingOfSize(Bond const *bond) {
if(bond->getOwningMol().getRingInfo()->isBondInRingOfSize(bond->getIdx(),tgt)){
return tgt;
} else {
return 0;
}
};
template <class T>
T *makeAtomSimpleQuery(int what,int func(Atom const *),const std::string &description="Atom Simple"){
T *res = new T;
res->setVal(what);
res->setDataFunc(func);
res->setDescription(description);
return res;
}
//! returns a Query for matching atomic number
template <class T>
T *makeAtomNumQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomNum,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomNumQuery(int what);
//! returns a Query for matching implicit valence
template <class T>
T *makeAtomImplicitValenceQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomImplicitValence,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomImplicitValenceQuery(int what);
//! returns a Query for matching explicit valence
template <class T>
T *makeAtomExplicitValenceQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomExplicitValence,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomExplicitValenceQuery(int what);
//! returns a Query for matching total valence
template <class T>
T *makeAtomTotalValenceQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomTotalValence,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomTotalValenceQuery(int what);
//! returns a Query for matching explicit degree
template <class T>
T *makeAtomExplicitDegreeQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomExplicitDegree,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomExplicitDegreeQuery(int what);
//! returns a Query for matching atomic degree
template <class T>
T *makeAtomTotalDegreeQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomTotalDegree,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomTotalDegreeQuery(int what);
//! returns a Query for matching hydrogen count
template <class T>
T *makeAtomHCountQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomHCount,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomHCountQuery(int what);
//! returns a Query for matching ring atoms
template <class T>
T *makeAtomHasImplicitHQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(true,queryAtomHasImplicitH,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomHasImplicitHQuery();
//! returns a Query for matching implicit hydrogen count
template <class T>
T *makeAtomImplicitHCountQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomImplicitHCount,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomImplicitHCountQuery(int what);
//! returns a Query for matching the \c isAromatic flag
template <class T>
T *makeAtomAromaticQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(true,queryAtomAromatic,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomAromaticQuery();
//! returns a Query for matching aliphatic atoms
template <class T>
T *makeAtomAliphaticQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(true,queryAtomAliphatic,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomAliphaticQuery();
//! returns a Query for matching atoms with a particular mass
template <class T>
T *makeAtomMassQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(massIntegerConversionFactor*what,queryAtomMass,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomMassQuery(int what);
//! returns a Query for matching atoms with a particular isotope
template <class T>
T *makeAtomIsotopeQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomIsotope,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomIsotopeQuery(int what);
//! returns a Query for matching formal charge
template <class T>
T *makeAtomFormalChargeQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomFormalCharge,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomFormalChargeQuery(int what);
//! returns a Query for matching hybridization
template <class T>
T *makeAtomHybridizationQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomHybridization,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomHybridizationQuery(int what);
//! returns a Query for matching atoms with unsaturation:
template <class T>
T *makeAtomUnsaturatedQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(true,queryAtomUnsaturated,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomUnsaturatedQuery();
//! returns a Query for matching ring atoms
template <class T>
T *makeAtomInRingQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(true,queryIsAtomInRing,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomInRingQuery();
//! returns a Query for matching atoms in a particular number of rings
template <class T>
T *makeAtomInNRingsQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryIsAtomInNRings,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomInNRingsQuery(int what);
//! returns a Query for matching atoms in rings of a particular size
ATOM_EQUALS_QUERY *makeAtomInRingOfSizeQuery(int tgt);
//! returns a Query for matching an atom's minimum ring size
template <class T>
T *makeAtomMinRingSizeQuery(int tgt,const std::string &descr){
return makeAtomSimpleQuery<T>(tgt,queryAtomMinRingSize,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomMinRingSizeQuery(int tgt);
//! returns a Query for matching atoms with a particular number of ring bonds
template <class T>
T *makeAtomRingBondCountQuery(int what,const std::string &descr){
return makeAtomSimpleQuery<T>(what,queryAtomRingBondCount,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomRingBondCountQuery(int what);
//! returns a Query for matching atoms with a particular number of ring bonds
template <class T>
T *makeAtomHasRingBondQuery(const std::string &descr){
return makeAtomSimpleQuery<T>(1,queryAtomHasRingBond,descr);
}
//! \overload
ATOM_EQUALS_QUERY *makeAtomHasRingBondQuery();
//! returns a Query for matching bond orders
BOND_EQUALS_QUERY *makeBondOrderEqualsQuery(Bond::BondType what);
//! returns a Query for matching bond directions
BOND_EQUALS_QUERY *makeBondDirEqualsQuery(Bond::BondDir what);
//! returns a Query for matching ring bonds
BOND_EQUALS_QUERY *makeBondIsInRingQuery();
//! returns a Query for matching bonds in rings of a particular size
BOND_EQUALS_QUERY *makeBondInRingOfSizeQuery(int what);
//! returns a Query for matching a bond's minimum ring size
BOND_EQUALS_QUERY *makeBondMinRingSizeQuery(int what);
//! returns a Query for matching bonds in a particular number of rings
BOND_EQUALS_QUERY *makeBondInNRingsQuery(int tgt);
//! returns a Query for matching any bond
BOND_NULL_QUERY *makeBondNullQuery();
//! returns a Query for matching any atom
ATOM_NULL_QUERY *makeAtomNullQuery();
static int queryAtomRingMembership(Atom const *at) {
return static_cast<int>(at->getOwningMol().getRingInfo()->numAtomRings(at->getIdx()));
}
// I'm pretty sure that this typedef shouldn't be necessary,
// but VC++ generates a warning about const Atom const * in
// the definition of Match, then complains about an override
// that differs only by const/volatile (c4301), then generates
// incorrect code if we don't do this... so let's do it.
typedef Atom const *ConstAtomPtr;
class AtomRingQuery : public Queries::EqualityQuery<int, ConstAtomPtr,true> {
public:
AtomRingQuery() : Queries::EqualityQuery<int,ConstAtomPtr,true>(-1) {
// default is to just do a number of rings query:
this->setDescription("AtomInNRings");
this->setDataFunc(queryAtomRingMembership);
};
explicit AtomRingQuery(int v) : Queries::EqualityQuery<int,ConstAtomPtr,true>(v) {
// default is to just do a number of rings query:
this->setDescription("AtomInNRings");
this->setDataFunc(queryAtomRingMembership);
};
virtual bool Match(const ConstAtomPtr what) const {
int v = this->TypeConvert(what,Queries::Int2Type<true>());
bool res;
if(this->d_val<0){
res = v!=0;
} else {
res=!Queries::queryCmp(v,this->d_val,this->d_tol);
}
if(this->getNegation()){
res=!res;
}
return res;
}
//! returns a copy of this query
Queries::Query<int,ConstAtomPtr,true> *
copy() const {
AtomRingQuery *res = new AtomRingQuery(this->d_val);
res->setNegation(getNegation());
res->setTol(this->getTol());
res->d_description = this->d_description;
res->d_dataFunc = this->d_dataFunc;
return res;
}
};
//! allows use of recursive structure queries (e.g. recursive SMARTS)
class RecursiveStructureQuery : public Queries::SetQuery<int,Atom const *,true> {
public:
RecursiveStructureQuery() :
Queries::SetQuery<int,Atom const *,true>(),
d_serialNumber(0)
{
setDataFunc(getAtIdx);
setDescription("RecursiveStructure");
};
//! initialize from an ROMol pointer
/*!
<b>Notes</b>
- this takes over ownership of the pointer
*/
RecursiveStructureQuery(ROMol const *query,unsigned int serialNumber=0) :
Queries::SetQuery<int,Atom const *,true>(),
d_serialNumber(serialNumber)
{
setQueryMol(query);
setDataFunc(getAtIdx);
setDescription("RecursiveStructure");
};
//! returns the index of an atom
static int getAtIdx(Atom const *at) {
PRECONDITION(at,"bad atom argument");
return at->getIdx();
};
//! sets the molecule we'll use recursively
/*!
<b>Notes</b>
- this takes over ownership of the pointer
*/
void setQueryMol(ROMol const *query) {
dp_queryMol.reset(query);
}
//! returns a pointer to our query molecule
ROMol const * getQueryMol() const { return dp_queryMol.get(); };
//! returns a copy of this query
Queries::Query<int,Atom const *,true> *
copy() const {
RecursiveStructureQuery *res =
new RecursiveStructureQuery();
res->dp_queryMol.reset(new ROMol(*dp_queryMol,true));
std::set<int>::const_iterator i;
for(i=d_set.begin();i!=d_set.end();i++){
res->insert(*i);
}
res->setNegation(getNegation());
res->d_description = d_description;
res->d_serialNumber=d_serialNumber;
return res;
}
unsigned int getSerialNumber() const { return d_serialNumber; };
#ifdef RDK_THREADSAFE_SSS
boost::mutex d_mutex;
#endif
private:
boost::shared_ptr<const ROMol>dp_queryMol;
unsigned int d_serialNumber;
};
template <typename T>
int nullDataFun(T arg) { return 1; }
template <typename T>
bool nullQueryFun(T arg) { return true; }
typedef Bond const *ConstBondPtr;
// ! Query whether an atom has a property
template<class TargetPtr>
class HasPropQuery : public Queries::EqualityQuery<
int, TargetPtr, true> {
std::string propname;
public:
HasPropQuery():
Queries::EqualityQuery<int,TargetPtr,true>(),
propname() {
// default is to just do a number of rings query:
this->setDescription("AtomHasProp");
this->setDataFunc(0);
};
explicit HasPropQuery(const std::string & v) :
Queries::EqualityQuery<int,TargetPtr,true>(),
propname(v) {
// default is to just do a number of rings query:
this->setDescription("AtomHasProp");
this->setDataFunc(0);
};
virtual bool Match(const TargetPtr what) const {
bool res = what->hasProp(propname);
if(this->getNegation()){
res=!res;
}
return res;
}
//! returns a copy of this query
Queries::Query<int,TargetPtr,true> *
copy() const {
HasPropQuery *res = new HasPropQuery(this->propname);
res->setNegation(this->getNegation());
res->d_description = this->d_description;
return res;
}
};
typedef Queries::EqualityQuery<
int,Atom const *,true> ATOM_PROP_QUERY;
typedef Queries::EqualityQuery<
int,Bond const *,true> BOND_PROP_QUERY;
//! returns a Query for matching atoms that have a particular property
template<class Target>
Queries::EqualityQuery<int,const Target *,true> *makeHasPropQuery(
const std::string &property)
{
return new HasPropQuery<const Target *>(property);
}
// ! Query whether an atom has a property with a value
template<class TargetPtr, class T>
class HasPropWithValueQuery : public Queries::EqualityQuery<
int, TargetPtr, true> {
std::string propname;
T val;
T tolerance;
public:
HasPropWithValueQuery():
Queries::EqualityQuery<int,TargetPtr,true>(),
propname(), val() {
// default is to just do a number of rings query:
this->setDescription("HasPropWithValue");
this->setDataFunc(0);
};
explicit HasPropWithValueQuery(const std::string & prop, const T&v,
const T&tol=0.0) :
Queries::EqualityQuery<int,TargetPtr,true>(),
propname(prop),
val(v),
tolerance(tol) {
// default is to just do a number of rings query:
this->setDescription("HasPropWithValue");
this->setDataFunc(0);
};
virtual bool Match(const TargetPtr what) const {
bool res = what->hasProp(propname);
if (res)
{
try {
T atom_val = what->template getProp<T>(propname);
res = Queries::queryCmp(atom_val, this->val, this->tolerance) == 0;
}
catch (KeyErrorException e) {
res = false;
}
catch (boost::bad_any_cast)
{
res = false;
}
}
if(this->getNegation()){
res=!res;
}
return res;
}
//! returns a copy of this query
Queries::Query<int,TargetPtr,true> *
copy() const {
HasPropWithValueQuery *res = new HasPropWithValueQuery(
this->propname, this->val, this->tolerance);
res->setNegation(this->getNegation());
res->d_description = this->d_description;
return res;
}
};
template<class TargetPtr>
class HasPropWithValueQuery<TargetPtr, std::string> :
public Queries::EqualityQuery<int, TargetPtr, true> {
std::string propname;
std::string val;
public:
HasPropWithValueQuery():
Queries::EqualityQuery<int,TargetPtr,true>(),
propname(), val() {
// default is to just do a number of rings query:
this->setDescription("HasPropWithValue");
this->setDataFunc(0);
};
explicit HasPropWithValueQuery(const std::string & prop,
const std::string &v,
const std::string &tol="") :
Queries::EqualityQuery<int,TargetPtr,true>(),
propname(prop),
val(v) {
// default is to just do a number of rings query:
this->setDescription("HasPropWithValue");
this->setDataFunc(0);
};
virtual bool Match(const TargetPtr what) const {
bool res = what->hasProp(propname);
if (res)
{
try {
std::string atom_val = what->template getProp<std::string>(propname);
res = atom_val == this->val;
}
catch (KeyErrorException) {
res = false;
}
catch (boost::bad_any_cast)
{
res = false;
}
}
if(this->getNegation()){
res=!res;
}
return res;
}
//! returns a copy of this query
Queries::Query<int,TargetPtr,true> *
copy() const {
HasPropWithValueQuery<TargetPtr,std::string> *res =
new HasPropWithValueQuery<TargetPtr, std::string>(
this->propname, this->val);
res->setNegation(this->getNegation());
res->d_description = this->d_description;
return res;
}
};
template<class Target, class T>
Queries::EqualityQuery<int, const Target *, true> *makePropQuery(
const std::string &propname,
const T&val,
const T&tolerance=T())
{
return new HasPropWithValueQuery<const Target *, T>(
propname, val, tolerance);
}
};
#endif
RDKit::Atom::getOwningMol
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Atom
Definition: Atom.h:121
RDKit::HasPropQuery::HasPropQuery
HasPropQuery(const std::string &v)
Definition: QueryOps.h:502
Queries::Query< int, ConstAtomPtr, needsConversion >::getNegation
bool getNegation() const
returns whether or not we are negated
Definition: Query.h:60
RDKit::HasPropWithValueQuery::HasPropWithValueQuery
HasPropWithValueQuery()
Definition: QueryOps.h:549
RDKit::makeAtomTotalValenceQuery
T * makeAtomTotalValenceQuery(int what, const std::string &descr)
returns a Query for matching total valence
Definition: QueryOps.h:201
RDKit::makeAtomInRingQuery
T * makeAtomInRingQuery(const std::string &descr)
returns a Query for matching ring atoms
Definition: QueryOps.h:307
Queries
Definition: AndQuery.h:15
RDKit::BOND_SET_QUERY
Queries::SetQuery< int, Bond const *, true > BOND_SET_QUERY
Definition: QueryOps.h:58
RDKit::queryAtomTotalDegree
static int queryAtomTotalDegree(Atom const *at)
Definition: QueryOps.h:69
Queries::queryCmp
int queryCmp(const T1 v1, const T2 v2, const T1 tol)
Definition: Query.h:161
RDKit::makeAtomHybridizationQuery
T * makeAtomHybridizationQuery(int what, const std::string &descr)
returns a Query for matching hybridization
Definition: QueryOps.h:290
RDKit::queryAtomHybridization
static int queryAtomHybridization(Atom const *at)
Definition: QueryOps.h:89
RDKit::makeAtomMassQuery
T * makeAtomMassQuery(int what, const std::string &descr)
returns a Query for matching atoms with a particular mass
Definition: QueryOps.h:266
RDKit::round
double round(double v)
rounds a value to the closest int
RDKit::ATOM_NULL_QUERY
Queries::Query< int, Atom const *, true > ATOM_NULL_QUERY
Definition: QueryOps.h:61
RDKit::ATOM_BOOL_QUERY
Queries::Query< bool, Atom const *, true > ATOM_BOOL_QUERY
Definition: QueryOps.h:27
RDKit::HasPropWithValueQuery::copy
Queries::Query< int, TargetPtr, true > * copy() const
returns a copy of this query
Definition: QueryOps.h:592
RDKit::RingInfo::isBondInRingOfSize
bool isBondInRingOfSize(unsigned int idx, unsigned int size) const
returns whether or not the bond with index idx is in a size - ring.
RDKit::ATOM_LESSEQUAL_QUERY
Queries::LessEqualQuery< int, Atom const *, true > ATOM_LESSEQUAL_QUERY
Definition: QueryOps.h:51
Queries::EqualityQuery< int, ConstAtomPtr, true >::EqualityQuery
EqualityQuery()
Definition: EqualityQuery.h:25
RDKit::BOND_EQUALS_QUERY
Queries::EqualityQuery< int, Bond const *, true > BOND_EQUALS_QUERY
Definition: QueryOps.h:40
RDKit::HasPropQuery::copy
Queries::Query< int, TargetPtr, true > * copy() const
returns a copy of this query
Definition: QueryOps.h:520
Queries::Query::setNegation
void setNegation(bool what)
sets whether or not we are negated
Definition: Query.h:58
RDKit::HasPropWithValueQuery< TargetPtr, std::string >::Match
virtual bool Match(const TargetPtr what) const
returns whether or not we match the argument
Definition: QueryOps.h:625
RDKit::makeAtomNullQuery
ATOM_NULL_QUERY * makeAtomNullQuery()
returns a Query for matching any atom
RDKit::RecursiveStructureQuery::getQueryMol
ROMol const * getQueryMol() const
returns a pointer to our query molecule
Definition: QueryOps.h:453
Queries::AndQuery
a Query implementing AND: requires all children to be true
Definition: AndQuery.h:20
RDKit::makeAtomImplicitValenceQuery
T * makeAtomImplicitValenceQuery(int what, const std::string &descr)
returns a Query for matching implicit valence
Definition: QueryOps.h:185
RDKit::BOND_LESSEQUAL_QUERY
Queries::LessEqualQuery< int, Bond const *, true > BOND_LESSEQUAL_QUERY
Definition: QueryOps.h:52
RDKit::BOND_NULL_QUERY
Queries::Query< int, Bond const *, true > BOND_NULL_QUERY
Definition: QueryOps.h:60
Queries::EqualityQuery::setTol
void setTol(MatchFuncArgType what)
sets our tolerance
Definition: EqualityQuery.h:47
RDKit::ConstAtomPtr
Atom const * ConstAtomPtr
Definition: QueryOps.h:374
RDKit::makeBondOrderEqualsQuery
BOND_EQUALS_QUERY * makeBondOrderEqualsQuery(Bond::BondType what)
returns a Query for matching bond orders
RDKit::Atom::getTotalNumHs
unsigned int getTotalNumHs(bool includeNeighbors=false) const
returns the total number of Hs (implicit and explicit) that this Atom is bound to ...
Queries::OrQuery
a Query implementing AND: requires any child to be true
Definition: OrQuery.h:19
RDKit::Atom::getIsotope
unsigned int getIsotope() const
returns our isotope number
Definition: Atom.h:218
RDKit::Bond::getBondDir
BondDir getBondDir() const
returns our direction
Definition: Bond.h:269
RDKit::Atom::getMass
double getMass() const
returns our mass
RDKit::queryAtomAllBondProduct
unsigned int queryAtomAllBondProduct(Atom const *at)
RDKit::makeAtomMinRingSizeQuery
T * makeAtomMinRingSizeQuery(int tgt, const std::string &descr)
returns a Query for matching an atom's minimum ring size
Definition: QueryOps.h:326
std
STL namespace.
RDKit::BOND_GREATEREQUAL_QUERY
Queries::GreaterEqualQuery< int, Bond const *, true > BOND_GREATEREQUAL_QUERY
Definition: QueryOps.h:46
RDKit::massIntegerConversionFactor
static int massIntegerConversionFactor
Definition: QueryOps.h:79
RDKit::ATOM_PROP_QUERY
Queries::EqualityQuery< int, Atom const *, true > ATOM_PROP_QUERY
Definition: QueryOps.h:529
RDKit::queryAtomExplicitDegree
static int queryAtomExplicitDegree(Atom const *at)
Definition: QueryOps.h:68
RDKit::queryBondOrder
static int queryBondOrder(Bond const *bond)
Definition: QueryOps.h:97
RDKit::BOND_LESS_QUERY
Queries::LessQuery< int, Bond const *, true > BOND_LESS_QUERY
Definition: QueryOps.h:49
Queries::Query< int, ConstAtomPtr, needsConversion >::TypeConvert
int TypeConvert(intwhat, Int2Type< false >) const
calls our dataFunc (if it's set) on what and returns the result, otherwise returns what ...
Definition: Query.h:134
RDKit::queryAtomImplicitHCount
static int queryAtomImplicitHCount(Atom const *at)
Definition: QueryOps.h:72
Queries::SetQuery< int, Atom const *, true >::d_set
CONTAINER_TYPE d_set
Definition: SetQuery.h:85
RDKit::Atom::getIdx
unsigned int getIdx() const
returns our index within the ROMol
Definition: Atom.h:124
RDKit::RecursiveStructureQuery::getAtIdx
static int getAtIdx(Atom const *at)
returns the index of an atom
Definition: QueryOps.h:439
RDKit::makeAtomImplicitHCountQuery
T * makeAtomImplicitHCountQuery(int what, const std::string &descr)
returns a Query for matching implicit hydrogen count
Definition: QueryOps.h:242
RDKit::queryAtomMass
static int queryAtomMass(Atom const *at)
Definition: QueryOps.h:80
RDKit::makePropQuery
Queries::EqualityQuery< int, const Target *, true > * makePropQuery(const std::string &propname, const T &val, const T &tolerance=T())
Definition: QueryOps.h:661
Query.h
RDKit::Bond::BondType
BondType
the type of Bond
Definition: Bond.h:55
RDKitBase.h
pulls in the core RDKit functionality
RDKit::queryIsBondInRing
static int queryIsBondInRing(Bond const *bond)
Definition: QueryOps.h:123
RDKit::ROMol
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:105
RDKit::RingInfo::minAtomRingSize
unsigned int minAtomRingSize(unsigned int idx) const
returns the size of the smallest ring atom idx is involved in
RDKit::AtomRingQuery::Match
virtual bool Match(const ConstAtomPtr what) const
Definition: QueryOps.h:389
RDKit::Atom::getDegree
unsigned int getDegree() const
RDKit::AtomRingQuery::AtomRingQuery
AtomRingQuery()
Definition: QueryOps.h:378
RDKit::BOND_PROP_QUERY
Queries::EqualityQuery< int, Bond const *, true > BOND_PROP_QUERY
Definition: QueryOps.h:531
RDKit::ATOM_LESS_QUERY
Queries::LessQuery< int, Atom const *, true > ATOM_LESS_QUERY
Definition: QueryOps.h:48
RDKit::makeAtomExplicitDegreeQuery
T * makeAtomExplicitDegreeQuery(int what, const std::string &descr)
returns a Query for matching explicit degree
Definition: QueryOps.h:209
RDKit::HasPropQuery
Definition: QueryOps.h:490
RDKit::queryBondDir
static int queryBondDir(Bond const *bond)
Definition: QueryOps.h:98
RDKit::queryAtomUnsaturated
static int queryAtomUnsaturated(Atom const *at)
Definition: QueryOps.h:77
RDKit::HasPropWithValueQuery::Match
virtual bool Match(const TargetPtr what) const
returns whether or not we match the argument
Definition: QueryOps.h:567
RDKit::HasPropQuery::Match
virtual bool Match(const TargetPtr what) const
returns whether or not we match the argument
Definition: QueryOps.h:510
Queries::RangeQuery
a Query implementing a range: arguments must fall in a particular range of values.
Definition: RangeQuery.h:26
RDKit::Atom::getTotalDegree
unsigned int getTotalDegree() const
RDKit::queryAtomIsInRingOfSize
int queryAtomIsInRingOfSize(Atom const *at)
Definition: QueryOps.h:148
RDKit::makeHasPropQuery
Queries::EqualityQuery< int, const Target *, true > * makeHasPropQuery(const std::string &property)
returns a Query for matching atoms that have a particular property
Definition: QueryOps.h:535
RDKit::BOND_RANGE_QUERY
Queries::RangeQuery< int, Bond const *, true > BOND_RANGE_QUERY
Definition: QueryOps.h:55
RDKit::makeAtomIsotopeQuery
T * makeAtomIsotopeQuery(int what, const std::string &descr)
returns a Query for matching atoms with a particular isotope
Definition: QueryOps.h:274
RDKit::makeAtomAliphaticQuery
T * makeAtomAliphaticQuery(const std::string &descr)
returns a Query for matching aliphatic atoms
Definition: QueryOps.h:258
RDKit::makeBondInNRingsQuery
BOND_EQUALS_QUERY * makeBondInNRingsQuery(int tgt)
returns a Query for matching bonds in a particular number of rings
RDKit::BOND_GREATER_QUERY
Queries::GreaterQuery< int, Bond const *, true > BOND_GREATER_QUERY
Definition: QueryOps.h:43
RDKit::ATOM_GREATEREQUAL_QUERY
Queries::GreaterEqualQuery< int, Atom const *, true > ATOM_GREATEREQUAL_QUERY
Definition: QueryOps.h:45
RDKit::Atom::getAtomicNum
int getAtomicNum() const
returns our atomic number
Definition: Atom.h:113
RDKit::makeAtomUnsaturatedQuery
T * makeAtomUnsaturatedQuery(const std::string &descr)
returns a Query for matching atoms with unsaturation:
Definition: QueryOps.h:298
RDKit::RingInfo::numAtomRings
unsigned int numAtomRings(unsigned int idx) const
returns the number of rings atom idx is involved in
RDKit::AtomRingQuery::copy
Queries::Query< int, ConstAtomPtr, true > * copy() const
returns a copy of this query
Definition: QueryOps.h:405
Queries::Int2Type
class to allow integer values to pick templates
Definition: Query.h:26
RDKit::queryAtomIsotope
static int queryAtomIsotope(Atom const *at)
Definition: QueryOps.h:83
RDKit::Atom::getExplicitValence
int getExplicitValence() const
returns the explicit valence (including Hs) of this atom
RDKit::ROMol::getTopology
MolGraph const & getTopology() const
brief returns a pointer to our underlying BGL object
Definition: ROMol.h:434
RDKit::HasPropQuery::HasPropQuery
HasPropQuery()
Definition: QueryOps.h:495
RDKit::makeBondNullQuery
BOND_NULL_QUERY * makeBondNullQuery()
returns a Query for matching any bond
RDKit::RecursiveStructureQuery
allows use of recursive structure queries (e.g. recursive SMARTS)
Definition: QueryOps.h:416
RDKit::RecursiveStructureQuery::RecursiveStructureQuery
RecursiveStructureQuery()
Definition: QueryOps.h:418
RDKit::ConstBondPtr
Bond const * ConstBondPtr
Definition: QueryOps.h:486
RDKit::queryAtomExplicitValence
static int queryAtomExplicitValence(Atom const *at)
Definition: QueryOps.h:75
RDKit::queryIsAtomInRing
static int queryIsAtomInRing(Atom const *at)
Definition: QueryOps.h:109
Queries::LessEqualQuery
a Query implementing <= using a particular value (and an optional tolerance)
Definition: LessEqualQuery.h:20
RDKit::HasPropWithValueQuery< TargetPtr, std::string >::HasPropWithValueQuery
HasPropWithValueQuery(const std::string &prop, const std::string &v, const std::string &tol="")
Definition: QueryOps.h:614
RDKit::HasPropWithValueQuery< TargetPtr, std::string >
Definition: QueryOps.h:602
RDKit::queryAtomAromatic
static int queryAtomAromatic(Atom const *at)
Definition: QueryOps.h:66
RDKit::Atom::getNumExplicitHs
unsigned int getNumExplicitHs() const
returns our number of explict Hs
Definition: Atom.h:205
RDKit
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:28
RDKit::queryBondMinRingSize
static int queryBondMinRingSize(Bond const *bond)
Definition: QueryOps.h:129
Queries::EqualityQuery< int, ConstAtomPtr, true >::d_tol
int d_tol
Definition: EqualityQuery.h:94
RDKit::queryAtomNum
static int queryAtomNum(Atom const *at)
Definition: QueryOps.h:78
Queries::Query::d_dataFunc
MatchFuncArgType(* d_dataFunc)(DataFuncArgType)
Definition: Query.h:130
RDKit::ATOM_RANGE_QUERY
Queries::RangeQuery< int, Atom const *, true > ATOM_RANGE_QUERY
Definition: QueryOps.h:54
RDKit::makeAtomRingBondCountQuery
T * makeAtomRingBondCountQuery(int what, const std::string &descr)
returns a Query for matching atoms with a particular number of ring bonds
Definition: QueryOps.h:334
RDKit::makeAtomAromaticQuery
T * makeAtomAromaticQuery(const std::string &descr)
returns a Query for matching the isAromatic flag
Definition: QueryOps.h:250
RDKit::AtomRingQuery
Definition: QueryOps.h:376
RDKit::queryAtomFormalCharge
static int queryAtomFormalCharge(Atom const *at)
Definition: QueryOps.h:86
Queries::LessQuery
a Query implementing < using a particular value (and an optional tolerance)
Definition: LessQuery.h:20
Queries::EqualityQuery
a Query implementing ==: arguments must match a particular value (within an optional tolerance) ...
Definition: EqualityQuery.h:22
RDKit::makeAtomNumQuery
T * makeAtomNumQuery(int what, const std::string &descr)
returns a Query for matching atomic number
Definition: QueryOps.h:177
RDKit::makeAtomFormalChargeQuery
T * makeAtomFormalChargeQuery(int what, const std::string &descr)
returns a Query for matching formal charge
Definition: QueryOps.h:282
RDKit::Bond
class for representing a bond
Definition: Bond.h:46
RDKit::queryAtomHeavyAtomDegree
static int queryAtomHeavyAtomDegree(Atom const *at)
Definition: QueryOps.h:70
RDKit::nullQueryFun
bool nullQueryFun(T arg)
Definition: QueryOps.h:484
RDKit::makeAtomExplicitValenceQuery
T * makeAtomExplicitValenceQuery(int what, const std::string &descr)
returns a Query for matching explicit valence
Definition: QueryOps.h:193
RDKit::nullDataFun
int nullDataFun(T arg)
Definition: QueryOps.h:482
RDKit::HasPropWithValueQuery
Definition: QueryOps.h:543
RDKit::Atom::getImplicitValence
int getImplicitValence() const
returns the implicit valence for this Atom
RDKit::ROMol::getRingInfo
RingInfo * getRingInfo() const
Definition: ROMol.h:327
Queries::SetQuery::insert
void insert(const MatchFuncArgType what)
insert an entry into our set
Definition: SetQuery.h:33
Queries::Query< int, ConstAtomPtr, needsConversion >::setDataFunc
void setDataFunc(int(*what)(ConstAtomPtr))
sets our data function
Definition: Query.h:81
RDKit::RingInfo::isAtomInRingOfSize
bool isAtomInRingOfSize(unsigned int idx, unsigned int size) const
returns whether or not the atom with index idx is in a size - ring.
RDKit::Bond::BondDir
BondDir
the bond's direction (for chirality)
Definition: Bond.h:81
RDKit::ATOM_SET_QUERY
Queries::SetQuery< int, Atom const *, true > ATOM_SET_QUERY
Definition: QueryOps.h:57
RDKit::queryIsAtomInNRings
static int queryIsAtomInNRings(Atom const *at)
Definition: QueryOps.h:106
RDKit::RecursiveStructureQuery::setQueryMol
void setQueryMol(ROMol const *query)
sets the molecule we'll use recursively
Definition: QueryOps.h:449
RDKit::RecursiveStructureQuery::getSerialNumber
unsigned int getSerialNumber() const
Definition: QueryOps.h:471
RDKit::HasPropWithValueQuery< TargetPtr, std::string >::HasPropWithValueQuery
HasPropWithValueQuery()
Definition: QueryOps.h:607
RDKit::BOND_AND_QUERY
Queries::AndQuery< int, Bond const *, true > BOND_AND_QUERY
Definition: QueryOps.h:31
RDKit::ATOM_GREATER_QUERY
Queries::GreaterQuery< int, Atom const *, true > ATOM_GREATER_QUERY
Definition: QueryOps.h:42
RDKit::RecursiveStructureQuery::RecursiveStructureQuery
RecursiveStructureQuery(ROMol const *query, unsigned int serialNumber=0)
initialize from an ROMol pointer
Definition: QueryOps.h:430
RDKit::queryAtomHasImplicitH
static int queryAtomHasImplicitH(Atom const *at)
Definition: QueryOps.h:73
PRECONDITION
#define PRECONDITION(expr, mess)
Definition: Invariant.h:119
RDKit::queryAtomMinRingSize
static int queryAtomMinRingSize(Atom const *at)
Definition: QueryOps.h:126
RDKit::ATOM_AND_QUERY
Queries::AndQuery< int, Atom const *, true > ATOM_AND_QUERY
Definition: QueryOps.h:30
RDKit::RingInfo::numBondRings
unsigned int numBondRings(unsigned int idx) const
returns the number of rings bond idx is involved in
RDKit::Atom::getHybridization
HybridizationType getHybridization() const
returns our hybridization
Definition: Atom.h:230
RDKit::makeAtomHasRingBondQuery
T * makeAtomHasRingBondQuery(const std::string &descr)
returns a Query for matching atoms with a particular number of ring bonds
Definition: QueryOps.h:342
Queries::Query::d_description
std::string d_description
Definition: Query.h:123
Queries::SetQuery< int, Atom const *, true >::SetQuery
SetQuery()
Definition: SetQuery.h:30
RDKit::BOND_OR_QUERY
Queries::OrQuery< int, Bond const *, true > BOND_OR_QUERY
Definition: QueryOps.h:34
RDKit::makeAtomHasImplicitHQuery
T * makeAtomHasImplicitHQuery(const std::string &descr)
returns a Query for matching ring atoms
Definition: QueryOps.h:233
RDKit::ATOM_OR_QUERY
Queries::OrQuery< int, Atom const *, true > ATOM_OR_QUERY
Definition: QueryOps.h:33
RDKit::makeAtomInNRingsQuery
T * makeAtomInNRingsQuery(int what, const std::string &descr)
returns a Query for matching atoms in a particular number of rings
Definition: QueryOps.h:315
RDKit::queryAtomAliphatic
static int queryAtomAliphatic(Atom const *at)
Definition: QueryOps.h:67
RDKit::HasPropWithValueQuery::HasPropWithValueQuery
HasPropWithValueQuery(const std::string &prop, const T &v, const T &tol=0.0)
Definition: QueryOps.h:556
Queries::GreaterQuery
a Query implementing > using a particular value (and an optional tolerance)
Definition: GreaterQuery.h:20
RDKit::makeBondMinRingSizeQuery
BOND_EQUALS_QUERY * makeBondMinRingSizeQuery(int what)
returns a Query for matching a bond's minimum ring size
RDKit::makeAtomInRingOfSizeQuery
ATOM_EQUALS_QUERY * makeAtomInRingOfSizeQuery(int tgt)
returns a Query for matching atoms in rings of a particular size
RDKit::queryAtomRingBondCount
static int queryAtomRingBondCount(Atom const *at)
Definition: QueryOps.h:133
Queries::GreaterEqualQuery
a Query implementing >= using a particular value (and an optional tolerance)
Definition: GreaterEqualQuery.h:20
QueryObjects.h
Pulls in all the query types.
RDKit::makeBondDirEqualsQuery
BOND_EQUALS_QUERY * makeBondDirEqualsQuery(Bond::BondDir what)
returns a Query for matching bond directions
RDKit::RecursiveStructureQuery::copy
Queries::Query< int, Atom const *, true > * copy() const
returns a copy of this query
Definition: QueryOps.h:457
RDKit::makeAtomSimpleQuery
T * makeAtomSimpleQuery(int what, int func(Atom const *), const std::string &description="Atom Simple")
Definition: QueryOps.h:166
RDKit::Atom::getFormalCharge
int getFormalCharge() const
returns the formal charge of this atom
Definition: Atom.h:192
RDKit::queryBondIsInRingOfSize
int queryBondIsInRingOfSize(Bond const *bond)
Definition: QueryOps.h:156
RDKit::Bond::getIdx
unsigned int getIdx() const
returns our index within the ROMol
Definition: Bond.h:156
RDKit::HasPropWithValueQuery< TargetPtr, std::string >::copy
Queries::Query< int, TargetPtr, true > * copy() const
returns a copy of this query
Definition: QueryOps.h:649
RDKit::queryAtomHasRingBond
static int queryAtomHasRingBond(Atom const *at)
Definition: QueryOps.h:112
RDKit::makeBondInRingOfSizeQuery
BOND_EQUALS_QUERY * makeBondInRingOfSizeQuery(int what)
returns a Query for matching bonds in rings of a particular size
RDKit::ROMol::getAtomBonds
OBOND_ITER_PAIR getAtomBonds(Atom const *at) const
provides access to all Bond objects connected to an Atom
RDKit::Bond::getOwningMol
ROMol & getOwningMol() const
returns a reference to the ROMol that owns this Bond
Definition: Bond.h:144
RDKit::BOND_BOOL_QUERY
Queries::Query< bool, Bond const *, true > BOND_BOOL_QUERY
Definition: QueryOps.h:28
RDKit::queryAtomRingMembership
static int queryAtomRingMembership(Atom const *at)
Definition: QueryOps.h:366
Queries::Query
Base class for all queries.
Definition: Query.h:46
RDKit::queryAtomHCount
static int queryAtomHCount(Atom const *at)
Definition: QueryOps.h:71
RDKit::queryAtomBondProduct
unsigned int queryAtomBondProduct(Atom const *at)
RDKit::queryAtomTotalValence
static int queryAtomTotalValence(Atom const *at)
Definition: QueryOps.h:76
RDKit::makeBondIsInRingQuery
BOND_EQUALS_QUERY * makeBondIsInRingQuery()
returns a Query for matching ring bonds
RDKit::RingInfo::minBondRingSize
unsigned int minBondRingSize(unsigned int idx) const
returns the size of the smallest ring bond idx is involved in
RDKit::AtomRingQuery::AtomRingQuery
AtomRingQuery(int v)
Definition: QueryOps.h:383
Queries::EqualityQuery< int, ConstAtomPtr, true >::d_val
int d_val
Definition: EqualityQuery.h:93
RDKit::Atom
The class for representing atoms.
Definition: Atom.h:67
RDKit::BOND_XOR_QUERY
Queries::XOrQuery< int, Bond const *, true > BOND_XOR_QUERY
Definition: QueryOps.h:37
RDKit::Bond::getBondType
BondType getBondType() const
returns our bondType
Definition: Bond.h:117
Queries::XOrQuery
a Query implementing XOR: requires exactly one child to be true
Definition: XOrQuery.h:20
RDKit::ATOM_EQUALS_QUERY
Queries::EqualityQuery< int, Atom const *, true > ATOM_EQUALS_QUERY
Definition: QueryOps.h:39
Queries::Query< int, ConstAtomPtr, needsConversion >::setDescription
void setDescription(const std::string &descr)
sets our text description
Definition: Query.h:63
RDKit::Atom::getIsAromatic
bool getIsAromatic() const
returns our isAromatic flag
Definition: Atom.h:210
RDKit::queryAtomImplicitValence
static int queryAtomImplicitValence(Atom const *at)
Definition: QueryOps.h:74
KeyErrorException
Class to allow us to throw a KeyError from C++ and have it make it back to Python.
Definition: Exceptions.h:46
RDKit::ATOM_XOR_QUERY
Queries::XOrQuery< int, Atom const *, true > ATOM_XOR_QUERY
Definition: QueryOps.h:36
RDKit::makeAtomHCountQuery
T * makeAtomHCountQuery(int what, const std::string &descr)
returns a Query for matching hydrogen count
Definition: QueryOps.h:225
RDKit::makeAtomTotalDegreeQuery
T * makeAtomTotalDegreeQuery(int what, const std::string &descr)
returns a Query for matching atomic degree
Definition: QueryOps.h:217
Queries::SetQuery< int, Atom const *, true >
Queries::EqualityQuery< int, ConstAtomPtr, true >::getTol
const int getTol() const
returns out tolerance
Definition: EqualityQuery.h:49
RDKit::queryIsBondInNRings
static int queryIsBondInNRings(Bond const *at)
Definition: QueryOps.h:99