00001 /********************************************************************** 00002 phmodel.h - Read pH rules and assign charges. 00003 00004 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc. 00005 Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison 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_PHMODEL_H 00021 #define OB_PHMODEL_H 00022 00023 #include <openbabel/parsmart.h> 00024 #include <openbabel/data.h> 00025 00026 namespace OpenBabel 00027 { 00028 00029 // class introduction in phmodel.cpp 00030 class OBAPI OBChemTsfm 00031 { 00032 std::vector<int> _vadel; 00033 std::vector<std::pair<int,int> > _vele; 00034 std::vector<std::pair<int,int> > _vchrg; 00035 std::vector<std::pair<int,int> > _vbdel; 00036 std::vector<std::pair<std::pair<int,int>,int> > _vbond; 00037 OBSmartsPattern _bgn,_end; 00038 public: 00039 OBChemTsfm() {} 00040 ~OBChemTsfm() {} 00042 bool Init(std::string&start, std::string &end); 00044 bool Apply(OBMol&); 00054 bool IsAcid(); 00064 bool IsBase(); 00065 }; 00066 00107 class OBPhModel : public OBGlobalDataBase 00108 { 00109 std::vector<std::vector<int> > _mlist; 00110 std::vector<OBChemTsfm*> _vtsfm; 00111 std::vector<double> _vpKa; 00112 std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg; 00113 public: 00114 OBPhModel(); 00115 ~OBPhModel(); 00116 00117 void ParseLine(const char*); 00119 unsigned int GetSize() { return _vtsfm.size();} 00120 void AssignSeedPartialCharge(OBMol&); 00121 //void CorrectForPH(OBMol&); 00122 void CorrectForPH(OBMol&, double pH = 7.4 ); 00123 }; 00124 00125 00126 00127 } //namespace OpenBabel 00128 00129 #endif // OB_PHMODEL_H 00130 00133
This file is part of the documentation for Open Babel, version 2.2.0.