32 using LogValue = std::complex<QMCTraits::QTFull::RealType>;
41 const char* xmltext = R
"(<tmp> 43 <parameter name="lattice" units="bohr"> 44 6.00000000 0.00000000 0.00000000 45 0.00000000 6.00000000 0.00000000 46 0.00000000 0.00000000 6.00000000 48 <parameter name="bconds"> 51 <parameter name="LR_dim_cutoff"> 15 </parameter> 60 xmlNodePtr part1 = xmlFirstElementChild(root);
66 auto ions_ptr = std::make_unique<ParticleSet>(simulation_cell);
67 auto elec_ptr = std::make_unique<ParticleSet>(simulation_cell);
68 auto &ions(*ions_ptr), elec(*elec_ptr);
72 ions.R[0] = {0.0, 0.0, 0.0};
73 ions.R[1] = {0.0, 0.0, 0.0};
76 elec.R[0] = {-0.28, 0.0225, -2.709};
77 elec.R[1] = {-1.08389, 1.9679, -0.0128914};
78 std::map<string, const std::unique_ptr<ParticleSet>> pp;
79 pp.emplace(ions_ptr->getName(), std::move(ions_ptr));
80 pp.emplace(elec_ptr->getName(), std::move(elec_ptr));
86 tspecies(chargeIdx, upIdx) = -1;
87 tspecies(chargeIdx, downIdx) = -1;
92 const char* particles = R
"(<tmp> 93 <ionwf name="ionwf" source="ion" width="0.5 0.5"/> 101 xmlNodePtr jas1 = xmlFirstElementChild(root); 107 double alpha = 1. / (2 * width * width);
109 for (
int i = 0; i < 2; i++)
111 CHECK(LGP->ParticleAlpha[i] == Approx(alpha));
118 LogValue logpsi = LGP->evaluateLog(elec, elec.G, elec.L);
121 double wfval =
std::exp(-alpha * r2);
a class that defines a supercell in D-dimensional Euclean space.
LatticeGaussianProduct LatticeGaussianProduct Builder with constraints.
class that handles xmlDoc
int addSpecies(const std::string &aname)
When a name species does not exist, add a new species.
std::unique_ptr< WaveFunctionComponent > buildComponent(xmlNodePtr cur) override
process a xml node at cur
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
TEST_CASE("complex_helper", "[type_traits]")
Communicate * Controller
Global Communicator for a process.
int addAttribute(const std::string &aname)
for a new attribute, allocate the data, !More often used to get the index of a species ...
T Dot(const ParticleAttrib< TinyVector< T, D >> &pa, const ParticleAttrib< TinyVector< T, D >> &pb)
Wrapping information on parallelism.
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
REQUIRE(std::filesystem::exists(filename))
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
MakeReturn< UnaryNode< FnLog, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t log(const Vector< T1, C1 > &l)
QMCTraits::RealType RealType
bool parseFromString(const std::string_view data)
Declaraton of ParticleAttrib<T>
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
Declaration of WaveFunctionComponent.
std::complex< double > LogValue
Custom container for set of attributes for a set of species.
Simple gaussian functions used for orbitals for ions.