QMCPACK
MomentumEstimator.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: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
11 //
12 // File created by: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 #include "MomentumEstimator.h"
17 
18 #include <set>
19 #include <string>
20 
22 #include "CPU/e2iphi.h"
23 #include "CPU/BLAS.hpp"
24 #include "OhmmsData/AttributeSet.h"
25 #include "Utilities/SimpleParser.h"
26 #include "Particle/DistanceTable.h"
28 
29 namespace qmcplusplus
30 {
32  : M(40), refPsi(psi), lattice_(elns.getLattice()), norm_nofK(1), hdf5_out(false)
33 {
34  update_mode_.set(COLLECTABLE, 1);
35  psi_ratios.resize(elns.getTotalNum());
36  twist = elns.getTwist();
37 }
38 
40 
42 {
43  const int np = P.getTotalNum();
44  const int nk = kPoints.size();
45  for (int s = 0; s < M; ++s)
46  {
47  PosType newpos;
48  for (int i = 0; i < OHMMS_DIM; ++i)
49  newpos[i] = (*myRNG)();
50  //make it cartesian
51  vPos[s] = lattice_.toCart(newpos);
54  for (int i = 0; i < np; ++i)
55  psi_ratios_all[s][i] = psi_ratios[i];
56 
57  for (int ik = 0; ik < nk; ++ik)
58  kdotp[ik] = -dot(kPoints[ik], vPos[s]);
59  eval_e2iphi(nk, kdotp.data(), phases_vPos[s].data(0), phases_vPos[s].data(1));
60  }
61 
62  std::fill_n(nofK.begin(), nk, RealType(0));
63  for (int i = 0; i < np; ++i)
64  {
65  for (int ik = 0; ik < nk; ++ik)
66  kdotp[ik] = dot(kPoints[ik], P.R[i]);
67  eval_e2iphi(nk, kdotp.data(), phases.data(0), phases.data(1));
68  for (int s = 0; s < M; ++s)
69  {
70  const ComplexType one_ratio(psi_ratios_all[s][i]);
71  const RealType ratio_c = one_ratio.real();
72  const RealType ratio_s = one_ratio.imag();
73  const RealType* restrict phases_c = phases.data(0);
74  const RealType* restrict phases_s = phases.data(1);
75  const RealType* restrict phases_vPos_c = phases_vPos[s].data(0);
76  const RealType* restrict phases_vPos_s = phases_vPos[s].data(1);
77  RealType* restrict nofK_here = nofK.data();
78 #pragma omp simd aligned(nofK_here, phases_c, phases_s, phases_vPos_c, phases_vPos_s : QMC_SIMD_ALIGNMENT)
79  for (int ik = 0; ik < nk; ++ik)
80  nofK_here[ik] += (phases_c[ik] * phases_vPos_c[ik] - phases_s[ik] * phases_vPos_s[ik]) * ratio_c -
81  (phases_s[ik] * phases_vPos_c[ik] + phases_c[ik] * phases_vPos_s[ik]) * ratio_s;
82  }
83  }
84  if (hdf5_out)
85  {
87  int j = my_index_;
88  for (int ik = 0; ik < nofK.size(); ++ik, ++j)
89  P.Collectables[j] += w * nofK[ik];
90  }
91  else
92  {
93  for (int ik = 0; ik < nofK.size(); ++ik)
94  nofK[ik] *= norm_nofK;
95  }
96 
97  return 0.0;
98 }
99 
100 void MomentumEstimator::registerCollectables(std::vector<ObservableHelper>& h5desc, hdf_archive& file) const
101 {
102  if (hdf5_out)
103  {
104  //descriptor for the data, 1-D data
105  std::vector<int> ng(1);
106  //add nofk
107  ng[0] = nofK.size();
108  h5desc.emplace_back(hdf_path{"nofk"});
109  auto& h5o = h5desc.back();
110  h5o.set_dimensions(ng, my_index_);
111  h5o.addProperty(const_cast<std::vector<PosType>&>(kPoints), "kpoints", file);
112  h5o.addProperty(const_cast<std::vector<int>&>(kWeights), "kweights", file);
113  }
114 }
115 
116 
118 {
119  if (hdf5_out)
120  {
121  my_index_ = collectables.size();
122  collectables.add(nofK.begin(), nofK.end());
123  }
124  else
125  {
126  my_index_ = plist.size();
127  for (int i = 0; i < nofK.size(); i++)
128  {
129  std::stringstream sstr;
130  sstr << "nofk_" << i;
131  int id = plist.add(sstr.str());
132  }
133  }
134 }
135 
136 
138 {
139  if (!hdf5_out)
140  {
141  copy(nofK.begin(), nofK.end(), plist.begin() + my_index_);
142  }
143 }
144 
146 {
147  if (!hdf5_out)
148  {
149  copy(nofK.begin(), nofK.end(), plist.begin() + my_index_ + offset);
150  }
151 }
152 
153 bool MomentumEstimator::putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootNode)
154 {
155  OhmmsAttributeSet pAttrib;
156  std::string hdf5_flag = "yes";
157  ///dims of a grid for generating k points (obtained below)
158  int kgrid = 0;
159  //maximum k-value in the k-grid in cartesian coordinates
160  RealType kmax = 0.0;
161  //maximum k-values in the k-grid along the reciprocal cell axis
162  RealType kmax0 = 0.0;
163  RealType kmax1 = 0.0;
164  RealType kmax2 = 0.0;
165  pAttrib.add(hdf5_flag, "hdf5");
166  //pAttrib.add(kgrid,"grid");
167  pAttrib.add(kmax, "kmax");
168  pAttrib.add(kmax0, "kmax0");
169  pAttrib.add(kmax1, "kmax1");
170  pAttrib.add(kmax2, "kmax2");
171  pAttrib.add(M, "samples"); // default value is 40 (in the constructor)
172  pAttrib.put(cur);
173  hdf5_out = (hdf5_flag == "yes");
174  // minimal length as 2 x WS radius.
175  RealType min_Length = elns.getLattice().WignerSeitzRadius_G * 4.0 * M_PI;
176  PosType vec_length;
177  //length of reciprocal lattice vector
178  for (int i = 0; i < OHMMS_DIM; i++)
179  vec_length[i] = 2.0 * M_PI * std::sqrt(dot(elns.getLattice().Gv[i], elns.getLattice().Gv[i]));
180 #if OHMMS_DIM == 3
181  PosType kmaxs(0);
182  kmaxs[0] = kmax0;
183  kmaxs[1] = kmax1;
184  kmaxs[2] = kmax2;
185  RealType sum_kmaxs = kmaxs[0] + kmaxs[1] + kmaxs[2];
186  RealType sphere_kmax;
187  bool sphere = kmax > 0.0 ? true : false;
188  bool directional = sum_kmaxs > 0.0 ? true : false;
189  if (!sphere && !directional)
190  {
191  // default: kmax = 2 x k_F of polarized non-interacting electron system
192  kmax = 2.0 * std::pow(6.0 * M_PI * M_PI * elns.getTotalNum() / elns.getLattice().Volume, 1.0 / 3);
193  sphere = true;
194  }
195  sphere_kmax = kmax;
196  for (int i = 0; i < OHMMS_DIM; i++)
197  {
198  if (kmaxs[i] > kmax)
199  kmax = kmaxs[i];
200  }
201  kgrid = int(kmax / min_Length) + 1;
202  RealType kgrid_squared[OHMMS_DIM];
203  for (int i = 0; i < OHMMS_DIM; i++)
204  kgrid_squared[i] = kmaxs[i] * kmaxs[i] / vec_length[i] / vec_length[i];
205  RealType kmax_squared = sphere_kmax * sphere_kmax;
206  std::vector<int> kcount0;
207  std::vector<int> kcount1;
208  std::vector<int> kcount2;
209  kcount0.resize(2 * kgrid + 1, 0);
210  kcount1.resize(2 * kgrid + 1, 0);
211  kcount2.resize(2 * kgrid + 1, 0);
212  for (int i = -kgrid; i < (kgrid + 1); i++)
213  {
214  for (int j = -kgrid; j < (kgrid + 1); j++)
215  {
216  for (int k = -kgrid; k < (kgrid + 1); k++)
217  {
218  PosType ikpt, kpt;
219  ikpt[0] = i + twist[0];
220  ikpt[1] = j + twist[1];
221  ikpt[2] = k + twist[2];
222  //convert to Cartesian: note that 2Pi is multiplied
223  kpt = lattice_.k_cart(ikpt);
224  bool not_recorded = true;
225  // This collects the k-points within the parallelepiped (if enabled)
226  if (directional && ikpt[0] * ikpt[0] <= kgrid_squared[0] && ikpt[1] * ikpt[1] <= kgrid_squared[1] &&
227  ikpt[2] * ikpt[2] <= kgrid_squared[2])
228  {
229  kPoints.push_back(kpt);
230  kcount0[kgrid + i] = 1;
231  kcount1[kgrid + j] = 1;
232  kcount2[kgrid + k] = 1;
233  not_recorded = false;
234  }
235  // This collects the k-points within a sphere (if enabled and the k-point has not been recorded yet)
236  if (sphere && not_recorded &&
237  kpt[0] * kpt[0] + kpt[1] * kpt[1] + kpt[2] * kpt[2] <=
238  kmax_squared) //if (std::sqrt(kx*kx+ky*ky+kz*kz)<=sphere_kmax)
239  {
240  kPoints.push_back(kpt);
241  }
242  }
243  }
244  }
245  if (sphere && !directional)
246  {
247  app_log() << " Using all k-space points with (kx^2+ky^2+kz^2)^0.5 < " << sphere_kmax
248  << " for Momentum Distribution." << std::endl;
249  app_log() << " Total number of k-points for Momentum Distribution is " << kPoints.size() << std::endl;
250  }
251  else if (directional && !sphere)
252  {
253  int sums[3];
254  sums[0] = 0;
255  sums[1] = 0;
256  sums[2] = 0;
257  for (int i = 0; i < 2 * kgrid + 1; i++)
258  {
259  sums[0] += kcount0[i];
260  sums[1] += kcount1[i];
261  sums[2] += kcount2[i];
262  }
263  app_log() << " Using all k-space points within cut-offs " << kmax0 << ", " << kmax1 << ", " << kmax2
264  << " for Momentum Distribution." << std::endl;
265  app_log() << " Total number of k-points for Momentum Distribution: " << kPoints.size() << std::endl;
266  app_log() << " Number of grid points in kmax0 direction: " << sums[0] << std::endl;
267  app_log() << " Number of grid points in kmax1 direction: " << sums[1] << std::endl;
268  app_log() << " Number of grid points in kmax2 direction: " << sums[2] << std::endl;
269  }
270  else
271  {
272  int sums[3];
273  sums[0] = 0;
274  sums[1] = 0;
275  sums[2] = 0;
276  for (int i = 0; i < 2 * kgrid + 1; i++)
277  {
278  sums[0] += kcount0[i];
279  sums[1] += kcount1[i];
280  sums[2] += kcount2[i];
281  }
282  app_log() << " Using all k-space points with (kx^2+ky^2+kz^2)^0.5 < " << sphere_kmax << ", and" << std::endl;
283  app_log() << " within the cut-offs " << kmax0 << ", " << kmax1 << ", " << kmax2 << " for Momentum Distribution."
284  << std::endl;
285  app_log() << " Total number of k-points for Momentum Distribution is " << kPoints.size() << std::endl;
286  app_log() << " The number of k-points within the cut-off region: " << sums[0] * sums[1] * sums[2] << std::endl;
287  app_log() << " Number of grid points in kmax0 direction: " << sums[0] << std::endl;
288  app_log() << " Number of grid points in kmax1 direction: " << sums[1] << std::endl;
289  app_log() << " Number of grid points in kmax2 direction: " << sums[2] << std::endl;
290  }
291  app_log() << " Number of samples: " << M << std::endl;
292  app_log() << " My twist is: " << twist[0] << " " << twist[1] << " " << twist[2] << std::endl;
293 #endif
294 #if OHMMS_DIM == 2
295  PosType kmaxs(0);
296  kmaxs[0] = kmax0;
297  kmaxs[1] = kmax1;
298  RealType sum_kmaxs = kmaxs[0] + kmaxs[1];
299  RealType disk_kmax;
300  bool disk = kmax > 0.0 ? true : false;
301  bool directional = sum_kmaxs > 0.0 ? true : false;
302  if (!disk && !directional)
303  {
304  // default: kmax = 2 x k_F of polarized non-interacting electron system
305  kmax = 2.0 * std::pow(4.0 * pi * elns.getTotalNum() / elns.getLattice().Volume, 0.5);
306  disk = true;
307  }
308  disk_kmax = kmax;
309  for (int i = 0; i < OHMMS_DIM; i++)
310  {
311  if (kmaxs[i] > kmax)
312  kmax = kmaxs[i];
313  }
314  kgrid = int(kmax / min_Length) + 1;
315  RealType kgrid_squared[OHMMS_DIM];
316  for (int i = 0; i < OHMMS_DIM; i++)
317  kgrid_squared[i] = kmaxs[i] * kmaxs[i] / vec_length[i] / vec_length[i];
318  RealType kmax_squared = disk_kmax * disk_kmax;
319  std::vector<int> kcount0;
320  std::vector<int> kcount1;
321  kcount0.resize(2 * kgrid + 1, 0);
322  kcount1.resize(2 * kgrid + 1, 0);
323  for (int i = -kgrid; i < (kgrid + 1); i++)
324  {
325  for (int j = -kgrid; j < (kgrid + 1); j++)
326  {
327  PosType ikpt, kpt;
328  ikpt[0] = i - twist[0];
329  ikpt[1] = j - twist[1];
330  //convert to Cartesian: note that 2Pi is multiplied
331  kpt = lattice_.k_cart(ikpt);
332  bool not_recorded = true;
333  if (directional && ikpt[0] * ikpt[0] <= kgrid_squared[0] && ikpt[1] * ikpt[1] <= kgrid_squared[1])
334  {
335  kPoints.push_back(kpt);
336  kcount0[kgrid + i] = 1;
337  kcount1[kgrid + j] = 1;
338  not_recorded = false;
339  }
340  if (disk && not_recorded &&
341  kpt[0] * kpt[0] + kpt[1] * kpt[1] <= kmax_squared) //if (std::sqrt(kx*kx+ky*ky)<=disk_kmax)
342  {
343  kPoints.push_back(kpt);
344  }
345  }
346  }
347  if (disk && !directional)
348  {
349  app_log() << " Using all k-space points with (kx^2+ky^2)^0.5 < " << disk_kmax << " for Momentum Distribution."
350  << std::endl;
351  app_log() << " Total number of k-points for Momentum Distribution is " << kPoints.size() << std::endl;
352  }
353  else if (directional && !disk)
354  {
355  int sums[2];
356  sums[0] = 0;
357  sums[1] = 0;
358  for (int i = 0; i < 2 * kgrid + 1; i++)
359  {
360  sums[0] += kcount0[i];
361  sums[1] += kcount1[i];
362  }
363  app_log() << " Using all k-space points within cut-offs " << kmax0 << ", " << kmax1
364  << " for Momentum Distribution." << std::endl;
365  app_log() << " Total number of k-points for Momentum Distribution: " << kPoints.size() << std::endl;
366  app_log() << " Number of grid points in kmax0 direction: " << sums[0] << std::endl;
367  app_log() << " Number of grid points in kmax1 direction: " << sums[1] << std::endl;
368  }
369  else
370  {
371  int sums[2];
372  sums[0] = 0;
373  sums[1] = 0;
374  for (int i = 0; i < 2 * kgrid + 1; i++)
375  {
376  sums[0] += kcount0[i];
377  sums[1] += kcount1[i];
378  }
379  app_log() << " Using all k-space points with (kx^2+ky^2)^0.5 < " << disk_kmax << ", and" << std::endl;
380  app_log() << " within the cut-offs " << kmax0 << ", " << kmax1 << " for Momentum Distribution." << std::endl;
381  app_log() << " Total number of k-points for Momentum Distribution is " << kPoints.size() << std::endl;
382  app_log() << " The number of k-points within the cut-off region: " << sums[0] * sums[1] << std::endl;
383  app_log() << " Number of grid points in kmax0 direction: " << sums[0] << std::endl;
384  app_log() << " Number of grid points in kmax1 direction: " << sums[1] << std::endl;
385  }
386  app_log() << " Number of samples: " << M << std::endl;
387  app_log() << " My twist is: " << twist[0] << " " << twist[1] << " " << twist[2] << std::endl;
388 #endif
389  if (rootNode)
390  {
391  std::stringstream sstr;
392  sstr << "Kpoints";
393  for (int i(0); i < OHMMS_DIM; i++)
394  sstr << "_" << round(100.0 * twist[i]);
395  sstr << ".dat";
396  std::ofstream fout(sstr.str().c_str());
397  fout.setf(std::ios::scientific, std::ios::floatfield);
398  fout << "# mag_k ";
399  for (int i(0); i < OHMMS_DIM; i++)
400  fout << "k_" << i << " ";
401  fout << std::endl;
402  for (int i = 0; i < kPoints.size(); i++)
403  {
404  float khere(std::sqrt(dot(kPoints[i], kPoints[i])));
405  fout << khere;
406  for (int j(0); j < OHMMS_DIM; j++)
407  fout << " " << kPoints[i][j];
408  fout << std::endl;
409  }
410  fout.close();
411  }
412  nofK.resize(kPoints.size());
413  kdotp.resize(kPoints.size());
414  vPos.resize(M);
415  phases.resize(kPoints.size());
416  phases_vPos.resize(M);
417  for (int im = 0; im < M; im++)
418  phases_vPos[im].resize(kPoints.size());
420  norm_nofK = 1.0 / RealType(M);
421  return true;
422 }
423 
424 bool MomentumEstimator::get(std::ostream& os) const { return true; }
425 
426 std::unique_ptr<OperatorBase> MomentumEstimator::makeClone(ParticleSet& qp, TrialWaveFunction& psi)
427 {
428  std::unique_ptr<MomentumEstimator> myclone = std::make_unique<MomentumEstimator>(qp, psi);
429  myclone->resize(kPoints, M);
430  myclone->my_index_ = my_index_;
431  myclone->norm_nofK = norm_nofK;
432  myclone->hdf5_out = hdf5_out;
433  return myclone;
434 }
435 
436 void MomentumEstimator::resize(const std::vector<PosType>& kin, const int Min)
437 {
438  //copy kpoints
439  kPoints = kin;
440  nofK.resize(kin.size());
441  kdotp.resize(kPoints.size());
442  phases.resize(kPoints.size());
443  //M
444  M = Min;
445  vPos.resize(M);
447  phases_vPos.resize(M);
448  for (int im = 0; im < M; im++)
449  phases_vPos[im].resize(kPoints.size());
450 }
451 
453 {
454  //simply copy it
455  myRNG = rng->makeClone();
456 }
457 } // namespace qmcplusplus
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Definition: OhmmsVector.h:166
std::vector< PosType > vPos
sample positions
bool get(std::ostream &os) const override
write about the class
size_type size() const
return the size of the data
Definition: PooledData.h:48
TrialWaveFunction & refPsi
reference to the trial wavefunction for ratio evaluations
void evaluateRatiosAlltoOne(ParticleSet &P, std::vector< ValueType > &ratios)
void resize(const std::vector< PosType > &kin, const int Min)
Matrix< ValueType > psi_ratios_all
wavefunction ratios all samples
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
bool hdf5_out
print to hdf5 or scalar.dat
QTBase::RealType RealType
Definition: Configuration.h:58
size_t getTotalNum() const
Definition: ParticleSet.h:493
RealType norm_nofK
normalization factor for n(k)
void fill_n(T *x, size_t count, const T &value)
Definition: OMPstd.hpp:21
int my_index_
starting index of this object
Definition: OperatorBase.h:535
std::ostream & app_log()
Definition: OutputManager.h:65
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
bool putSpecial(xmlNodePtr cur, ParticleSet &elns, bool rootNode)
const double pi
Definition: Standard.h:56
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
std::vector< T >::iterator begin()
iterators to use std algorithms
class to handle hdf file
Definition: hdf_archive.h:51
QTBase::ComplexType ComplexType
Definition: Configuration.h:59
MomentumEstimator(ParticleSet &elns, TrialWaveFunction &psi)
Vectorized record engine for scalar properties.
void resize(size_type n, size_type m)
Resize the container.
Definition: OhmmsMatrix.h:99
#define OHMMS_DIM
Definition: config.h:64
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
SingleParticlePos k_cart(const SingleParticlePos &kin) const
conversion of a reciprocal-vector
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
std::unique_ptr< RandomBase< FullPrecRealType > > myRNG
random generator
void add(T &x)
Definition: PooledData.h:88
VectorSoaContainer< RealType, 2 > phases
phases
int add(const std::string &aname)
virtual std::unique_ptr< RandomBase< T > > makeClone() const =0
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
ParticlePos R
Position.
Definition: ParticleSet.h:79
Walker_t * t_walker_
reference to the current walker
Definition: OperatorBase.h:541
void setRandomGenerator(RandomBase< FullPrecRealType > *rng) override
Set the Random Generator object TODO: add docs.
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
Definition: ParticleSet.h:126
Declaration of a TrialWaveFunction.
FullPrecRealType Return_t
type of return value of evaluate
Definition: OperatorBase.h:64
const SingleParticlePos & getTwist() const
Definition: ParticleSet.h:482
Define determinant operators.
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Class to represent a many-body trial wave function.
aligned_vector< RealType > nofK
nofK
void addObservables(PropertySetType &plist)
FullPrecRealType Weight
Weight of the walker.
Definition: Walker.h:102
const auto & getLattice() const
Definition: ParticleSet.h:251
std::vector< int > kWeights
weight of k-points (make use of symmetry)
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
SingleParticlePos toCart(const TinyVector< T1, D > &c) const
Convert a unit vector to a cartesian vector.
const ParticleSet::ParticleLayout & lattice_
lattice vector
std::vector< VectorSoaContainer< RealType, 2 > > phases_vPos
phases of vPos
void resize(size_type n)
resize myData
void setParticlePropertyList(PropertySetType &plist, int offset) override
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
Definition: AttributeSet.h:42
std::vector< ValueType > psi_ratios
wavefunction ratios
Vector< RealType > kdotp
nofK internal
void eval_e2iphi(int n, const T *restrict phi, T *restrict phase_r, T *restrict phase_i)
Definition: e2iphi.h:61
std::bitset< 8 > update_mode_
set the current update mode
Definition: OperatorBase.h:521
void makeVirtualMoves(const SingleParticlePos &newpos)
Handles virtual moves for all the particles to a single newpos.
std::vector< PosType > kPoints
list of k-points in Cartesian Coordinates