AvogadroLibs 1.98.1
|
General API for charge / electrostatics models. More...
#include <avogadro/calc/chargemodel.h>
Public Member Functions | |
virtual ChargeModel * | newInstance () const =0 |
virtual std::string | identifier () const =0 |
A unique identifier, used to retrieve models programmatically. EEM2, NPA, etc. A runtime warning will be generated if the identifier is not unique. | |
virtual std::string | name () const =0 |
A user-visible name of the model (e.g., "Natural Population
Analysis") | |
virtual Core::Molecule::ElementMask | elements () const =0 |
Indicate if your method only treats a subset of elements. | |
virtual void | setDielectric (double dielectric) |
virtual float | dielectric () const |
virtual MatrixX | partialCharges (Core::Molecule &mol) const =0 |
virtual double | potential (Core::Molecule &mol, const Vector3 &point) const |
Calculate the electrostatic potential at a particular point in space. | |
virtual Core::Array< double > | potentials (Core::Molecule &mol, const Core::Array< Vector3 > &points) const |
Calculate the electrostatic potential at multiple points. | |
Protected Member Functions | |
void | appendError (const std::string &errorString, bool newLine=true) const |
Append an error to the error string for the model. | |
This serves as the common base class for electrostatics models. Many use atomic point charges, but we also allow for custom models for Slater / Gaussian distributions, distributed electrostatics, use of quantum mechanics, etc.
Key methods are to determine either atomic partial charges or electrostatic potentials at particular points in space.
There is a default implementation for the electrostatic potential at points in space, based on the atomic partial charges. If you implement a different mechanism, you should override this method.
|
pure virtual |
Create a new instance of the model. Ownership passes to the caller.
Implemented in DefaultModel.
|
pure virtual |
Implemented in DefaultModel.
|
pure virtual |
Implemented in DefaultModel.
|
pure virtual |
Implemented in DefaultModel.
|
virtual |
Set the dielectric constant for the model.
dielectric | constant. |
|
virtual |
|
pure virtual |
Implemented in DefaultModel.
|
virtual |
mol | The molecule to calculate the potential for. |
point | The point in space to calculate the potential at. |
|
virtual |
mol | The molecule to calculate the potential for. |
array | The points in space to calculate the potential at. |
This method is used for batch calculation and defaults to simply calculating each point at a time. Some methods work faster in batches.
|
protected |
errorString | The error to be added. |
newLine | Add a new line after the error string? |