RDKit
Open-source cheminformatics and machine learning.
RegisterDescriptor.h File Reference
#include <RDGeneral/BoostStartInclude.h>
#include <boost/shared_ptr.hpp>
#include <RDGeneral/BoostEndInclude.h>
#include "Property.h"

Go to the source code of this file.

Namespaces

 RDKit
 Includes a bunch of functionality for handling Atom and Bond queries.
 
 RDKit::Descriptors
 

Macros

#define REGISTER_DESCRIPTOR(NAME, FUNC)
 

Macro Definition Documentation

#define REGISTER_DESCRIPTOR (   NAME,
  FUNC 
)
Value:
struct NAME##PropertyFunctor : public PropertyFunctor{ \
static double _func(const ROMol&m){return static_cast<double>(FUNC(m));} \
NAME##PropertyFunctor(bool registerProp=true) : \
PropertyFunctor(#NAME, NAME##Version, _func) { \
if (registerProp) Properties::registerProperty(new NAME##PropertyFunctor(false)); \
} \
double operator()(const RDKit::ROMol &mol) const { \
return _func(mol); } \
}; \
static NAME##PropertyFunctor NAME##PropertyFunctor__;

Definition at line 66 of file RegisterDescriptor.h.