Open Babel  3.0
phmodel.h
Go to the documentation of this file.
1 /**********************************************************************
2 phmodel.h - Read pH rules and assign charges.
3 
4 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
5 Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
6 
7 This file is part of the Open Babel project.
8 For more information, see <http://openbabel.org/>
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation version 2 of the License.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 ***********************************************************************/
19 
20 #ifndef OB_PHMODEL_H
21 #define OB_PHMODEL_H
22 
23 #include <openbabel/parsmart.h>
24 #include <openbabel/data.h>
25 
26 namespace OpenBabel
27 {
28 
29 // class introduction in phmodel.cpp
30 class OBAPI OBChemTsfm
31 {
32  std::vector<int> _vadel;
33  std::vector<std::pair<int,int> > _vele;
34  std::vector<std::pair<int,int> > _vchrg;
35  std::vector<std::pair<int,int> > _vbdel;
36  std::vector<std::pair<std::pair<int,int>,int> > _vbond;
37  OBSmartsPattern _bgn,_end;
38 public:
42  bool Init(std::string&start, std::string &end);
44  bool Apply(OBMol&);
54  bool IsAcid();
64  bool IsBase();
65 };
66 
107 class OBAPI OBPhModel : public OBGlobalDataBase
108 {
109  std::vector<OBChemTsfm*> _vtsfm;
110  std::vector<double> _vpKa;
111  std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
112 public:
113  OBPhModel();
114  ~OBPhModel();
115 
116  void ParseLine(const char*);
118  size_t GetSize() { return _vtsfm.size();}
119  void AssignSeedPartialCharge(OBMol&);
120  //void CorrectForPH(OBMol&);
121  void CorrectForPH(OBMol&, double pH = 7.4 );
122 };
123 
124 
125 
126 } //namespace OpenBabel
127 
128 #endif // OB_PHMODEL_H
129 
132 
size_t GetSize()
Definition: phmodel.h:118
OBChemTsfm()
Definition: phmodel.h:39
Molecule Class.
Definition: mol.h:118
SMARTS based structural modification (chemical transformation)
Definition: phmodel.h:30
SMARTS (SMiles ARbitrary Target Specification) substructure searching.
Definition: parsmart.h:154
Global data and resource file parsers.
Corrections for pH used by OBMol::CorrectForPH()
Definition: phmodel.h:107
~OBChemTsfm()
Definition: phmodel.h:40
Daylight SMARTS parser.
Base data table class, handles reading data files.
Definition: data.h:48
Global namespace for all Open Babel code.
Definition: alias.h:22