36 lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115};
48 ions_.R[0] = {0.0, 0.0, 0.0};
49 ions_.R[1] = {1.68658058, 1.68658058, 1.68658058};
50 ions_.R[2] = {3.37316115, 3.37316115, 0.0};
51 ions_.R[3] = {5.05974173, 5.05974173, 1.68658058};
55 elec_.
R[0] = {0.0, 0.0, 0.0};
56 elec_.
R[1] = {0.0, 1.0, 0.0};
60 tspecies(chargeIdx, upIdx) = -1;
70 auto twf_ptr = wf_factory.buildTWF(ein_xml, runtime_options);
72 std::unique_ptr<SPOSet> spo(twf_ptr->getSPOSet(
"spo").makeClone());
78 spo->evaluate_notranspose(elec_, 0, elec_.
R.
size(), psiM, dpsiM, d2psiM);
97 #if defined(QMC_COMPLEX) 115 TEST_CASE(
"SPO input spline from HDF diamond_2x1x1",
"[wavefunction]")
119 app_log() <<
"-------------------------------------------------------------" << std::endl;
120 app_log() <<
"diamondC_2x1x1 input style 1 using sposet_collection" << std::endl;
121 app_log() <<
"-------------------------------------------------------------" << std::endl;
122 const char* spo_xml_string1 = R
"(<wavefunction name="psi0" target="elec"> 123 <sposet_collection name="einspline_diamond_size4" type="einspline" href="diamondC_2x1x1.pwscf.h5" tilematrix="2 0 0 0 1 0 0 0 1" twistnum="0" source="ion" meshfactor="1.0" precision="float"> 124 <sposet name="spo" size="4" spindataset="0"/> 130 app_log() << "-------------------------------------------------------------" << std::endl;
131 app_log() <<
"diamondC_2x1x1 input style 2 sposet inside determinantset" << std::endl;
132 app_log() <<
"-------------------------------------------------------------" << std::endl;
133 const char* spo_xml_string2 = R
"(<wavefunction name="psi0" target="elec"> 134 <determinantset type="einspline" href="diamondC_2x1x1.pwscf.h5" tilematrix="2 0 0 0 1 0 0 0 1" twistnum="0" source="ion" meshfactor="1.0" precision="float"> 135 <sposet name="spo" size="4" spindataset="0"/> 137 <determinant name="det" sposet="spo"/> 144 app_log() << "-------------------------------------------------------------" << std::endl;
145 app_log() <<
"diamondC_2x1x1 input style 3 sposet inside determinantset" << std::endl;
146 app_log() <<
"-------------------------------------------------------------" << std::endl;
147 const char* spo_xml_string3 = R
"(<wavefunction name="psi0" target="elec"> 148 <determinantset type="einspline" href="diamondC_2x1x1.pwscf.h5" tilematrix="2 0 0 0 1 0 0 0 1" twistnum="0" source="ion" meshfactor="1.0" precision="float"> 150 <determinant name="spo" size="4" spindataset="0"/> a class that defines a supercell in D-dimensional Euclean space.
void setName(const std::string &aname)
void setSimulationCell(const SimulationCell &simulation_cell)
set simulation cell
class that handles xmlDoc
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 addParticleSet(std::unique_ptr< ParticleSet > &&p)
add a ParticleSet* to the pool with its ownership transferred ParticleSet built outside the ParticleS...
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
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 ...
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Wrapping information on parallelism.
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
Specialized paritlce class for atomistic simulations.
float imag(const float &c)
imaginary part of a scalar. Cannot be replaced by std::imag due to AFQMC specific needs...
size_type size() const
return the current size
REQUIRE(std::filesystem::exists(filename))
void test_diamond_2x1x1_xml_input(const std::string &spo_xml_string)
Manage a collection of ParticleSet objects.
Factory class to build a many-body wavefunction.
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
void create(const std::vector< int > &agroup)
create grouped particles
bool parseFromString(const std::string_view data)
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
Declaration of a WaveFunctionFactory.
Custom container for set of attributes for a set of species.
const PoolType & getPool() const
get the Pool object
const auto & getSimulationCell() const
get simulation cell
Declaration of ParticleSetPool.