45#include "flucq/FluctuatingChargeForces.hpp"
51#include "math/RealSymmetricTridiagonal.hpp"
52#include "types/FluctuatingChargeAdapter.hpp"
56 FluctuatingChargeForces::FluctuatingChargeForces(
SimInfo* info) :
57 info_(info), initialized_(false) {}
59 void FluctuatingChargeForces::initialize() {
62 FQtids.resize(forceField_->getNAtomType(), -1);
64 AtomTypeSet::iterator at;
65 for (at = simTypes_.begin(); at != simTypes_.end(); ++at)
66 if ((*at)->isFluctuatingCharge()) addType(*at);
71 void FluctuatingChargeForces::getSelfInteraction(
int atid, RealType charge,
74 if (!initialized_) initialize();
85 void FluctuatingChargeForces::addType(
AtomType* atomType) {
88 if (fqa.isFluctuatingCharge()) {
89 data.electronegativity = fqa.getElectronegativity();
90 data.hardness = fqa.getHardness();
91 data.slaterN = fqa.getSlaterN();
92 data.slaterZeta = fqa.getSlaterZeta();
93 data.vself_ = fqa.getSelfPolynomial();
95 int atid = atomType->getIdent();
98 pair<set<int>::iterator,
bool> ret;
100 if (ret.second ==
false) {
101 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
102 "FluctuatingChargeForces already had a previous fluctuating "
103 "charge entry with ident %d\n",
105 painCave.severity = OPENMD_INFO;
106 painCave.isFatal = 0;
110 FQMap.push_back(data);
AtomType is what OpenMD looks to for unchanging data about an atom.
vector< FluctuatingChargeAtomData > FQMap
data about fluctuating types
set< int > FQtypes
The set of AtomType idents that are fluctuating types.
vector< int > FQtids
The mapping from AtomType ident -> fluctuating ident.
Real evaluateDerivative(const Real &x)
Returns the first derivative of this polynomial.
Real evaluate(const Real &x)
Calculates the value of this Polynomial evaluated at the given x value.
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.