chargemodel.h Source File

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

chargemodel.h
Go to the documentation of this file.

    00001 /**********************************************************************
    00002 chargemodel.h - Base class for partial charge models
    00003
    00004 Copyright (C) 2010 by Geoffrey Hutchison
    00005 Some portions Copyright (C) 2009 by Frank Peters
    00006
    00007 This file is part of the Open Babel project.
    00008 For more information, see <http://openbabel.org/>
    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_CHARGEMODEL_H
    00021 #define OB_CHARGEMODEL_H
    00022
    00023 #include <openbabel/babelconfig.h>
    00024 #include <openbabel/plugin.h>
    00025 #include <openbabel/math/vector3.h>
    00026
    00027 namespace OpenBabel
    00028 {
    00029 class OBMol; //Forward declaration; used only as pointer.
    00030
    00031 // Documentation is down below
    00032 class OBAPI OBChargeModel : public OBPlugin
    00033 {
    00034   MAKE_PLUGIN(OBChargeModel)
    00035
    00036   public:
    00037     const char* TypeID(){return "charges";};
    00038
    00041     virtual bool ComputeCharges(OBMol &) { return false; }
    00042
    00048     const std::vector<double> & GetFormalCharges() const
    00049     { return m_formalCharges; }
    00050
    00053     const std::vector<double> & GetPartialCharges() const
    00054     { return m_partialCharges; }
    00055
    00057     vector3 GetDipoleMoment(OBMol &);
    00058
    00059  protected:
    00060       std::vector<double> m_partialCharges;
    00061       std::vector<double> m_formalCharges;
    00062
    00064       void FillChargeVectors(OBMol &mol);
    00065
    00067       virtual double DipoleScalingFactor() { return 1.0; }
    00068 };
    00069
    00123 }//namespace
    00124 #endif
    00125

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines