 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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) {}
59 virtual double operator()(
const RDKit::ROMol &)
const = 0;
62 const std::string
getName()
const {
return propName; }
64 const std::string
getVersion()
const {
return propVersion; }
74 Properties(
const std::vector<std::string> &propNames);
76 std::vector<std::string> getPropertyNames()
const;
77 std::vector<double> computeProperties(
const RDKit::ROMol &mol,
78 bool annotate =
false)
const;
83 static boost::shared_ptr<PropertyFunctor> getProperty(
84 const std::string &name);
85 static std::vector<std::string> getAvailableProperties();
86 static std::vector<boost::shared_ptr<PropertyFunctor>>
registry;
116 const std::string &name,
double min,
double max);
T * makePropertyQuery(const std::string &name, double what)
Queries::LessQuery< double, const ROMol &, true > PROP_LESS_QUERY
virtual ~PropertyFunctor()
Queries::XOrQuery< int, const ROMol &, true > PROP_XOR_QUERY
Queries::GreaterEqualQuery< double, const ROMol &, true > PROP_GREATEREQUAL_QUERY
#define RDKIT_DESCRIPTORS_EXPORT
PropertyFunctor(const std::string &name, const std::string &version, double(*func)(const ROMol &)=NULL)
Queries::Query< bool, const ROMol &, true > PROP_BOOL_QUERY
Queries::AndQuery< int, const ROMol &, true > PROP_AND_QUERY
a Query implementing a range: arguments must fall in a particular range of values.
a Query implementing AND: requires any child to be true
Queries::RangeQuery< double, const ROMol &, true > PROP_RANGE_QUERY
pulls in the core RDKit functionality
RDKIT_DESCRIPTORS_EXPORT PROP_RANGE_QUERY * makePropertyRangeQuery(const std::string &name, double min, double max)
a Query implementing XOR: requires exactly one child to be true
Queries::LessEqualQuery< double, const ROMol &, true > PROP_LESSEQUAL_QUERY
static boost::shared_ptr< PropertyFunctor > getProperty(const std::string &name)
Holds a collection of properties for computation purposes.
std::vector< boost::shared_ptr< PropertyFunctor > > m_properties
Queries::OrQuery< int, const ROMol &, true > PROP_OR_QUERY
Queries::EqualityQuery< double, const ROMol &, true > PROP_EQUALS_QUERY
a Query implementing AND: requires all children to be true
a Query implementing < using a particular value (and an optional tolerance)
static std::vector< boost::shared_ptr< PropertyFunctor > > registry
a Query implementing > using a particular value (and an optional tolerance)
Base class for all queries.
const std::string getVersion() const
Return the properties version.
const std::string getName() const
Return the name of the property.
a Query implementing ==: arguments must match a particular value (within an optional tolerance)
Queries::GreaterQuery< double, const ROMol &, true > PROP_GREATER_QUERY
a Query implementing >= using a particular value (and an optional tolerance)
a Query implementing <= using a particular value (and an optional tolerance)