Loading...
Searching...
No Matches
chargemodel.h
Go to the documentation of this file.
/**********************************************************************
chargemodel.h - Base class for partial charge models
Copyright (C) 2010 by Geoffrey Hutchison
Some portions Copyright (C) 2009 by Frank Peters
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_CHARGEMODEL_H
#define OB_CHARGEMODEL_H
#include <openbabel/babelconfig.h>
#include <openbabel/plugin.h>
#include <openbabel/math/vector3.h>
namespace OpenBabel
{
class OBMol; //Forward declaration; used only as pointer.
// Documentation is down below
class OBAPI OBChargeModel : public OBPlugin
{
MAKE_PLUGIN(OBChargeModel)
public:
const char* TypeID(){return "charges";};
virtual bool ComputeCharges(OBMol &m ) { return false; };
virtual bool ComputeCharges(OBMol &m, const char *args) { return ComputeCharges( m ); }
const std::vector<double> & GetFormalCharges() const
{ return m_formalCharges; }
const std::vector<double> & GetPartialCharges() const
{ return m_partialCharges; }
vector3 GetDipoleMoment(OBMol &);
protected:
std::vector<double> m_partialCharges;
std::vector<double> m_formalCharges;
void FillChargeVectors(OBMol &mol);
virtual double DipoleScalingFactor() { return 1.0; }
};
}//namespace
#endif
OpenBabel::OBChargeModel
Atomic partial charge models.
Definition chargemodel.h:33
OpenBabel::OBChargeModel::ComputeCharges
virtual bool ComputeCharges(OBMol &m)
Definition chargemodel.h:41
OpenBabel::OBChargeModel::ComputeCharges
virtual bool ComputeCharges(OBMol &m, const char *args)
Definition chargemodel.h:42
OpenBabel::OBChargeModel::DipoleScalingFactor
virtual double DipoleScalingFactor()
Provide a scaling factor for the dipole moment – ideally calibrated from many molecules.
Definition chargemodel.h:68
OpenBabel::OBChargeModel::GetFormalCharges
const std::vector< double > & GetFormalCharges() const
Definition chargemodel.h:49
OpenBabel::OBChargeModel::m_partialCharges
std::vector< double > m_partialCharges
Definition chargemodel.h:61
OpenBabel::OBChargeModel::GetPartialCharges
const std::vector< double > & GetPartialCharges() const
Definition chargemodel.h:54
OpenBabel::OBChargeModel::m_formalCharges
std::vector< double > m_formalCharges
Definition chargemodel.h:62
OpenBabel::OBChargeModel::TypeID
const char * TypeID()
Redefined by each plugin type: "formats", "fingerprints", etc.
Definition chargemodel.h:37
OpenBabel::OBChargeModel::FillChargeVectors
void FillChargeVectors(OBMol &mol)
Fill the internal partial and formal charge vectors (convenience function).
Definition chargemodel.cpp:34
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBPlugin
Base class for all types of dynamic classes discovered at runtime.
Definition plugin.h:53
OpenBabel::vector3
Represents a vector in 3-dimensional real space.
Definition vector3.h:45
MAKE_PLUGIN
#define MAKE_PLUGIN(BaseClass)
Definition plugin.h:195
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
plugin.h
Simplify 'plugin' classes to be discovered and/or loaded at runtime.
vector3.h
Handle 3D coordinates.