1 #ifndef SIMP_EWALD_INTERACTION_H 2 #define SIMP_EWALD_INTERACTION_H 11 #include <util/param/ParamComposite.h> 91 void set(std::string name,
double value);
155 double alpha()
const;
172 double get(std::string name)
const;
185 double rSpaceCutoff_;
188 double rSpaceCutoffSq_;
199 void setDerivedConstants();
222 {
return rSpaceCutoff_; }
229 {
return rSpaceCutoffSq_; }
238 double r = sqrt(rSq);
239 return ce_*qProduct*erfc(alpha_*r)/r;
249 double r = sqrt(rSq);
251 return ce_*qProduct*(erfc(x) + cf_*r*exp(-x*x))/(r*rSq);
259 {
return exp(cg_*kSq)/(kSq*epsilon_); }
EwaldInteraction & operator=(const EwaldInteraction &other)
Assignment.
double kSpacePotential(double kSq) const
Return regularized Fourier-space potential.
~EwaldInteraction()
Default destructor.
double rSpaceForceOverR(double rSq, double qProduct) const
Return ratio of scalar pair interaction force to pair separation.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
File containing preprocessor macros for error handling.
double rSpaceCutoffSq() const
Get real space cutoff squared.
Classes used by all simpatico molecular simulations.
Saving / output archive for binary ostream.
EwaldInteraction()
Default constructor.
double rSpaceEnergy(double rSq, double qProduct) const
Returns r-space interaction energy for a single pair of atoms.
double alpha() const
Get Ewald smearing parameter alpha (inverse length).
Implementation of r-space and k-space Ewald Coulomb interactions.
Utility classes for scientific computation.
double rSpaceCutoff() const
Get real space cutoff.
Saving archive for binary istream.
double epsilon() const
Get dielectric permittivity.
An object that can read multiple parameters from file.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
void readParameters(std::istream &in)
Read epsilon, alpha, and rCutoff.