23 #include "tools/SwitchingFunction.h"
25 #include "core/PlumedMain.h"
26 #include "core/Atoms.h"
71 static void registerKeywords(
Keywords& keys );
72 virtual double pairing(
double distance,
double&dfunc,
unsigned i,
unsigned j)
const;
75 PLUMED_REGISTER_ACTION(
DHEnergy,
"DHENERGY")
78 CoordinationBase::registerKeywords(keys);
79 keys.add(
"compulsory",
"I",
"1.0",
"Ionic strength (M)");
80 keys.add(
"compulsory",
"TEMP",
"300.0",
"Simulation temperature (K)");
81 keys.add(
"compulsory",
"EPSILON",
"80.0",
"Dielectric constant of solvent");
118 if(
plumed.getAtoms().usingNaturalUnits() )
error(
"DHENERGY cannot be used for calculations performed with natural units");
122 log<<
" with solvent dielectric constant "<<
epsilon<<
"\n";
123 log<<
" at temperature "<<T<<
" K\n";
124 log<<
" at ionic strength "<<I<<
"M\n";
125 log<<
" these parameters correspond to a screening length of "<<(1.0/
k)<<
"\n";
126 log<<
" Bibliography "<<
plumed.cite(
"Do, Carloni, Varani and Bussi, J. Chem. Theory Comput. 9, 1720 (2013)")<<
" \n";
134 double invdistance=1.0/distance;
136 double dtmp=-(
k+invdistance)*tmp;
137 dfunc=dtmp*invdistance;
Log & log
Reference to the log stream.
AtomNumber getAbsoluteIndex(int i) const
Get the absolute index of an atom.
void error(const std::string &msg) const
Crash calculation and print documentation.
void checkRead()
Check if Action was properly read.
void parse(const std::string &key, T &t)
Parse one keyword as generic type.
This class holds the keywords and their documentation.
This class is used to bring the relevant information to the Action constructor.
const double & getEnergy() const
Get energy units as double.
Base class for all the input Actions.
double getCharge(int i) const
Get charge of i-th atom.
virtual double pairing(double distance, double &dfunc, unsigned i, unsigned j) const
const double & getLength() const
Get length units as double.
Provides the keyword DHENERGY