QMCPACK
Backflow_eI.h
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: Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
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: Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 #ifndef QMCPLUSPLUS_BACKFLOW_ELEC_ION_H
17 #define QMCPLUSPLUS_BACKFLOW_ELEC_ION_H
20 #include <cmath>
21 #include <vector>
22 
23 namespace qmcplusplus
24 {
25 template<class FT>
27 {
28 private:
29  /// distance table index
30  const int myTableIndex_;
31 
32 public:
33  std::vector<FT*> RadFun;
34  std::vector<std::unique_ptr<FT>> uniqueRadFun;
35  std::vector<int> offsetPrms;
36 
37  Backflow_eI(ParticleSet& ions, ParticleSet& els) : BackflowFunctionBase(ions, els), myTableIndex_(els.addTable(ions))
38  {
40  }
41 
42  // build RadFun manually from builder class
43  Backflow_eI(ParticleSet& ions, ParticleSet& els, FT* RF)
44  : BackflowFunctionBase(ions, els), myTableIndex_(els.addTable(ions))
45  {
46  // same radial function for all centers by default
47  uniqueRadFun.push_back(RF);
48  for (int i = 0; i < NumCenters; i++)
49  RadFun.push_back(RF);
50  }
51 
52  std::unique_ptr<BackflowFunctionBase> makeClone(ParticleSet& tqp) const override
53  {
54  auto clone = std::make_unique<Backflow_eI<FT>>(CenterSys, tqp);
55  clone->resize(NumTargets, NumCenters);
56  clone->indexOfFirstParam = indexOfFirstParam;
57  clone->offsetPrms = offsetPrms;
58  clone->numParams = numParams;
59  clone->derivs = derivs;
60  clone->uniqueRadFun.resize(uniqueRadFun.size());
61  clone->RadFun.resize(RadFun.size());
62  for (int i = 0; i < uniqueRadFun.size(); i++)
63  clone->uniqueRadFun[i] = std::make_unique<FT>(*(uniqueRadFun[i]));
64  for (int i = 0; i < RadFun.size(); i++)
65  {
66  bool done = false;
67  for (int k = 0; k < uniqueRadFun.size(); k++)
68  if (RadFun[i] == uniqueRadFun[k].get())
69  {
70  done = true;
71  clone->RadFun[i] = clone->uniqueRadFun[k].get();
72  break;
73  }
74  if (!done)
75  {
76  APP_ABORT("Error cloning Backflow_eI object. \n");
77  }
78  }
79  return clone;
80  }
81 
82  void reportStatus(std::ostream& os) override
83  {
84  std::cerr << RadFun.size() << std::endl;
85  std::cerr << isOptimizable() << std::endl;
86  std::cerr << myTableIndex_ << std::endl;
87  for (int i = 0; i < offsetPrms.size(); i++)
88  std::cerr << offsetPrms[i] << std::endl;
89  for (int i = 0; i < uniqueRadFun.size(); i++)
90  uniqueRadFun[i]->reportStatus(os);
91  }
92 
93  void resetParameters(const opt_variables_type& active) override
94  {
95  for (int i = 0; i < uniqueRadFun.size(); i++)
96  uniqueRadFun[i]->resetParametersExclusive(active);
97  }
98 
99  void checkInVariables(opt_variables_type& active) override
100  {
101  for (int i = 0; i < uniqueRadFun.size(); i++)
102  uniqueRadFun[i]->checkInVariablesExclusive(active);
103  }
104 
105  void checkOutVariables(const opt_variables_type& active) override
106  {
107  for (int i = 0; i < uniqueRadFun.size(); i++)
108  uniqueRadFun[i]->checkOutVariables(active);
109  }
110 
111  inline bool isOptimizable() override
112  {
113  for (int i = 0; i < uniqueRadFun.size(); i++)
114  if (uniqueRadFun[i]->isOptimizable())
115  return true;
116  return false;
117  }
118 
119  inline int indexOffset() override { return RadFun[0]->myVars.where(0); }
120 
121  // only elements of qp coordinates that changed should be copied
122  inline void acceptMove(int iat, int UpdateMode) override
123  {
124  int num;
125  switch (UpdateMode)
126  {
127  case ORB_PBYP_RATIO:
128  num = UIJ.cols();
129  for (int i = 0; i < num; i++)
130  UIJ(iat, i) = UIJ_temp[i];
131  break;
132  case ORB_PBYP_PARTIAL:
133  num = UIJ.cols();
134  for (int i = 0; i < num; i++)
135  UIJ(iat, i) = UIJ_temp[i];
136  num = AIJ.cols();
137  for (int i = 0; i < num; i++)
138  AIJ(iat, i) = AIJ_temp[i];
139  break;
140  case ORB_PBYP_ALL:
141  num = UIJ.cols();
142  for (int i = 0; i < num; i++)
143  UIJ(iat, i) = UIJ_temp[i];
144  num = AIJ.cols();
145  for (int i = 0; i < num; i++)
146  AIJ(iat, i) = AIJ_temp[i];
147  num = BIJ.cols();
148  for (int i = 0; i < num; i++)
149  BIJ(iat, i) = BIJ_temp[i];
150  break;
151  default:
152  num = UIJ.cols();
153  for (int i = 0; i < num; i++)
154  UIJ(iat, i) = UIJ_temp[i];
155  num = AIJ.cols();
156  for (int i = 0; i < num; i++)
157  AIJ(iat, i) = AIJ_temp[i];
158  num = BIJ.cols();
159  for (int i = 0; i < num; i++)
160  BIJ(iat, i) = BIJ_temp[i];
161  break;
162  }
163  UIJ_temp = 0.0;
164  AIJ_temp = 0.0;
165  BIJ_temp = 0.0;
166  }
167 
168  inline void restore(int iat, int UpdateType) override
169  {
170  UIJ_temp = 0.0;
171  AIJ_temp = 0.0;
172  BIJ_temp = 0.0;
173  }
174 
175  void registerData(WFBufferType& buf) override
176  {
177  FirstOfU = &(UIJ(0, 0)[0]);
179  FirstOfA = &(AIJ(0, 0)[0]);
181  FirstOfB = &(BIJ(0, 0)[0]);
183  buf.add(FirstOfU, LastOfU);
184  buf.add(FirstOfA, LastOfA);
185  buf.add(FirstOfB, LastOfB);
186  }
187 
188  /** calculate quasi-particle coordinates only
189  */
190  inline void evaluate(const ParticleSet& P, ParticleSet& QP) override
191  {
192  APP_ABORT("Backflow_eI.h::evaluate(P,QP) not implemented for SoA\n");
193  //RealType du, d2u;
194  //const auto& myTable = P.getDistTableAB(myTableIndex_);
195  //for (int i = 0; i < myTable.sources(); i++)
196  //{
197  // for (int nn = myTable.M[i]; nn < myTable.M[i + 1]; nn++)
198  // {
199  // int j = myTable.J[nn];
200  // RealType uij = RadFun[i]->evaluate(myTable.r(nn), du, d2u);
201  // QP.R[j] += (UIJ(j, i) = uij * myTable.dr(nn)); // dr(ij) = r_j-r_i
202  // }
203  //}
204  }
205 
206 
207  inline void evaluate(const ParticleSet& P, ParticleSet& QP, GradVector& Bmat, HessMatrix& Amat)
208  {
209  APP_ABORT("Backflow_eI.h::evaluate(P,QP,Bmat_vec,Amat) not implemented for SoA\n");
210  //RealType du, d2u;
211  //const auto& myTable = P.getDistTableAB(myTableIndex_);
212  //for (int i = 0; i < myTable.sources(); i++)
213  //{
214  // for (int nn = myTable.M[i]; nn < myTable.M[i + 1]; nn++)
215  // {
216  // int j = myTable.J[nn];
217  // RealType uij = RadFun[i]->evaluate(myTable.r(nn), du, d2u);
218  // //PosType u = uij*myTable.dr(nn);
219  // du *= myTable.rinv(nn);
220  // QP.R[j] += (UIJ(j, i) = uij * myTable.dr(nn));
221  // HessType& hess = AIJ(j, i);
222  // hess = du * outerProduct(myTable.dr(nn), myTable.dr(nn));
223  // hess[0] += uij;
224  // hess[4] += uij;
225  // hess[8] += uij;
226  // Amat(j, j) += hess;
227  // //u = (d2u+4.0*du)*myTable.dr(nn);
228  // Bmat[j] += (BIJ(j, i) = (d2u + 4.0 * du) * myTable.dr(nn));
229  // }
230  //}
231  }
232 
233 
234  /** calculate quasi-particle coordinates, Bmat and Amat
235  */
236  inline void evaluate(const ParticleSet& P, ParticleSet& QP, GradMatrix& Bmat_full, HessMatrix& Amat) override
237  {
238  RealType du, d2u;
239  const auto& myTable = P.getDistTableAB(myTableIndex_);
240  for (int jel = 0; jel < P.getTotalNum(); jel++)
241  {
242  const auto& dist = myTable.getDistRow(jel);
243  const auto& displ = myTable.getDisplRow(jel);
244  for (int iat = 0; iat < NumCenters; iat++)
245  {
246  if (dist[iat] > 0)
247  {
248  RealType uij = RadFun[iat]->evaluate(dist[iat], du, d2u);
249  du /= dist[iat];
250  QP.R[jel] += (UIJ(jel, iat) = -uij * displ[iat]);
251  HessType& hess = AIJ(jel, iat);
252  hess = du * outerProduct(displ[iat], displ[iat]);
253  hess[0] += uij;
254  hess[4] += uij;
255  hess[8] += uij;
256  Amat(jel, jel) += hess;
257  // this will create problems with QMC_COMPLEX, because Bmat is ValueType and dr is RealType
258  //u = (d2u+4.0*du)*myTable.dr(nn);
259  Bmat_full(jel, jel) += (BIJ(jel, iat) = -(d2u + 4.0 * du) * displ[iat]);
260  }
261  }
262  }
263  }
264 
265  /** calculate quasi-particle coordinates after pbyp move
266  */
267  inline void evaluatePbyP(const ParticleSet& P,
269  const std::vector<int>& index) override
270  {
271  APP_ABORT("Backflow_eI.h::evaluatePbyP(P,QP,index_vec) not implemented for SoA\n");
272  //RealType du, d2u;
273  //const auto& myTable = P.getDistTableAB(myTableIndex_);
274  //int maxI = myTable.sources();
275  //int iat = index[0];
276  //for (int j = 0; j < maxI; j++)
277  //{
278  // RealType uij = RadFun[j]->evaluate(myTable.Temp[j].r1, du, d2u);
279  // PosType u = (UIJ_temp[j] = uij * myTable.Temp[j].dr1) - UIJ(iat, j);
280  // newQP[iat] += u;
281  //}
282  }
283 
284 
285  /** calculate quasi-particle coordinates after pbyp move
286  */
287  inline void evaluatePbyP(const ParticleSet& P, int iat, ParticleSet::ParticlePos& newQP) override
288  {
289  RealType du, d2u;
290  const auto& myTable = P.getDistTableAB(myTableIndex_);
291  int maxI = myTable.sources();
292  for (int j = 0; j < maxI; j++)
293  {
294  RealType uij = RadFun[j]->evaluate(myTable.getTempDists()[j], du, d2u);
295  PosType u = (UIJ_temp[j] = -uij * myTable.getTempDispls()[j]) - UIJ(iat, j);
296  newQP[iat] += u;
297  }
298  }
299 
300  inline void evaluatePbyP(const ParticleSet& P,
302  const std::vector<int>& index,
303  HessMatrix& Amat) override
304  {
305  APP_ABORT("Backflow_eI.h::evaluatePbyP(P,QP,index_vec,Amat) not implemented for SoA\n");
306  //RealType du, d2u;
307  //const auto& myTable = P.getDistTableAB(myTableIndex_);
308  //int maxI = myTable.sources();
309  //int iat = index[0];
310  //for (int j = 0; j < maxI; j++)
311  //{
312  // RealType uij = RadFun[j]->evaluate(myTable.Temp[j].r1, du, d2u);
313  // PosType u = (UIJ_temp[j] = uij * myTable.Temp[j].dr1) - UIJ(iat, j);
314  // newQP[iat] += u;
315  // HessType& hess = AIJ_temp[j];
316  // hess = (du * myTable.Temp[j].rinv1) * outerProduct(myTable.Temp[j].dr1, myTable.Temp[j].dr1);
317  // hess[0] += uij;
318  // hess[4] += uij;
319  // hess[8] += uij;
320  // // should I expand this??? Is the compiler smart enough???
321  // Amat(iat, iat) += (hess - AIJ(iat, j));
322  //}
323  }
324 
325  inline void evaluatePbyP(const ParticleSet& P, int iat, ParticleSet::ParticlePos& newQP, HessMatrix& Amat) override
326  {
327  RealType du, d2u;
328  const auto& myTable = P.getDistTableAB(myTableIndex_);
329  int maxI = myTable.sources();
330  for (int j = 0; j < maxI; j++)
331  {
332  if (myTable.getTempDists()[j] > 0)
333  {
334  RealType uij = RadFun[j]->evaluate(myTable.getTempDists()[j], du, d2u);
335  PosType u = (UIJ_temp[j] = -uij * myTable.getTempDispls()[j]) - UIJ(iat, j);
336  newQP[iat] += u;
337  HessType& hess = AIJ_temp[j];
338  hess = (du / myTable.getTempDists()[j]) * outerProduct(myTable.getTempDispls()[j], myTable.getTempDispls()[j]);
339  hess[0] += uij;
340  hess[4] += uij;
341  hess[8] += uij;
342  // should I expand this??? Is the compiler smart enough???
343  Amat(iat, iat) += (hess - AIJ(iat, j));
344  }
345  }
346  }
347 
348  inline void evaluatePbyP(const ParticleSet& P,
350  const std::vector<int>& index,
351  GradMatrix& Bmat_full,
352  HessMatrix& Amat) override
353  {
354  APP_ABORT("Backflow_eI.h::evaluatePbyP(P,QP,index_vec,Bmat,Amat) not implemented for SoA\n");
355  //RealType du, d2u;
356  //const auto& myTable = P.getDistTableAB(myTableIndex_);
357  //int maxI = myTable.sources();
358  //int iat = index[0];
359  //for (int j = 0; j < maxI; j++)
360  //{
361  // RealType uij = RadFun[j]->evaluate(myTable.Temp[j].r1, du, d2u);
362  // PosType u = (UIJ_temp[j] = uij * myTable.Temp[j].dr1) - UIJ(iat, j);
363  // newQP[iat] += u;
364  // du *= myTable.Temp[j].rinv1;
365  // HessType& hess = AIJ_temp[j];
366  // hess = du * outerProduct(myTable.Temp[j].dr1, myTable.Temp[j].dr1);
367  // hess[0] += uij;
368  // hess[4] += uij;
369  // hess[8] += uij;
370  // Amat(iat, iat) += (hess - AIJ(iat, j));
371  // BIJ_temp[j] = (d2u + 4.0 * du) * myTable.Temp[j].dr1;
372  // Bmat_full(iat, iat) += (BIJ_temp[j] - BIJ(iat, j));
373  //}
374  }
375 
376  inline void evaluatePbyP(const ParticleSet& P,
377  int iat,
379  GradMatrix& Bmat_full,
380  HessMatrix& Amat) override
381  {
382  APP_ABORT("Backflow_eI.h::evaluatePbyP(P,iat,QP,Bmat,Amat) not implemented for SoA\n");
383  //RealType du, d2u;
384  //const auto& myTable = P.getDistTableAB(myTableIndex_);
385  //int maxI = myTable.sources();
386  //for (int j = 0; j < maxI; j++)
387  //{
388  // RealType uij = RadFun[j]->evaluate(myTable.Temp[j].r1, du, d2u);
389  // PosType u = (UIJ_temp[j] = uij * myTable.Temp[j].dr1) - UIJ(iat, j);
390  // newQP[iat] += u;
391  // du *= myTable.Temp[j].rinv1;
392  // HessType& hess = AIJ_temp[j];
393  // hess = du * outerProduct(myTable.Temp[j].dr1, myTable.Temp[j].dr1);
394  // hess[0] += uij;
395  // hess[4] += uij;
396  // hess[8] += uij;
397  // Amat(iat, iat) += (hess - AIJ(iat, j));
398  // BIJ_temp[j] = (d2u + 4.0 * du) * myTable.Temp[j].dr1;
399  // Bmat_full(iat, iat) += (BIJ_temp[j] - BIJ(iat, j));
400  //}
401  }
402 
403  /** calculate only Bmat
404  * This is used in pbyp moves, in updateBuffer()
405  */
406  inline void evaluateBmatOnly(const ParticleSet& P, GradMatrix& Bmat_full) override
407  {
408  APP_ABORT("Backflow_eI.h::evaluateBmatOnly(P,QP,Bmat) not implemented for SoA\n");
409  //RealType du, d2u;
410  //const auto& myTable = P.getDistTableAB(myTableIndex_);
411  //for (int i = 0; i < myTable.sources(); i++)
412  //{
413  // for (int nn = myTable.M[i]; nn < myTable.M[i + 1]; nn++)
414  // {
415  // int j = myTable.J[nn];
416  // RealType uij = RadFun[i]->evaluate(myTable.r(nn), du, d2u);
417  // Bmat_full(j, j) += (BIJ(j, i) = (d2u + 4.0 * du * myTable.rinv(nn)) * myTable.dr(nn));
418  // }
419  //}
420  }
421 
422  /** calculate quasi-particle coordinates, Bmat and Amat
423  * calculate derivatives wrt to variational parameters
424  */
425  inline void evaluateWithDerivatives(const ParticleSet& P,
426  ParticleSet& QP,
427  GradMatrix& Bmat_full,
428  HessMatrix& Amat,
429  GradMatrix& Cmat,
430  GradMatrix& Ymat,
431  HessArray& Xmat) override
432  {
433  RealType du, d2u;
434  const auto& myTable = P.getDistTableAB(myTableIndex_);
435  for (int jel = 0; jel < P.getTotalNum(); jel++)
436  {
437  const auto& dist = myTable.getDistRow(jel);
438  const auto& displ = myTable.getDisplRow(jel);
439  for (int iat = 0; iat < NumCenters; iat++)
440  {
441  if (dist[iat] > 0)
442  {
443  RealType uij = RadFun[iat]->evaluate(dist[iat], du, d2u);
444  int NPrms = RadFun[iat]->NumParams;
445  std::vector<TinyVector<RealType, 3>> derivsju(NPrms);
446  RadFun[iat]->evaluateDerivatives(dist[iat], derivsju);
447  du /= dist[iat];
448  QP.R[jel] += (UIJ(jel, iat) = -uij * displ[iat]);
449  HessType op = outerProduct(displ[iat], displ[iat]);
450  HessType& hess = AIJ(jel, iat);
451  hess = du * op;
452  hess[0] += uij;
453  hess[4] += uij;
454  hess[8] += uij;
455  Amat(jel, jel) += hess;
456  Bmat_full(jel, jel) += (BIJ(jel, iat) = -(d2u + 4.0 * du) * displ[iat]);
457  for (int prm = 0, la = indexOfFirstParam + offsetPrms[iat]; prm < NPrms; prm++, la++)
458  {
459  Cmat(la, jel) -= displ[iat] * derivsju[prm][0];
460  Xmat(la, jel, jel) += (derivsju[prm][1] / dist[iat]) * op;
461  Xmat(la, jel, jel)[0] += derivsju[prm][0];
462  Xmat(la, jel, jel)[4] += derivsju[prm][0];
463  Xmat(la, jel, jel)[8] += derivsju[prm][0];
464  Ymat(la, jel) -= (derivsju[prm][2] + 4.0 * derivsju[prm][1] / dist[iat]) * displ[iat];
465  }
466  }
467  }
468  }
469  }
470 };
471 } // namespace qmcplusplus
472 
473 #endif
int NumTargets
number of quantum particles
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index) override
calculate quasi-particle coordinates after pbyp move
Definition: Backflow_eI.h:267
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
Backflow_eI(ParticleSet &ions, ParticleSet &els, FT *RF)
Definition: Backflow_eI.h:43
const DistRow & getDistRow(int iel) const
return a row of distances for a given target particle
size_t getTotalNum() const
Definition: ParticleSet.h:493
std::vector< int > offsetPrms
Definition: Backflow_eI.h:35
void resetParameters(const opt_variables_type &active) override
Definition: Backflow_eI.h:93
std::unique_ptr< BackflowFunctionBase > makeClone(ParticleSet &tqp) const override
Definition: Backflow_eI.h:52
Base class for backflow transformations.
void evaluateBmatOnly(const ParticleSet &P, GradMatrix &Bmat_full) override
calculate only Bmat This is used in pbyp moves, in updateBuffer()
Definition: Backflow_eI.h:406
bool isOptimizable() override
Definition: Backflow_eI.h:111
void evaluate(const ParticleSet &P, ParticleSet &QP) override
calculate quasi-particle coordinates only
Definition: Backflow_eI.h:190
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, HessMatrix &Amat) override
calculate quasi-particle coordinates and Amat after pbyp move
Definition: Backflow_eI.h:325
Attaches a unit to a Vector for IO.
int indexOffset() override
Definition: Backflow_eI.h:119
void evaluate(const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat
Definition: Backflow_eI.h:236
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat after pbyp move
Definition: Backflow_eI.h:376
int NumCenters
number of centers, e.g., ions
void acceptMove(int iat, int UpdateMode) override
Definition: Backflow_eI.h:122
#define OHMMS_DIM
Definition: config.h:64
size_type cols() const
Definition: OhmmsMatrix.h:78
const DistanceTableAB & getDistTableAB(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAB
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void checkOutVariables(const opt_variables_type &active) override
Definition: Backflow_eI.h:105
void registerData(WFBufferType &buf) override
Definition: Backflow_eI.h:175
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > outerProduct(const TinyVector< T1, D > &lhs, const TinyVector< T2, D > &rhs)
Definition: TinyVector.h:211
class to handle a set of variables that can be modified during optimizations
Definition: VariableSet.h:49
ParticlePos R
Position.
Definition: ParticleSet.h:79
void reportStatus(std::ostream &os) override
Definition: Backflow_eI.h:82
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
Definition: AppAbort.h:27
std::vector< FT * > RadFun
Definition: Backflow_eI.h:33
Backflow_eI(ParticleSet &ions, ParticleSet &els)
Definition: Backflow_eI.h:37
ParticleSet & CenterSys
Reference to the center.
size_t sources() const
returns the number of source particles
Definition: DistanceTable.h:97
constexpr double done
Definition: BLAS.hpp:48
void checkInVariables(opt_variables_type &active) override
Definition: Backflow_eI.h:99
const int myTableIndex_
distance table index
Definition: Backflow_eI.h:30
void evaluatePbyP(const ParticleSet &P, int iat, ParticleSet::ParticlePos &newQP) override
calculate quasi-particle coordinates after pbyp move
Definition: Backflow_eI.h:287
void restore(int iat, int UpdateType) override
Definition: Backflow_eI.h:168
void evaluateWithDerivatives(const ParticleSet &P, ParticleSet &QP, GradMatrix &Bmat_full, HessMatrix &Amat, GradMatrix &Cmat, GradMatrix &Ymat, HessArray &Xmat) override
calculate quasi-particle coordinates, Bmat and Amat calculate derivatives wrt to variational paramete...
Definition: Backflow_eI.h:425
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, GradMatrix &Bmat_full, HessMatrix &Amat) override
calculate quasi-particle coordinates, Bmat and Amat after pbyp move
Definition: Backflow_eI.h:348
std::vector< TinyVector< RealType, 3 > > derivs
void evaluate(const ParticleSet &P, ParticleSet &QP, GradVector &Bmat, HessMatrix &Amat)
Definition: Backflow_eI.h:207
std::vector< std::unique_ptr< FT > > uniqueRadFun
Definition: Backflow_eI.h:34
void add(std::complex< T1 > &x)
Definition: PooledMemory.h:113
void evaluatePbyP(const ParticleSet &P, ParticleSet::ParticlePos &newQP, const std::vector< int > &index, HessMatrix &Amat) override
calculate quasi-particle coordinates and Amat after pbyp move
Definition: Backflow_eI.h:300