28 TEST_CASE(
"Coulomb PBC A-A Ewald3D",
"[hamiltonian]")
40 ions.
R[0] = {0.0, 0.0, 0.0};
44 ion_species(pChargeIdx, pIdx) = 1;
54 CHECK(consts == Approx(-3.142553));
57 CHECK(val == Approx(-1.418927));
62 TEST_CASE(
"Coulomb PBC A-A BCC H Ewald3D",
"[hamiltonian]")
75 ions.
R[0] = {0.0, 0.0, 0.0};
76 ions.
R[1] = {1.88972614, 1.88972614, 1.88972614};
80 ion_species(pChargeIdx, pIdx) = 1;
90 CHECK(consts == Approx(-1.690675));
93 CHECK(val == Approx(-0.963074));
98 TEST_CASE(
"Coulomb PBC A-A elec Ewald3D",
"[hamiltonian]")
110 elec.
R[0] = {0.0, 0.5, 0.0};
115 tspecies(chargeIdx, upIdx) = -1;
116 tspecies(massIdx, upIdx) = 1.0;
128 CHECK(consts == Approx(-3.142553));
131 CHECK(val == Approx(-1.418927));
a class that defines a supercell in D-dimensional Euclean space.
void setName(const std::string &aname)
Calculates the AA Coulomb potential using PBCs.
int addSpecies(const std::string &aname)
When a name species does not exist, add a new species.
helper functions for EinsplineSetBuilder
TEST_CASE("complex_helper", "[type_traits]")
void update(bool skipSK=false)
update the internal data
static std::unique_ptr< LRHandlerType > CoulombHandler
Stores the energ optimized LR handler.
int addAttribute(const std::string &aname)
for a new attribute, allocate the data, !More often used to get the index of a species ...
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
Specialized paritlce class for atomistic simulations.
Return_t evalConsts(bool report=true)
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
void create(const std::vector< int > &agroup)
create grouped particles
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
void createSK()
create Structure Factor with PBCs
Custom container for set of attributes for a set of species.
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.