groupcontrib.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef OB_GROUPCONTRIB_H
00024 #define OB_GROUPCONTRIB_H
00025
00026 #include <openbabel/mol.h>
00027 #include <openbabel/parsmart.h>
00028 #include <openbabel/descriptor.h>
00029
00030
00031
00032 #ifndef OBDESC
00033 #define OBDESC
00034 #endif
00035
00036 namespace OpenBabel
00037 {
00038
00045 class OBDESC OBGroupContrib : public OBDescriptor
00046 {
00047 public:
00048
00054
00055 OBGroupContrib(const char* ID, const char* filename, const char* descr)
00056 : OBDescriptor(ID, false), _filename(filename), _descr(descr){}
00057
00058 virtual const char* Description();
00059
00060 virtual OBGroupContrib* MakeInstance(const std::vector<std::string>& textlines)
00061 {
00062 return new OBGroupContrib(textlines[1].c_str(),textlines[2].c_str(),textlines[3].c_str());
00063 }
00064
00065
00066 virtual double Predict(OBBase* pOb);
00067
00068 private:
00069 bool ParseFile();
00070
00071 const char* _filename;
00072 const char* _descr;
00073 std::vector<std::pair<OBSmartsPattern*, double> > _contribsHeavy;
00074 std::vector<std::pair<OBSmartsPattern*, double> > _contribsHydrogen;
00075 };
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 }
00088
00089 #endif // OB_GROUPCONTRIB_H
00090