* 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.
* first pass
* Fixes#623
* fix a merge problem
* move the aromaticity perception to a helper fn
* python doc update
* replace setSimpleAromaticity() with a parameter to setAromaticity()
* add simple test for the custom aromaticity function
Major changes in definition relative to the original GPS calculator:
Bonds linking ring systems:
- Single bonds between aliphatic ring Cs are always rotatable. This
means that the central bond in CC1CCCC(C)C1-C1C(C)CCCC1C is now
considered rotatable; it was not before
- Heteroatoms in the linked rings no longer affect whether or not
the linking bond is rotatable
- the linking bond in systems like Cc1cccc(C)c1-c1c(C)cccc1 is now
considered non-rotatable