26 auto qp = std::make_unique<ParticleSet>(simulation_cell);
39 tspecies(massIdx, upIdx) = 1.0;
50 auto ions_ptr = std::make_unique<ParticleSet>(simulation_cell);
52 auto &ions(*ions_ptr), elec(*elec_ptr);
58 particle_set_map.emplace(ions_ptr->getName(), std::move(ions_ptr));
59 particle_set_map.emplace(elec_ptr->getName(), std::move(elec_ptr));
67 const char* hamiltonian_xml = R
"(<hamiltonian name="h0" type="generic" target="e"> 68 <pairpot type="coulomb" name="ElecElec" source="e" target="e"/> 69 <pairpot type="coulomb" name="IonIon" source="ion0" target="ion0"/> 70 <pairpot type="coulomb" name="ElecIon" source="ion0" target="e"/> 89 TEST_CASE(
"HamiltonianFactory pseudopotential",
"[hamiltonian]")
95 auto ions_ptr = std::make_unique<ParticleSet>(simulation_cell);
97 auto &ions(*ions_ptr), elec(*elec_ptr);
100 std::vector<int> agroup({1});
106 int atomicNumberIdx = tspecies.
addAttribute(
"atomicnumber");
107 tspecies(chargeIdx, idx) = 4;
108 tspecies(atomicNumberIdx, idx) = 6;
111 particle_set_map.emplace(ions_ptr->getName(), std::move(ions_ptr));
112 particle_set_map.emplace(elec_ptr->getName(), std::move(elec_ptr));
120 const char* hamilonian_xml = R
"(<hamiltonian name="h0" type="generic" target="e"> 121 <pairpot type="pseudo" name="PseudoPot" source="ion0" wavefunction="psi0" format="xml"> 122 <pseudo elementType="C" href="C.BFD.xml"/> 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]")
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
QMCHamiltonian * getH() const
get targetH
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 ...
Wrapping information on parallelism.
REQUIRE(std::filesystem::exists(filename))
int size() const
return the number of Hamiltonians
Factory class to build a many-body wavefunction.
bool put(xmlNodePtr cur)
read from xmlNode
Declaration of a HamiltonianFactory.
std::map< std::string, const std::unique_ptr< TrialWaveFunction > > PsiPoolType
std::unique_ptr< ParticleSet > createElectronParticleSet(const SimulationCell &simulation_cell)
static std::unique_ptr< TrialWaveFunction > buildEmptyTWFForTesting(const RuntimeOptions &runtime_options, const std::string_view name)
create an empty TrialWaveFunction for testing use.
const std::string & getOperatorType(const std::string &name)
return type of named H element or fail
bool parseFromString(const std::string_view data)
Declaration of a WaveFunctionFactory.
Custom container for set of attributes for a set of species.
int total_size() const
return the total number of Hamiltonians (physical + aux)