33#ifndef RDKIT_PROPERTIES_H
34#define RDKIT_PROPERTIES_H
40#include <boost/shared_ptr.hpp>
46namespace Descriptors {
52 double (*d_dataFunc)(
const ROMol &);
55 double (*func)(
const ROMol &) =
nullptr)
56 : propName(std::move(name)),
57 propVersion(std::move(version)),
63 return (*d_dataFunc)(mol);
67 const std::string
getName()
const {
return propName; }
69 const std::string
getVersion()
const {
return propVersion; }
83 bool annotate =
false)
const;
90 const std::string &name);
92 static std::vector<boost::shared_ptr<PropertyFunctor>>
registry;
122 const std::string &name,
double min,
double max);
pulls in the core RDKit functionality
a Query implementing AND: requires all children to be true
a Query implementing ==: arguments must match a particular value (within an optional tolerance)
a Query implementing >= using a particular value (and an optional tolerance)
a Query implementing > using a particular value (and an optional tolerance)
a Query implementing <= using a particular value (and an optional tolerance)
a Query implementing < using a particular value (and an optional tolerance)
a Query implementing AND: requires any child to be true
Base class for all queries.
a Query implementing a range: arguments must fall in a particular range of values.
a Query implementing XOR: requires exactly one child to be true
Holds a collection of properties for computation purposes.
static int registerProperty(PropertyFunctor *ptr)
Register a property function - takes ownership.
Properties(const std::vector< std::string > &propNames)
static std::vector< std::string > getAvailableProperties()
static boost::shared_ptr< PropertyFunctor > getProperty(const std::string &name)
std::vector< double > computeProperties(const RDKit::ROMol &mol, bool annotate=false) const
static int registerProperty(boost::shared_ptr< PropertyFunctor > prop)
static std::vector< boost::shared_ptr< PropertyFunctor > > registry
void annotateProperties(RDKit::ROMol &mol) const
std::vector< boost::shared_ptr< PropertyFunctor > > m_properties
std::vector< std::string > getPropertyNames() const
#define RDKIT_DESCRIPTORS_EXPORT
Queries::GreaterEqualQuery< double, const ROMol &, true > PROP_GREATEREQUAL_QUERY
T * makePropertyQuery(const std::string &name, double what)
Queries::RangeQuery< double, const ROMol &, true > PROP_RANGE_QUERY
Queries::OrQuery< int, const ROMol &, true > PROP_OR_QUERY
Queries::LessQuery< double, const ROMol &, true > PROP_LESS_QUERY
Queries::AndQuery< int, const ROMol &, true > PROP_AND_QUERY
Queries::GreaterQuery< double, const ROMol &, true > PROP_GREATER_QUERY
Queries::XOrQuery< int, const ROMol &, true > PROP_XOR_QUERY
Queries::LessEqualQuery< double, const ROMol &, true > PROP_LESSEQUAL_QUERY
RDKIT_DESCRIPTORS_EXPORT PROP_RANGE_QUERY * makePropertyRangeQuery(const std::string &name, double min, double max)
Queries::Query< bool, const ROMol &, true > PROP_BOOL_QUERY
Queries::EqualityQuery< double, const ROMol &, true > PROP_EQUALS_QUERY
bool rdvalue_is(const RDValue_cast_t)
const std::string getName() const
Return the name of the property.
virtual double operator()(const RDKit::ROMol &mol) const
Compute the value of the property.
virtual ~PropertyFunctor()
PropertyFunctor(std::string name, std::string version, double(*func)(const ROMol &)=nullptr)
const std::string getVersion() const
Return the properties version.