33 #ifndef RDKIT_PROPERTIES_H 34 #define RDKIT_PROPERTIES_H 39 #include <boost/shared_ptr.hpp> 45 namespace Descriptors {
51 double (*d_dataFunc)(
const ROMol&);
54 double (*func)(
const ROMol&)=NULL) :
55 propName(name), propVersion(version), d_dataFunc(func) {
60 virtual double operator()(
const RDKit::ROMol &)
const = 0;
63 const std::string
getName()
const {
return propName; }
65 const std::string
getVersion()
const {
return propVersion; }
77 Properties(
const std::vector<std::string> &propNames);
79 std::vector<std::string> getPropertyNames()
const;
80 std::vector<double> computeProperties(
const RDKit::ROMol &mol,
bool annotate=
false)
const;
85 static boost::shared_ptr<PropertyFunctor> getProperty(
const std::string &name);
86 static std::vector<std::string> getAvailableProperties();
87 static std::vector<boost::shared_ptr<PropertyFunctor> >
registry;
const std::string getVersion() const
Return the properties version.
virtual ~PropertyFunctor()
const std::string getName() const
Return the name of the property.
Queries::LessQuery< double, const ROMol &, true > PROP_LESS_QUERY
Holds a collection of properties for computation purposes.
Queries::GreaterEqualQuery< double, const ROMol &, true > PROP_GREATEREQUAL_QUERY
Queries::XOrQuery< int, const ROMol &, true > PROP_XOR_QUERY
a Query implementing AND: requires all children to be true
a Query implementing AND: requires any child to be true
PropertyFunctor(const std::string &name, const std::string &version, double(*func)(const ROMol &)=NULL)
Queries::Query< bool, const ROMol &, true > PROP_BOOL_QUERY
Queries::LessEqualQuery< double, const ROMol &, true > PROP_LESSEQUAL_QUERY
Queries::OrQuery< int, const ROMol &, true > PROP_OR_QUERY
pulls in the core RDKit functionality
#define RDKIT_DESCRIPTORS_EXPORT
static boost::shared_ptr< PropertyFunctor > getProperty(const std::string &name)
Queries::RangeQuery< double, const ROMol &, true > PROP_RANGE_QUERY
a Query implementing a range: arguments must fall in a particular range of values.
a Query implementing <= using a particular value (and an optional tolerance)
Queries::AndQuery< int, const ROMol &, true > PROP_AND_QUERY
Queries::EqualityQuery< double, const ROMol &, true > PROP_EQUALS_QUERY
std::vector< boost::shared_ptr< PropertyFunctor > > m_properties
a Query implementing < using a particular value (and an optional tolerance)
a Query implementing ==: arguments must match a particular value (within an optional tolerance) ...
RDKIT_DESCRIPTORS_EXPORT PROP_RANGE_QUERY * makePropertyRangeQuery(const std::string &name, double min, double max)
a Query implementing > using a particular value (and an optional tolerance)
a Query implementing >= using a particular value (and an optional tolerance)
static std::vector< boost::shared_ptr< PropertyFunctor > > registry
Queries::GreaterQuery< double, const ROMol &, true > PROP_GREATER_QUERY
Base class for all queries.
a Query implementing XOR: requires exactly one child to be true
T * makePropertyQuery(const std::string &name, double what)