RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RegisterDescriptor.h File Reference
#include <RDGeneral/export.h>
#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

namespace  RDKit
 Std stuff.
 
namespace  RDKit::Descriptors
 

Macros

#define REGISTER_DESCRIPTOR(NAME, FUNC)
 

Macro Definition Documentation

◆ REGISTER_DESCRIPTOR

#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 68 of file RegisterDescriptor.h.