QMCPACK
test_hybridrep.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) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
8 //
9 // File created by: Mark Dewing, markdewing@gmail.com, University of Illinois at Urbana-Champaign
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "catch.hpp"
14 
15 #include <cstdio>
16 #include <string>
17 #include <limits>
18 
19 #include "OhmmsData/Libxml2Doc.h"
20 #include "OhmmsPETE/OhmmsMatrix.h"
21 #include "DistanceTable.h"
22 #include "Particle/ParticleSet.h"
27 #include <ResourceCollection.h>
29 
30 using std::string;
31 
32 namespace qmcplusplus
33 {
34 TEST_CASE("Hybridrep SPO from HDF diamond_1x1x1", "[wavefunction]")
35 {
37 
39  // diamondC_1x1x1
40  lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115};
41 
44  auto ions_uptr = std::make_unique<ParticleSet>(ptcl.getSimulationCell());
45  auto elec_uptr = std::make_unique<ParticleSet>(ptcl.getSimulationCell());
46  ParticleSet& ions_(*ions_uptr);
47  ParticleSet& elec_(*elec_uptr);
48 
49  ions_.setName("ion");
50  ptcl.addParticleSet(std::move(ions_uptr));
51  ions_.create({2});
52  ions_.R[0] = {0.0, 0.0, 0.0};
53  ions_.R[1] = {1.68658058, 1.68658058, 1.68658058};
54  SpeciesSet& ion_species = ions_.getSpeciesSet();
55  int C_Idx = ion_species.addSpecies("C");
56  int C_chargeIdx = ion_species.addAttribute("charge");
57  int cutoffIdx = ion_species.addAttribute("cutoff_radius");
58  int lmaxIdx = ion_species.addAttribute("lmax");
59 
60  ion_species(C_chargeIdx, C_Idx) = 4;
61  ion_species(cutoffIdx, C_Idx) = 0.9;
62  ion_species(lmaxIdx, C_Idx) = 3;
63 
64  elec_.setName("elec");
65  ptcl.addParticleSet(std::move(elec_uptr));
66  elec_.create({3});
67  elec_.R[0] = {0.4, 0.0, 0.0};
68  elec_.R[1] = {0.0, 1.0, 0.0};
69  elec_.R[2] = {0.0, 0.5, 0.5};
70  SpeciesSet& tspecies = elec_.getSpeciesSet();
71  int upIdx = tspecies.addSpecies("u");
72  int chargeIdx = tspecies.addAttribute("charge");
73  tspecies(chargeIdx, upIdx) = -1;
74 
75  //diamondC_1x1x1
76  const char* particles = R"(<tmp>
77 <determinantset type="einspline" href="diamondC_1x1x1.pwscf.h5" tilematrix="1 0 0 0 1 0 0 0 1" twistnum="0" source="ion" meshfactor="1.0" precision="float" size="4" hybridrep="yes"/>
78 </tmp>
79 )";
80 
82  bool okay = doc.parseFromString(particles);
83  REQUIRE(okay);
84 
85  xmlNodePtr root = doc.getRoot();
86 
87  xmlNodePtr ein1 = xmlFirstElementChild(root);
88 
89  EinsplineSetBuilder einSet(elec_, ptcl.getPool(), c, ein1);
90  auto spo = einSet.createSPOSetFromXML(ein1);
91  REQUIRE(spo);
92 
93  ions_.update();
94  elec_.update();
95 
96  /* for vgl
97  * In DiracDeterminant, these psiM, dpsiM, and d2psiM
98  * are always sized to elec_.R.size() x elec_.R.size()
99  * Using the same sizes for these. This tests the case
100  * that spo->OrbitalSetSize > elec_.R.size()
101  */
102  SPOSet::ValueMatrix psiM(elec_.R.size(), elec_.R.size());
103  SPOSet::GradMatrix dpsiM(elec_.R.size(), elec_.R.size());
104  SPOSet::ValueMatrix d2psiM(elec_.R.size(), elec_.R.size());
105  spo->evaluate_notranspose(elec_, 0, elec_.R.size(), psiM, dpsiM, d2psiM);
106 
107  // due to the different ordering of bands skip the tests on CUDA+Real builds
108  // checking evaluations, reference values are not independently generated.
109  // electron 0
110  // value
111  CHECK(std::real(psiM[0][0]) == Approx(-0.6594096422));
112  CHECK(std::real(psiM[0][1]) == Approx(-1.3352056742));
113  // grad
114  CHECK(std::real(dpsiM[0][0][0]) == Approx(-0.8762991428));
115  CHECK(std::real(dpsiM[0][0][1]) == Approx(0.0000000044));
116  CHECK(std::real(dpsiM[0][0][2]) == Approx(0.0000000044));
117  CHECK(std::real(dpsiM[0][1][0]) == Approx(-0.8603816628));
118  CHECK(std::real(dpsiM[0][1][1]) == Approx(4.3501935005));
119  CHECK(std::real(dpsiM[0][1][2]) == Approx(-0.6386129856));
120  // lapl
121  CHECK(std::real(d2psiM[0][0]) == Approx(-4.1090884209));
122  CHECK(std::real(d2psiM[0][1]) == Approx(22.3851032257).epsilon(3e-5));
123 
124  // electron 1
125  // value
126  CHECK(std::real(psiM[1][0]) == Approx(-0.8886948824));
127  CHECK(std::real(psiM[1][1]) == Approx(1.4194120169));
128  // grad
129  CHECK(std::real(dpsiM[1][0][0]) == Approx(-0.0000183403));
130  CHECK(std::real(dpsiM[1][0][1]) == Approx(0.1655139178));
131  CHECK(std::real(dpsiM[1][0][2]) == Approx(-0.0000193077));
132  CHECK(std::real(dpsiM[1][1][0]) == Approx(-1.3131694794));
133  CHECK(std::real(dpsiM[1][1][1]) == Approx(-1.1174004078));
134  CHECK(std::real(dpsiM[1][1][2]) == Approx(-0.8462534547));
135  // lapl
136  CHECK(std::real(d2psiM[1][0]) == Approx(1.3313053846));
137  CHECK(std::real(d2psiM[1][1]) == Approx(-4.712583065));
138 
139  // electron 2
140  // value
141  CHECK(std::real(psiM[2][0]) == Approx(-0.8694150782));
142  CHECK(std::real(psiM[2][1]) == Approx(0.780789871));
143  // grad
144  CHECK(std::real(dpsiM[2][0][0]) == Approx(-0.0602699547));
145  CHECK(std::real(dpsiM[2][0][1]) == Approx(-0.2770632381));
146  CHECK(std::real(dpsiM[2][0][2]) == Approx(-0.2770632488));
147  CHECK(std::real(dpsiM[2][1][0]) == Approx(-1.5982062406));
148  CHECK(std::real(dpsiM[2][1][1]) == Approx(1.0020672904));
149  CHECK(std::real(dpsiM[2][1][2]) == Approx(-1.9794520201));
150  // lapl
151  CHECK(std::real(d2psiM[2][0]) == Approx(1.1232769428).epsilon(1e-4));
152  CHECK(std::real(d2psiM[2][1]) == Approx(-4.9779265738).epsilon(3e-5));
153 
154  //Let's also add test for orbital optimzation
155  if (spo->isRotationSupported())
156  {
157  SPOSet::ValueMatrix psiM(elec_.R.size(), spo->getOrbitalSetSize());
158  SPOSet::GradMatrix dpsiM(elec_.R.size(), spo->getOrbitalSetSize());
159  SPOSet::ValueMatrix d2psiM(elec_.R.size(), spo->getOrbitalSetSize());
160  spo->evaluate_notranspose(elec_, 0, elec_.R.size(), psiM, dpsiM, d2psiM);
161 
162  SPOSet::ValueVector row0{0.56752158, -0.3152607, 0.03525207, -0.75979421};
163  SPOSet::ValueVector row1{0.21452916, 0.75299027, -0.59552084, -0.17982718};
164  SPOSet::ValueVector row2{0.24049122, 0.55674778, 0.79497536, -0.01449368};
165  SPOSet::ValueVector row3{0.75766778, -0.1537799, -0.11011992, 0.62463179};
166  SPOSet::ValueMatrix rot_mat(4, 4);
167  for (int iorb = 0; iorb < 4; iorb++)
168  {
169  rot_mat[0][iorb] = row0[iorb];
170  rot_mat[1][iorb] = row1[iorb];
171  rot_mat[2][iorb] = row2[iorb];
172  rot_mat[3][iorb] = row3[iorb];
173  }
174  SPOSet::ValueMatrix psiM_rot_manual(elec_.R.size(), spo->size());
175  for (int i = 0; i < elec_.R.size(); i++)
176  for (int j = 0; j < spo->size(); j++)
177  {
178  psiM_rot_manual[i][j] = 0.0;
179  for (int k = 0; k < spo->size(); k++)
180  psiM_rot_manual[i][j] += psiM[i][k] * rot_mat[k][j];
181  }
182 
183  spo->storeParamsBeforeRotation();
184  spo->applyRotation(rot_mat, false);
185  spo->evaluate_notranspose(elec_, 0, elec_.R.size(), psiM, dpsiM, d2psiM);
186  auto check = checkMatrix(psiM_rot_manual, psiM, true);
187  CHECKED_ELSE(check.result) { FAIL(check.result_message); }
188  }
189 }
190 
191 TEST_CASE("Hybridrep SPO from HDF diamond_2x1x1", "[wavefunction]")
192 {
194 
196  // diamondC_2x1x1
197  lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115};
198 
201  auto ions_uptr = std::make_unique<ParticleSet>(ptcl.getSimulationCell());
202  auto elec_uptr = std::make_unique<ParticleSet>(ptcl.getSimulationCell());
203  ParticleSet& ions_(*ions_uptr);
204  ParticleSet& elec_(*elec_uptr);
205 
206  ions_.setName("ion");
207  ptcl.addParticleSet(std::move(ions_uptr));
208  ions_.create({4});
209  ions_.R[0] = {0.0, 0.0, 0.0};
210  ions_.R[1] = {1.68658058, 1.68658058, 1.68658058};
211  ions_.R[2] = {3.37316115, 3.37316115, 0.0};
212  ions_.R[3] = {5.05974173, 5.05974173, 1.68658058};
213  SpeciesSet& ion_species = ions_.getSpeciesSet();
214  int C_Idx = ion_species.addSpecies("C");
215  int C_chargeIdx = ion_species.addAttribute("charge");
216  int cutoffIdx = ion_species.addAttribute("cutoff_radius");
217  int lmaxIdx = ion_species.addAttribute("lmax");
218 
219  ion_species(C_chargeIdx, C_Idx) = 4;
220  ion_species(cutoffIdx, C_Idx) = 0.9;
221  ion_species(lmaxIdx, C_Idx) = 3;
222 
223  elec_.setName("elec");
224  ptcl.addParticleSet(std::move(elec_uptr));
225  elec_.create({3});
226  elec_.R[0] = {0.4, 0.0, 0.0};
227  elec_.R[1] = {0.0, 1.0, 0.0};
228  elec_.R[2] = {0.0, 0.5, 0.5};
229  SpeciesSet& tspecies = elec_.getSpeciesSet();
230  int upIdx = tspecies.addSpecies("u");
231  int chargeIdx = tspecies.addAttribute("charge");
232  tspecies(chargeIdx, upIdx) = -1;
233 
234  //diamondC_2x1x1
235  const char* particles = R"(<tmp>
236 <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" size="4" hybridrep="yes"/>
237 </tmp>
238 )";
239 
241  bool okay = doc.parseFromString(particles);
242  REQUIRE(okay);
243 
244  xmlNodePtr root = doc.getRoot();
245 
246  xmlNodePtr ein1 = xmlFirstElementChild(root);
247 
248  EinsplineSetBuilder einSet(elec_, ptcl.getPool(), c, ein1);
249  auto spo = einSet.createSPOSetFromXML(ein1);
250  REQUIRE(spo);
251 
252  ions_.update();
253  elec_.update();
254 
257  elec_.getDistTable(0).get_first_neighbor(0, r, dr, false);
258  app_log() << std::setprecision(14) << "check r^2 against dr^2. "
259  << "r = " << r << " dr = " << dr << std::endl;
260  app_log() << "abs(r^2 - dr^2) = " << std::abs(r * r - dot(dr, dr))
261  << " epsilon = " << std::numeric_limits<double>::epsilon() << std::endl;
262 #if defined(MIXED_PRECISION)
263  REQUIRE(std::abs(r * r - dot(dr, dr)) < std::numeric_limits<double>::epsilon() * 1e8);
264 #else
265  REQUIRE(std::abs(r * r - dot(dr, dr)) < std::numeric_limits<double>::epsilon());
266 #endif
267 
268  /* for vgl
269  * In DiracDeterminant, these psiM, dpsiM, and d2psiM
270  * are always sized to elec_.R.size() x elec_.R.size()
271  * Using the same sizes for these. This tests the case
272  * that spo->OrbitalSetSize > elec_.R.size()
273  */
274  SPOSet::ValueMatrix psiM(elec_.R.size(), elec_.R.size());
275  SPOSet::GradMatrix dpsiM(elec_.R.size(), elec_.R.size());
276  SPOSet::ValueMatrix d2psiM(elec_.R.size(), elec_.R.size());
277  spo->evaluate_notranspose(elec_, 0, elec_.R.size(), psiM, dpsiM, d2psiM);
278 
279 #if defined(QMC_COMPLEX)
281  // electron 0
282  // value
283  CHECK(psiM[0][0] == ComplexApprox(ValueType{0.6776432991, 0.6776432991}));
284  CHECK(psiM[0][1] == ComplexApprox(ValueType{1.0759553909, 1.0762499571}));
285  // grad
286  CHECK(dpsiM[0][0][0] == ComplexApprox(ValueType{0.8782411218, 0.878241539}));
287  CHECK(dpsiM[0][0][1] == ComplexApprox(ValueType{0.004904394, 0.0049043936}));
288  CHECK(dpsiM[0][0][2] == ComplexApprox(ValueType{-0.0049044029, -0.0049044029}));
289  CHECK(dpsiM[0][1][0] == ComplexApprox(ValueType{1.1041458845, 1.1067043543}));
290  CHECK(dpsiM[0][1][1] == ComplexApprox(ValueType{0.6333346963, 0.6384321451}));
291  CHECK(dpsiM[0][1][2] == ComplexApprox(ValueType{-0.6333346963, -0.6384321451}));
292  // lapl
293  CHECK(d2psiM[0][0] == ComplexApprox(ValueType{4.0779185295, 4.0779790878}).epsilon(1e-4));
294  CHECK(d2psiM[0][1] == ComplexApprox(ValueType{-0.7860302329, -0.7897151113}).epsilon(1e-4));
295 
296  // electron 1
297  // value
298  CHECK(psiM[1][0] == ComplexApprox(ValueType{0.9008999467, 0.9008999467}));
299  CHECK(psiM[1][1] == ComplexApprox(ValueType{1.2383049726, 1.2383049726}));
300  // grad
301  CHECK(dpsiM[1][0][0] == ComplexApprox(ValueType{0.0025820041, 0.0025820041}));
302  CHECK(dpsiM[1][0][1] == ComplexApprox(ValueType{-0.1880052537, -0.1880052537}));
303  CHECK(dpsiM[1][0][2] == ComplexApprox(ValueType{-0.0025404284, -0.0025404284}));
304  CHECK(dpsiM[1][1][0] == ComplexApprox(ValueType{0.1069662273, 0.1069453433}));
305  CHECK(dpsiM[1][1][1] == ComplexApprox(ValueType{-0.4364597797, -0.43649593}));
306  CHECK(dpsiM[1][1][2] == ComplexApprox(ValueType{-0.106951952, -0.1069145575}));
307  // lapl
308  CHECK(d2psiM[1][0] == ComplexApprox(ValueType{-1.3757134676, -1.3757134676}));
309  CHECK(d2psiM[1][1] == ComplexApprox(ValueType{-2.4803137779, -2.4919104576}));
310 
311  // electron 2
312  // value
313  CHECK(psiM[2][0] == ComplexApprox(ValueType{0.8841851282, 0.8841851282}));
314  CHECK(psiM[2][1] == ComplexApprox(ValueType{1.0331713017, 1.0291547321}));
315  // grad
316  CHECK(dpsiM[2][0][0] == ComplexApprox(ValueType{0.0688574613, 0.0688574613}));
317  CHECK(dpsiM[2][0][1] == ComplexApprox(ValueType{0.2735091889, 0.2735091889}));
318  CHECK(dpsiM[2][0][2] == ComplexApprox(ValueType{0.2666900514, 0.2666900514}));
319  CHECK(dpsiM[2][1][0] == ComplexApprox(ValueType{0.5398793935, 0.5376840012}));
320  CHECK(dpsiM[2][1][1] == ComplexApprox(ValueType{0.7525391523, 0.7550587239}));
321  CHECK(dpsiM[2][1][2] == ComplexApprox(ValueType{-0.1224437827, -0.1228616516}));
322  // lapl
323  CHECK(d2psiM[2][0] == ComplexApprox(ValueType{-1.1799273657, -1.2044699918}).epsilon(1e-4));
324  CHECK(d2psiM[2][1] == ComplexApprox(ValueType{-2.0339757673, -1.885562226}).epsilon(1e-4));
325 #endif
326 
327  // test batched interfaces
328  ParticleSet elec_2(elec_);
329  // interchange positions
330  elec_2.R[0] = elec_.R[1];
331  elec_2.R[1] = elec_.R[0];
332  elec_2.update();
333  RefVectorWithLeader<ParticleSet> p_list(elec_);
334  p_list.push_back(elec_);
335  p_list.push_back(elec_2);
336 
337  std::unique_ptr<SPOSet> spo_2(spo->makeClone());
338  RefVectorWithLeader<SPOSet> spo_list(*spo);
339  spo_list.push_back(*spo);
340  spo_list.push_back(*spo_2);
341 
342  ResourceCollection pset_res("test_pset_res");
343  ResourceCollection spo_res("test_spo_res");
344 
345  elec_.createResource(pset_res);
346  spo->createResource(spo_res);
347 
348  ResourceCollectionTeamLock<ParticleSet> mw_pset_lock(pset_res, p_list);
349  ResourceCollectionTeamLock<SPOSet> mw_sposet_lock(spo_res, spo_list);
350 
351  SPOSet::ValueVector psi(spo->getOrbitalSetSize());
352  SPOSet::GradVector dpsi(spo->getOrbitalSetSize());
353  SPOSet::ValueVector d2psi(spo->getOrbitalSetSize());
354  SPOSet::ValueVector psi_2(spo->getOrbitalSetSize());
355  SPOSet::GradVector dpsi_2(spo->getOrbitalSetSize());
356  SPOSet::ValueVector d2psi_2(spo->getOrbitalSetSize());
357 
359  RefVector<SPOSet::GradVector> dpsi_v_list;
360  RefVector<SPOSet::ValueVector> d2psi_v_list;
361 
362  psi_v_list.push_back(psi);
363  psi_v_list.push_back(psi_2);
364  dpsi_v_list.push_back(dpsi);
365  dpsi_v_list.push_back(dpsi_2);
366  d2psi_v_list.push_back(d2psi);
367  d2psi_v_list.push_back(d2psi_2);
368 
369  spo->mw_evaluateVGL(spo_list, p_list, 0, psi_v_list, dpsi_v_list, d2psi_v_list);
370 #if defined(QMC_COMPLEX)
372  // value
373  CHECK(psi_v_list[1].get()[0] == ComplexApprox(ValueType{0.9008999467, 0.9008999467}));
374  CHECK(psi_v_list[1].get()[1] == ComplexApprox(ValueType{1.2383049726, 1.2383049726}));
375  // grad
376  CHECK(dpsi_v_list[1].get()[0][0] == ComplexApprox(ValueType{0.0025820041, 0.0025820041}));
377  CHECK(dpsi_v_list[1].get()[0][1] == ComplexApprox(ValueType{-0.1880052537, -0.1880052537}));
378  CHECK(dpsi_v_list[1].get()[0][2] == ComplexApprox(ValueType{-0.0025404284, -0.0025404284}));
379  CHECK(dpsi_v_list[1].get()[1][0] == ComplexApprox(ValueType{0.1069662273, 0.1069453433}));
380  CHECK(dpsi_v_list[1].get()[1][1] == ComplexApprox(ValueType{-0.4364597797, -0.43649593}));
381  CHECK(dpsi_v_list[1].get()[1][2] == ComplexApprox(ValueType{-0.106951952, -0.1069145575}));
382  // lapl
383  CHECK(d2psi_v_list[1].get()[0] == ComplexApprox(ValueType{-1.3757134676, -1.3757134676}));
384  CHECK(d2psi_v_list[1].get()[1] == ComplexApprox(ValueType{-2.4803137779, -2.4919104576}));
385 #endif
386 }
387 
388 } // namespace qmcplusplus
a class that defines a supercell in D-dimensional Euclean space.
void setName(const std::string &aname)
Definition: ParticleSet.h:237
void setSimulationCell(const SimulationCell &simulation_cell)
set simulation cell
class that handles xmlDoc
Definition: Libxml2Doc.h:76
int addSpecies(const std::string &aname)
When a name species does not exist, add a new species.
Definition: SpeciesSet.cpp:33
QMCTraits::RealType real
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
MakeReturn< UnaryNode< FnFabs, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t abs(const Vector< T1, C1 > &l)
std::ostream & app_log()
Definition: OutputManager.h:65
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...
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
Builder class for einspline-based SPOSet objects.
OrbitalSetTraits< ValueType >::ValueMatrix ValueMatrix
Definition: SPOSet.h:50
CHECKED_ELSE(check_matrix_result.result)
void createResource(ResourceCollection &collection) const
initialize a shared resource and hand it to a collection
Derives EinsplineSetBuilder.
void update(bool skipSK=false)
update the internal data
Communicate * Controller
Global Communicator for a process.
Definition: Communicate.cpp:35
int addAttribute(const std::string &aname)
for a new attribute, allocate the data, !More often used to get the index of a species ...
Definition: SpeciesSet.cpp:45
OrbitalSetTraits< ValueType >::GradMatrix GradMatrix
Definition: SPOSet.h:52
Wrapping information on parallelism.
Definition: Communicate.h:68
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
size_type size() const
return the current size
Definition: OhmmsVector.h:162
QTBase::ValueType ValueType
Definition: Configuration.h:60
REQUIRE(std::filesystem::exists(filename))
Manage a collection of ParticleSet objects.
OrbitalSetTraits< ValueType >::ValueVector ValueVector
Definition: SPOSet.h:49
ParticlePos R
Position.
Definition: ParticleSet.h:79
auto & getDistTable(int table_ID) const
get a distance table by table_ID
Definition: ParticleSet.h:190
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
Definition: ParticleSet.h:231
void create(const std::vector< int > &agroup)
create grouped particles
std::vector< std::reference_wrapper< T > > RefVector
OrbitalSetTraits< ValueType >::GradVector GradVector
Definition: SPOSet.h:51
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204
CheckMatrixResult checkMatrix(M1 &a_mat, M2 &b_mat, const bool check_all=false, std::optional< const double > eps=std::nullopt)
This function checks equality a_mat and b_mat elements M1, M2 need to have their element type declare...
Definition: checkMatrix.hpp:63
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
handles acquire/release resource by the consumer (RefVectorWithLeader type).
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
LatticeGaussianProduct::ValueType ValueType
Declaration of WaveFunctionComponent.
Custom container for set of attributes for a set of species.
Definition: SpeciesSet.h:33
const PoolType & getPool() const
get the Pool object
std::unique_ptr< SPOSet > createSPOSetFromXML(xmlNodePtr cur) override
initialize the Antisymmetric wave function for electrons
const auto & getSimulationCell() const
get simulation cell
Declaration of ParticleSetPool.