ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/openbabel/molchrg.hpp
Revision: 2440
Committed: Wed Nov 16 19:42:11 2005 UTC (18 years, 8 months ago) by tim
File size: 1863 byte(s)
Log Message:
adding openbabel

File Contents

# User Rev Content
1 tim 2440 /**********************************************************************
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.sourceforge.net/>
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     namespace OpenBabel
24     {
25    
26     class GasteigerState;
27    
28     // class introduction in molchrg.cpp
29     class OBAPI OBGastChrg
30     {
31     std::vector <GasteigerState*> _gsv;
32     void InitialPartialCharges(OBMol &);
33     bool GasteigerSigmaChi(OBAtom *,double &,double &,double &);
34     public:
35     OBGastChrg()
36     {}
37     ~OBGastChrg();
38     bool AssignPartialCharges(OBMol &);
39     void GSVResize(int);
40     };
41    
42     //! Helper class for OBGastChrg which stores the Gasteiger states of a given atom
43     class OBAPI GasteigerState
44     {
45     public:
46     GasteigerState();
47     ~GasteigerState()
48     {}
49     void SetValues(double _a,double _b,double _c,double _q)
50     {
51     a = _a;
52     b = _b;
53     c = _c;
54     denom=a+b+c;
55     q = _q;
56     }
57     double a, b, c;
58     double denom;
59     double chi;
60     double q;
61     };
62    
63     }
64    
65     #define OB_GASTEIGER_DENOM 20.02
66     #define OB_GASTEIGER_DAMP 0.5
67     #define OB_GASTEIGER_ITERS 6
68    
69     #endif // OB_MOLCHRG_H
70    
71     //! \file molchrg.h
72     //! \brief Assign Gasteiger partial charges.