QMCPACK
test_CompositeSPOSet.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2021 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "catch.hpp"
15 #include <exception>
18 #include "Utilities/ProjectData.h"
19 
20 namespace qmcplusplus
21 {
22 
23 TEST_CASE("CompositeSPO::diamond_1x1x1", "[wavefunction")
24 {
26 
31 
33  auto wavefunction_pool =
35  auto& pset = *particle_pool.getParticleSet("e");
36  auto& twf = *wavefunction_pool.getWaveFunction("wavefunction");
37 
38  CompositeSPOSet comp_sposet("one_composite_set");
39 
40  std::vector<std::string> sposets{"spo_ud", "spo_dm"};
41  for (auto sposet_str : sposets)
42  {
43  auto& sposet = twf.getSPOSet(sposet_str);
44  comp_sposet.add(sposet.makeClone());
45  }
46  CHECK(comp_sposet.size() == 8);
47 
48  SPOSet::ValueMatrix psiM(pset.R.size(), comp_sposet.getOrbitalSetSize());
49  SPOSet::GradMatrix dpsiM(pset.R.size(), comp_sposet.getOrbitalSetSize());
50  SPOSet::ValueMatrix d2psiM(pset.R.size(), comp_sposet.getOrbitalSetSize());
51  comp_sposet.evaluate_notranspose(pset, 0, pset.R.size(), psiM, dpsiM, d2psiM);
52 }
53 } // namespace qmcplusplus
class that handles xmlDoc
Definition: Libxml2Doc.h:76
void pause()
Pause the summary and log streams.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
class ProjectData
Definition: ProjectData.h:36
static ParticleSetPool make_diamondC_1x1x1(Communicate *c)
TEST_CASE("complex_helper", "[type_traits]")
static WaveFunctionPool make_diamondC_1x1x1(const RuntimeOptions &runtime_options, Communicate *comm, ParticleSetPool &particle_pool)
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
Definition: SPOSet.h:50
ProjectData test_project("test", ProjectData::DriverVersion::BATCH)
int size() const
return the size of the orbital set Ye: this needs to be replaced by getOrbitalSetSize(); ...
Definition: SPOSet.h:75
Communicate * Controller
Global Communicator for a process.
Definition: Communicate.cpp:35
const RuntimeOptions & getRuntimeOptions() const noexcept
OutputManagerClass outputManager(Verbosity::HIGH)
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Definition: SPOSet.h:52
Wrapping information on parallelism.
Definition: Communicate.h:68
int getOrbitalSetSize() const
return the size of the orbitals
Definition: SPOSet.h:88
void add(std::unique_ptr< SPOSet > component)
add a sposet component to this composite sposet
void evaluate_notranspose(const ParticleSet &P, int first, int last, ValueMatrix &logdet, GradMatrix &dlogdet, ValueMatrix &d2logdet) override
evaluate the values, gradients and laplacians of this single-particle orbital for [first...
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))