48 double constexpr acceptError = 1.e-10;
52 / pow(2 * M_PI, 3.0), 1.0 / 6.0);
57 double relError = 1.0;
59 while (relError > acceptError)
63 eta = eta0 * pow((1 + 1 / (2 * pow(
s, 2))), 1.0 / 6.0);
64 relError = abs(oldEta -
eta) /
eta;
74 return sqrt(2)*
s /
eta;
79 double constexpr acceptError = 1.e-10;
80 double relXError = 1.0;
81 double relYError = 1.0;
84 if (
s <= 0.0)
s = 0.5;
87 while (relXError > acceptError || relYError > acceptError)
89 step = 2*
s / (4*pow(
s,2.0) + 1)
90 * (1 - sqrt(
s) / exp(-pow(
s,2.0)) * y);
100 relYError = abs((exp(-pow(
s,2.0)) / sqrt(
s) - y) / y);
101 relXError = abs(step/
s);
std::size_t getNumAtoms() const
void calculateC(double const qMax)
void calculateParameters(EwaldGlobalSettings const &settings, EwaldStructureData const &sData, EwaldParameters ¶ms) override
bool newCutoffsWerePublished
bool publishedNewCutoffs() override
double constexpr TrOverTk
double fourPiEps
Multiplicative constant .
double rCut
Cutoff in real space.
double eta
Width of the gaussian screening charges.
double kCut
Cutoff in reciprocal space.