![]() |
QMCPACK
|
Classes | |
class | KspaceEwaldTerm |
Functor for term within the k-space sum in Drummond 2008 formula 6. More... | |
class | KspaceMadelungTerm |
Functor for term within the k-space sum in Drummond 2008 formula 7. More... | |
class | RspaceEwaldTerm |
Functor for term within the real-space sum in Drummond 2008 formula 6. More... | |
class | RspaceMadelungTerm |
Functor for term within the real-space sum in Drummond 2008 formula 7. More... | |
Typedefs | |
using | int_t = int |
Type for integers. More... | |
using | real_t = double |
Type for floating point numbers. More... | |
using | IntVec = TinyVector< int_t, DIM > |
Type for integer vectors of length DIM. More... | |
using | RealVec = TinyVector< real_t, DIM > |
Type for floating point vectors of length DIM. More... | |
using | RealMat = Tensor< real_t, DIM > |
Type for floating point matrices of shape DIM,DIM. More... | |
using | PosArray = std::vector< RealVec > |
Type for lists of particle positions. More... | |
using | ChargeArray = std::vector< real_t > |
Type for lists of particle charges. More... | |
Enumerations | |
enum | { DIM = 3 } |
Reference Ewald implemented for 3D only. More... | |
Functions | |
template<typename T > | |
real_t | gridSum (T &function, bool zero=true, real_t tol=1e-11) |
Perform a sum over successively larger cubic integer grids in DIM dimensional space for arbitrary functors. More... | |
real_t | getKappaMadelung (real_t volume) |
Find the optimal kappa for Madelung sums. More... | |
real_t | madelungSum (const RealMat &a, real_t tol=1e-10) |
Compute the Madelung constant to a given tolerance. More... | |
real_t | getKappaEwald (real_t volume) |
Find the optimal kappa for Ewald pair sums. More... | |
real_t | ewaldSum (const RealVec &r, const RealMat &a, real_t tol=1e-10) |
Compute the Ewald interaction of a particle pair to a given tolerance. More... | |
real_t | ewaldEnergy (const RealMat &a, const PosArray &R, const ChargeArray &Q, real_t tol) |
Compute the total Ewald potential energy for a collection of charges. More... | |
using ChargeArray = std::vector<real_t> |
Type for lists of particle charges.
Definition at line 54 of file EwaldRef.h.
using int_t = int |
Type for integers.
Definition at line 42 of file EwaldRef.h.
using IntVec = TinyVector<int_t, DIM> |
Type for integer vectors of length DIM.
Definition at line 46 of file EwaldRef.h.
Type for lists of particle positions.
Definition at line 52 of file EwaldRef.h.
using real_t = double |
Type for floating point numbers.
Definition at line 44 of file EwaldRef.h.
Type for floating point matrices of shape DIM,DIM.
Definition at line 50 of file EwaldRef.h.
using RealVec = TinyVector<real_t, DIM> |
Type for floating point vectors of length DIM.
Definition at line 48 of file EwaldRef.h.
anonymous enum |
real_t ewaldEnergy | ( | const RealMat & | a, |
const PosArray & | R, | ||
const ChargeArray & | Q, | ||
real_t | tol | ||
) |
Compute the total Ewald potential energy for a collection of charges.
Corresponds to the entirety of Drummond 2008 formula 5, but for arbitrary charges.
a | Real-space cell axes. |
R | List of particle coordinates. |
R | List of particle charges. |
tol | Tolerance for the total potential energy in Ha. |
Definition at line 337 of file EwaldRef.cpp.
References qmcplusplus::abs(), qmcplusplus::createGlobalTimer(), DIM, qmcplusplus::dot(), ewaldSum(), qmcplusplus::floor(), qmcplusplus::inverse(), madelungSum(), and qmcplusplus::Units::force::N.
Referenced by CoulombPBCAA::CoulombPBCAA(), and qmcplusplus::TEST_CASE().
Compute the Ewald interaction of a particle pair to a given tolerance.
Corresponds to the entirety of Drummond 2008 formula 6.
r | Inter-particle separation vector. |
a | Real-space cell axes. |
tol | Tolerance for the Ewald pair interaction in Ha. |
Definition at line 292 of file EwaldRef.cpp.
References qmcplusplus::abs(), qmcplusplus::det(), getKappaEwald(), gridSum(), qmcplusplus::inverse(), qmcplusplus::pow(), qmcplusplus::sqrt(), and qmcplusplus::transpose().
Referenced by ewaldEnergy().
Find the optimal kappa for Ewald pair sums.
The optimal kappa balances the number of points within a given isosurface of the Gaussians (or limiting Gaussians from erfc) in the real-space and k-space Ewald pair terms. The balancing condition is made under isotropic assumptions, as reflected by the use of a sphere equal in volume to the simulation cell to determine the radius.
volume | Volume of the real space cell. |
Definition at line 275 of file EwaldRef.cpp.
References qmcplusplus::pow(), and qmcplusplus::sqrt().
Referenced by ewaldSum().
Find the optimal kappa for Madelung sums.
The optimal kappa balances the number of points within a given isosurface of the Gaussians (or limiting Gaussians from erfc) in the real-space and k-space Madelung terms. The balancing condition is made under isotropic assumptions, as reflected by the use of a sphere equal in volume to the simulation cell to determine the radius.
volume | Volume of the real space cell. |
Definition at line 217 of file EwaldRef.cpp.
References qmcplusplus::pow(), and qmcplusplus::sqrt().
Referenced by madelungSum().
Perform a sum over successively larger cubic integer grids in DIM dimensional space for arbitrary functors.
function | A functor accepting a point in the grid and returning the real-valued contribution to the sum from that point. |
zero | Include the origin in the sum (or not). |
tol | Tolerance for the sum. Summation ceases when the contribution to the sum from the outermost cubic shell of points is less than tol. |
Definition at line 140 of file EwaldRef.cpp.
References qmcplusplus::abs().
Referenced by ewaldSum(), and madelungSum().
Compute the Madelung constant to a given tolerance.
Corresponds to the entirety of Drummond 2008 formula 7.
a | Real-space cell axes. |
tol | Tolerance for the Madelung constant in Ha. |
Definition at line 232 of file EwaldRef.cpp.
References qmcplusplus::abs(), qmcplusplus::det(), getKappaMadelung(), gridSum(), qmcplusplus::inverse(), qmcplusplus::Units::time::ms, qmcplusplus::pow(), qmcplusplus::sqrt(), and qmcplusplus::transpose().
Referenced by ewaldEnergy().