29EwaldSetup::EwaldSetup() : params ( ),
38 bool argConsistent =
false;
41 argConsistent = (args.size() == 1);
43 argConsistent = (args.size() >= 1 && args.size() <= 3);
46 throw runtime_error(
"ERROR: Number of arguments for ewald_prec is "
47 "not consistent with "
48 "ewald_truncation_error_method.");
52 throw runtime_error(
"ERROR: Ewald precision must be positive.");
75 double const convLength)
91 throw runtime_error(
"ERROR: Undefined Ewald truncation method.");
100 log <<
"-----------------------------------------"
101 "--------------------------------------\n";
102 log <<
"Ewald parameters for this structure changed:\n";
103 log <<
strpr(
"Real space cutoff: %16.8E\n",
105 log <<
strpr(
"Reciprocal space cutoff: %16.8E\n",
107 log <<
strpr(
"Ewald screening parameter: %16.8E\n",
110 log <<
strpr(
"WARNING: Ewald truncation error estimate may not be "
111 "reliable, better compare it\n"
112 " with high accuracy settings.\n");
void toNormalizedUnits(double const convEnergy, double const convLength)
Convert cutoff parameters to normalized units.
EWALDTruncMethod truncMethod
Method for determining real and k space cutoffs.
void calculateParameters(double const newVolume, size_t const newNumAtoms)
Compute eta, rCut and kCut.
std::unique_ptr< IEwaldTrunc > truncImpl
bool publishedNewCutoffs() const
void logEwaldCutoffs(Log &log, double const lengthConversion) const
Use after Ewald summation!
EwaldGlobalSettings GlobSett
bool isEstimateReliable() const
void readFromArgs(std::vector< std::string > const &args)
Setup parameters from argument vector.
Logging class for library output.
@ KOLAFA_PERRAM
Method 1: Optimized in n2p2 (DOI: 10.1080/08927029208049126).
@ JACKSON_CATLOW
Method 0: Used by RuNNer (DOI: 10.1080/08927028808080944).
string strpr(const char *format,...)
String version of printf function.
double fourPiEps
Multiplicative constant .
EwaldParameters toPhysicalUnits(double const convLength) const
double rCut
Cutoff in real space.
double eta
Width of the gaussian screening charges.
EwaldParameters toNormalizedUnits(double const convLength) const
double kCut
Cutoff in reciprocal space.