molchrg.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 molchrg.h - Assign Gasteiger partial 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_MOLCHRG_H
00021 #define OB_MOLCHRG_H
00022 
00023 namespace OpenBabel
00024 {
00025 
00026 class GasteigerState;
00027 
00028 // class introduction in molchrg.cpp
00029 class OBAPI OBGastChrg
00030 {
00031     std::vector <GasteigerState*> _gsv;
00032     void InitialPartialCharges(OBMol &);
00033     bool GasteigerSigmaChi(OBAtom *,double &,double &,double &);
00034 public:
00035     OBGastChrg()
00036     {}
00037     ~OBGastChrg();
00038     bool AssignPartialCharges(OBMol &);
00039     void GSVResize(int);
00040 };
00041 
00043 class OBAPI GasteigerState
00044 {
00045 public:
00046     GasteigerState();
00047     ~GasteigerState()
00048     {}
00049     void SetValues(double _a,double _b,double _c,double _q)
00050     {
00051         a = _a;
00052         b = _b;
00053         c = _c;
00054         denom=a+b+c;
00055         q = _q;
00056     }
00057     double a, b, c;
00058     double denom;
00059     double chi;
00060     double q;
00061 };
00062 
00063 }
00064 
00065 #define OB_GASTEIGER_DENOM  20.02
00066 #define OB_GASTEIGER_DAMP   0.5
00067 #define OB_GASTEIGER_ITERS  6
00068 
00069 #endif // OB_MOLCHRG_H
00070