53 ions.
R[0] = {0.0, 0.0, 0.0};
55 std::vector<int> agroup(1);
58 elec.
R[0] = {1.0, 0.0, 0.0};
59 elec.
R[1] = {0.0, 0.0, 1.0};
66 tspecies(chargeIdx, upIdx) = -1;
67 tspecies(massIdx, upIdx) = 1.0;
76 psi.registerData(elec, elec[0]->DataSet);
77 elec[0]->DataSet.allocate();
81 for (std::unique_ptr<RNG>& rng : rngs)
82 rng = std::make_unique<FakeRandom<QMCTraits::FullPrecRealType>>();
85 std::unique_ptr<BareKineticEnergy> p_bke = std::make_unique<BareKineticEnergy>(elec, psi);
87 h.addObservables(elec);
89 elec.resetWalkerProperty();
91 DMC dmc_omp(project_data, elec, psi, h, rngs, c,
false);
93 const char* dmc_input = R
"(<qmc method="dmc" checkpoint="-1"> 94 <parameter name="steps">1</parameter> 95 <parameter name="blocks">1</parameter> 96 <parameter name="timestep">0.1</parameter> 110 CHECK(ar == Approx(1.0));
116 CHECK(elec[0]->R[0][0] == Approx(0.627670258894097));
117 CHECK(elec.R[0][1] == Approx(0.0));
118 CHECK(elec.R[0][2] == Approx(-0.372329741105903));
120 CHECK(elec.R[1][0] == Approx(0.0));
121 CHECK(elec.R[1][1] == Approx(-0.372329741105903));
122 CHECK(elec.R[1][2] == Approx(1.0));
136 ions.
R[0] = {0.0, 0.0, 0.0};
138 std::vector<int> agroup(1);
141 elec.
R[0] = {1.0, 0.0, 0.0};
150 tspecies(chargeIdx, upIdx) = -1;
151 tspecies(massIdx, upIdx) = 1.0;
160 psi.registerData(elec, elec[0]->DataSet);
161 elec[0]->DataSet.allocate();
165 for (std::unique_ptr<RNG>& rng : rngs)
166 rng = std::make_unique<FakeRandom<QMCTraits::FullPrecRealType>>();
169 std::unique_ptr<BareKineticEnergy> p_bke = std::make_unique<BareKineticEnergy>(elec, psi);
171 h.addObservables(elec);
173 elec.resetWalkerProperty();
175 DMC dmc_omp(project_data, elec, psi, h, rngs, c,
false);
177 const char* dmc_input = R
"(<qmc method="dmc" checkpoint="-1"> 178 <parameter name="steps">1</parameter> 179 <parameter name="blocks">1</parameter> 180 <parameter name="timestep">0.1</parameter> 181 <parameter name="SpinMass">0.25</parameter> 195 CHECK(ar == Approx(1.0));
201 CHECK(elec[0]->R[0][0] == Approx(0.627670258894097));
202 CHECK(elec.R[0][1] == Approx(0.0));
203 CHECK(elec.R[0][2] == Approx(-0.372329741105903));
205 CHECK(elec.spins[0] == Approx(-0.74465948215809097));
void setName(const std::string &aname)
class that handles xmlDoc
A set of walkers that are to be advanced by Metropolis Monte Carlo.
int addSpecies(const std::string &aname)
When a name species does not exist, add a new species.
helper functions for EinsplineSetBuilder
ParticleScalar spins
internal spin variables for dynamical spin calculations
void addOperator(std::unique_ptr< OperatorBase > &&h, const std::string &aname, bool physical=true)
add an operator
static void clearClones()
TEST_CASE("complex_helper", "[type_traits]")
Collection of Local Energy Operators.
std::vector< std::unique_ptr< T > > UPtrVector
void update(bool skipSK=false)
update the internal data
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 ...
const RuntimeOptions & getRuntimeOptions() const noexcept
Wrapping information on parallelism.
int addTable(const ParticleSet &psrc, DTModes modes=DTModes::ALL_OFF)
add a distance table
Specialized paritlce class for atomistic simulations.
omp_int_t omp_get_max_threads()
REQUIRE(std::filesystem::exists(filename))
Declaration of WaveFunctionPool.
Manager class of scalar estimators.
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
void create(const std::vector< int > &agroup)
create grouped particles
Declaration of a TrialWaveFunction.
Declaration of HamiltonianPool.
Class to represent a many-body trial wave function.
bool parseFromString(const std::string_view data)
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
RealType acceptRatio() const
Declaration of WaveFunctionComponent.
Custom container for set of attributes for a set of species.
void setSpinor(bool is_spinor)
void createWalkers(int numWalkers)
create numWalkers Walkers
Declare a global Random Number Generator.
Declaration of a MCWalkerConfiguration.
void process(xmlNodePtr cur) override
initialize with xmlNode
Define OpenMP-able DMC Driver.
void addComponent(std::unique_ptr< WaveFunctionComponent > &&aterm)
add a WaveFunctionComponent
Declaration of ParticleSetPool.
DMC driver using OpenMP paragra.