Open Babel  3.0
molchrg.h
Go to the documentation of this file.
1 /**********************************************************************
2 molchrg.h - Assign Gasteiger partial 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_MOLCHRG_H
21 #define OB_MOLCHRG_H
22 
23 #include <openbabel/babelconfig.h>
24 #include <vector>
25 
26 namespace OpenBabel
27 {
28 
29  // Foward declarations
30  class OBMol;
31  class OBAtom;
32 
35 class OBAPI GasteigerState
36 {
37 public:
40 
41  void SetValues(double _a,double _b,double _c,double _q)
42  {
43  a = _a;
44  b = _b;
45  c = _c;
46  denom=a+b+c;
47  q = _q;
48  }
49 
50  double a, b, c;
51  double denom;
52  double chi;
53  double q;
54 };
55 
56 // class introduction in molchrg.cpp
57 class OBAPI OBGastChrg
58 {
59  std::vector <GasteigerState*> _gsv;
60 
61  void InitialPartialCharges(OBMol &);
62  bool GasteigerSigmaChi(OBAtom *,double &,double &,double &);
63 
64 public:
66  ~OBGastChrg();
67 
69  bool AssignPartialCharges(OBMol &);
71  void GSVResize(int);
72 };
73 
74 }
75 
76 #define OB_GASTEIGER_DENOM 20.02
77 #define OB_GASTEIGER_DAMP 0.5
78 #define OB_GASTEIGER_ITERS 6
79 
80 #endif // OB_MOLCHRG_H
81 
Molecule Class.
Definition: mol.h:118
OBGastChrg()
Definition: molchrg.h:65
double q
Definition: molchrg.h:53
void SetValues(double _a, double _b, double _c, double _q)
Definition: molchrg.h:41
double c
Definition: molchrg.h:50
double chi
Definition: molchrg.h:52
Helper class for OBGastChrg which stores the Gasteiger states of a given atom.
Definition: molchrg.h:35
Assigns Gasteiger partial charges.
Definition: molchrg.h:57
double denom
Definition: molchrg.h:51
~GasteigerState()
Definition: molchrg.h:39
Global namespace for all Open Babel code.
Definition: alias.h:22
Atom class.
Definition: atom.h:71