* remove include from headers
* update implementation files
* completely remove BOOST_FOREACH (#7)
* convert those changes to use auto
* get rid of all usage of BOOST_FOREACH
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* run clang-tidy with modernize-use-default-member-init
* results from modernize-use-emplace
* one uniform initialization per line
otherwise SWIG is unhappy
Co-authored-by: Brian Kelley <fustigator@gmail.com>
* boost::thread mostly gone... still need to get rid of once
everything compiles
* replace boost::call_once
* remove link-time dependency on boost::thread
* first pass at using async
* switch to using async everywhere
* Adds a generic Property Calculation API
Property mw(Property::MW);
Property logp(Property::ALOGP);
// User based function
struct MyPropertyFunction : public PropertyFxn {
double compute(const ROMol &mol) const {
return rdcast<double>(mol.getNumAtoms());
}
bool isAdditive() const { return true; }
}
// Make the a num atom property
boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
Property numAtoms("NumAtoms", atomfxn);
double alogp = logp.computeProperty(mol);
double nAtoms = numAtoms.computeProperty(mol);
And a ProperFilter API
// Molecular weight filter 0 ... 500.
PropertyFilter mw(PropertyFilter::MW, 0., 500.);
// log p Filter -5 ... 5
PropertyFilter logp(PropertyFilter::ALOGP, -5.0, 5.0);
// User based function
struct MyPropertyFunction : public PropertyFxn {
double compute(const ROMol &mol) const {
return rdcast<double>(mol.getNumAtoms());
}
}
// add num atom property 0. ... 50.
boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
PropertyFilter natoms("NumAtoms", 0., 50., atomfxn);
if (natoms.accepts(mol)) {
// molecule is ok
} else {
// molecules is bad
}
* Adds missing includes
* Fixes g++ access to class based enums
* Updates to new API, adds better property registry
* Adds a generic Property Calculation API
Property mw(Property::MW);
Property logp(Property::ALOGP);
// User based function
struct MyPropertyFunction : public PropertyFxn {
double compute(const ROMol &mol) const {
return rdcast<double>(mol.getNumAtoms());
}
bool isAdditive() const { return true; }
}
// Make the a num atom property
boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
Property numAtoms("NumAtoms", atomfxn);
double alogp = logp.computeProperty(mol);
double nAtoms = numAtoms.computeProperty(mol);
And a ProperFilter API
// Molecular weight filter 0 ... 500.
PropertyFilter mw(PropertyFilter::MW, 0., 500.);
// log p Filter -5 ... 5
PropertyFilter logp(PropertyFilter::ALOGP, -5.0, 5.0);
// User based function
struct MyPropertyFunction : public PropertyFxn {
double compute(const ROMol &mol) const {
return rdcast<double>(mol.getNumAtoms());
}
}
// add num atom property 0. ... 50.
boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
PropertyFilter natoms("NumAtoms", 0., 50., atomfxn);
if (natoms.accepts(mol)) {
// molecule is ok
} else {
// molecules is bad
}
* Adds missing includes
* Fixes g++ access to class based enums
* Updates to new API, adds better property registry
* Fixes merge error
* Removes unused unordered_map include
* Adds calcClogP calcMR as functions.
* PropertyFxn ->PropertyFunctor, adds Queries::Query based queries.
* Adds Python PropertyFunctors (can’t be used as queries yet)
* Exposes PropertyRangeQueries
* Adds doc strings
* Throws error if stereo is not assigned.
* Adds molecule annotation.