00001 /********************************************************************** 00002 builder.h - OBBuilder class. 00003 00004 Copyright (C) 2007-2008 by Tim Vandermeersch 00005 <[email protected]> 00006 00007 This file is part of the Open Babel project. 00008 For more information, see <http://openbabel.sourceforge.net/> 00009 00010 This program is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation version 2 of the License. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 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 //bool Insert(OBMol &mol, int a, int b, std::string smiles, int c, int d); 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 }; // class OBBuilder 00129 00130 }// namespace OpenBabel 00131 00132 #endif // OB_BUILDER_H 00133
This file is part of the documentation for Open Babel, version 2.2.0.