00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OB_BUILDER_H
00021 #define OB_BUILDER_H
00022
00023 #include <vector>
00024 #include <string>
00025 #include <map>
00026
00027 #include <list>
00028 #include <set>
00029 #include <openbabel/base.h>
00030 #include <openbabel/mol.h>
00031
00032 namespace OpenBabel
00033 {
00036 class OBAPI OBBuilder {
00037 public:
00038
00040 void LoadFragments();
00041
00046 static vector3 GetNewBondVector(OBAtom *atom);
00047 static vector3 GetNewBondVector(OBAtom *atom, double length);
00053 bool Build(OBMol &mol);
00065 static bool Connect(OBMol &mol, int a, int b, vector3 &newpos, int bondOrder = 1);
00076 static bool Connect(OBMol &mol, int a, int b, int bondOrder = 1);
00104 static bool Swap(OBMol &mol, int a, int b, int c, int d);
00111
00114 static void CorrectStereoBonds(OBMol &mol);
00117 static void CorrectStereoAtoms(OBMol &mol);
00122 static OBBitVec GetFragment(OBAtom *atom);
00123 static void AddNbrs(OBBitVec &fragment, OBAtom *atom);
00124
00125 private:
00127 static std::vector<std::pair<OBSmartsPattern*, std::vector<vector3> > > _fragments;
00128 };
00129
00130 }
00131
00132 #endif // OB_BUILDER_H
00133