QMCPACK
ECPComponentBuilder.2.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 // Modifications Copyright (C) 2021 Advanced Micro Devices, Inc. All rights reserved.
7 //
8 // File developed by: Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
10 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
11 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
12 // Jakub Kurzak, jakurzak@amd.com, Advanced Micro Devices, Inc.
13 //
14 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
15 //////////////////////////////////////////////////////////////////////////////////////
16 
17 
21 #include "OhmmsData/AttributeSet.h"
22 #include "Utilities/SimpleParser.h"
23 
24 namespace qmcplusplus
25 {
26 //this is abinit/siesta format
27 void ECPComponentBuilder::buildSemiLocalAndLocal(std::vector<xmlNodePtr>& semiPtr)
28 {
29  app_log() << " ECPComponentBuilder::buildSemiLocalAndLocal " << std::endl;
30  if (grid_global == 0)
31  myComm->barrier_and_abort("ECPComponentBuilder::buildSemiLocalAndLocal. Global grid needs to be defined.\n");
32  // There should only be one semilocal tag
33  if (semiPtr.size() > 1)
34  {
35  std::stringstream err_msg;
36  err_msg << "ECPComponentBuilder::buildSemiLocalAndLocal. "
37  << "We have more than one semilocal sections in the PP xml file";
38  myComm->barrier_and_abort(err_msg.str());
39  }
40  RealType rmax = -1;
41  //attributes: initailize by defaults
42  std::string eunits("hartree");
43  std::string format("r*V");
44  std::string lloc;
45  int ndown = 1;
46  int nup = 0;
47  int nso = 0;
48  OhmmsAttributeSet aAttrib;
49  int quad_rule = -1;
50  int local_channel = -1;
51  aAttrib.add(eunits, "units");
52  aAttrib.add(format, "format");
53  aAttrib.add(ndown, "npots-down");
54  aAttrib.add(nup, "npots-up");
55  aAttrib.add(local_channel, "l-local");
56  aAttrib.add(quad_rule, "nrule");
57  aAttrib.add(Srule, "srule");
58  aAttrib.add(nso, "npots-so");
59 
60  xmlNodePtr cur_semilocal = semiPtr[0];
61  aAttrib.put(cur_semilocal);
62 
63  // settle Nrule. Priority: current value (from input file) > PP XML file > lmax derived
64  if (quad_rule > -1 && Nrule > -1)
65  {
66  app_warning() << " Nrule setting found in both qmcpack input (Nrule = " << Nrule
67  << ") and pseudopotential file (Nrule = " << quad_rule << ")."
68  << " Using nrule setting in qmcpack input file." << std::endl;
69  }
70  else if (quad_rule > -1 && Nrule == -1)
71  {
72  app_log() << " Nrule setting found in pseudopotential file and used." << std::endl;
73  Nrule = quad_rule;
74  }
75  else if (quad_rule == -1 && Nrule > -1)
76  app_log() << " Nrule setting found in qmcpack input file and used." << std::endl;
77  else
78  {
79  //Sperical quadrature rules set by exact integration up to lmax of
80  //nonlocal channels.
81  //From J. Chem. Phys. 95 (3467) (1991)
82  //Keeping Nrule = 4 as default for lmax <= 5.
83  switch (pp_nonloc->lmax)
84  {
85  case 0:
86  case 1:
87  case 2:
88  case 3:
89  case 4:
90  case 5:
91  Nrule = 4;
92  break;
93  case 6:
94  case 7:
95  Nrule = 6;
96  break;
97  case 8:
98  case 9:
99  case 10:
100  case 11:
101  Nrule = 7;
102  break;
103  default:
104  myComm->barrier_and_abort("Default value for pseudopotential nrule not determined.");
105  break;
106  }
107  app_warning() << "Nrule was not determined from qmcpack input or pseudopotential file. Setting sensible default."
108  << std::endl;
109  }
110 
111 
112  RealType Vprefactor = 1.0;
113  if (eunits.find("ydberg") < eunits.size())
114  {
115  app_log() << " Input energy unit = Rydberg " << std::endl;
116  Vprefactor = 0.5;
117  }
118  else
119  {
120  app_log() << " Assuming Hartree unit" << std::endl;
121  }
122  bool is_r_times_V(true);
123  if (format == "r*V")
124  is_r_times_V = true;
125  else if (format == "V")
126  is_r_times_V = false;
127  else
128  {
129  std::stringstream err_msg;
130  err_msg << "ECPComponentBuilder::buildSemiLocalAndLocal."
131  << "Unrecognized format \"" << format << "\" in PP file.\n";
132  myComm->barrier_and_abort(err_msg.str());
133  }
134  // We cannot construct the potentials as we construct them since
135  // we may not know which one is local yet.
136 
137  std::vector<int> angList;
138  std::vector<int> angListSO; //For spin-orbit, if it exists
139  std::vector<xmlNodePtr> vpsPtr;
140  std::vector<xmlNodePtr> vpsoPtr; //For spin-orbit, if it exists.
141  Lmax = -1;
142  LmaxSO = -1;
143  // Now read vps sections
144  xmlNodePtr cur_vps = cur_semilocal->children;
145  while (cur_vps != NULL)
146  {
147  std::string vname((const char*)cur_vps->name);
148  if (vname == "vps")
149  {
150  OhmmsAttributeSet aAttrib;
151  std::string lstr("s");
152  RealType rc = -1.0;
153  aAttrib.add(lstr, "l");
154  aAttrib.add(rc, "cutoff");
155  aAttrib.put(cur_vps);
156  rmax = std::max(rmax, rc);
157  if (angMon.find(lstr) == angMon.end())
158  {
159  std::stringstream err_msg;
160  err_msg << "ECPComponentBuilder::buildSemiLocalAndLocal. "
161  << "Requested angular momentum " << lstr << " not available.\n";
162  myComm->barrier_and_abort(err_msg.str());
163  }
164  int l = angMon[lstr];
165  angList.push_back(l);
166  vpsPtr.push_back(cur_vps);
167  Lmax = std::max(Lmax, l); //count the maximum L
168  }
169  else if (vname == "vps_so") //This accumulates the spin-orbit corrections, if defined.
170  {
171  OhmmsAttributeSet aAttrib;
172  std::string lstr("s");
173  RealType rc = -1.0;
174  aAttrib.add(lstr, "l");
175  aAttrib.add(rc, "cutoff");
176  aAttrib.put(cur_vps);
177  rmax = std::max(rmax, rc);
178  if (angMon.find(lstr) == angMon.end())
179  {
180  std::stringstream err_msg;
181  err_msg << "ECPComponentBuilder::buildSemiLocalAndLocal. "
182  << "Requested angular momentum " << lstr << " not available for SO.\n";
183  myComm->barrier_and_abort(err_msg.str());
184  }
185  int l = angMon[lstr];
186  angListSO.push_back(l);
187  vpsoPtr.push_back(cur_vps);
188  LmaxSO = std::max(LmaxSO, l); //count the maximum L
189  }
190  cur_vps = cur_vps->next;
191  }
192 
193  if (rmax < 0)
194  rmax = 1.8;
195 
196  // settle Llocal. Priority: current value (from input file) > PP XML file
197  if (local_channel > -1 && Llocal > -1)
198  {
199  app_warning() << " l-local setting found in both qmcpack input (l-local = " << Llocal
200  << ") and pseudopotential file (l-local = " << local_channel << ")."
201  << " Using l-local setting in qmcpack input file." << std::endl;
202  }
203  else if (local_channel > -1 && Llocal == -1)
204  {
205  app_log() << " l-local setting found in pseudopotential file and used." << std::endl;
206  Llocal = local_channel;
207  }
208  else if (local_channel == -1 && Llocal > -1)
209  app_log() << " l-local setting found in qmcpack input file and used." << std::endl;
210  else if (angList.size() == 1)
211  {
212  Llocal = Lmax;
213  app_log() << " Only one vps is found. Set the local component=" << Lmax << std::endl;
214  }
215  else
216  {
217  app_error() << "The local channel is specified in neither the pseudopotential file nor the input file.\n"
218  << "Please add \'l-local=\"n\"\' attribute to either file.\n";
219  myComm->barrier_and_abort("ECPComponentBuilder::doBreakUp");
220  }
221 
222  if (angListSO.size() != nso)
223  {
224  std::stringstream ssout;
225  ssout << "Error. npots-so=" << angListSO.size() << " while declared number of SO channels is " << nso << std::endl;
226  std::string outstring("");
227  outstring = ssout.str();
228 
229  myComm->barrier_and_abort(outstring.c_str());
230  }
231  int npts = grid_global->size();
232  Matrix<mRealType> vnn(angList.size(), npts);
233  for (int l = 0; l < angList.size(); l++)
234  {
235  std::vector<mRealType> vt(npts);
236  xmlNodePtr c = vpsPtr[l]->children;
237  while (c != NULL)
238  {
239  if (xmlStrEqual(c->name, (const xmlChar*)"radfunc"))
240  {
241  xmlNodePtr c1 = c->children;
242  while (c1 != NULL)
243  {
244  if (xmlStrEqual(c1->name, (const xmlChar*)"data"))
245  putContent(vt, c1);
246  c1 = c1->next;
247  }
248  }
249  c = c->next;
250  }
251  //copy the numerical data with the correct map
252  copy(vt.begin(), vt.end(), vnn[angList[l]]);
253  }
254 
255  //Grabbing the spin-orbit functions from XML.
256  Matrix<mRealType> vnnso(angListSO.size(), npts);
257  for (int l = 0; l < angListSO.size(); l++)
258  {
259  std::vector<mRealType> vtso(npts);
260  xmlNodePtr c = vpsoPtr[l]->children;
261  while (c != NULL)
262  {
263  if (xmlStrEqual(c->name, (const xmlChar*)"radfunc"))
264  {
265  xmlNodePtr c1 = c->children;
266  while (c1 != NULL)
267  {
268  if (xmlStrEqual(c1->name, (const xmlChar*)"data"))
269  putContent(vtso, c1);
270  c1 = c1->next;
271  }
272  }
273  c = c->next;
274  }
275  //copy the numerical data with the correct map
276  //So this is weird, but I feel like l should be the proper index for vnnso,
277  //with angListSO[l] being the actual angular momentum channel referred to by l.
278  //This differs from the parsing of the nonlocal pseudopotential piece, but whatever.
279  copy(vtso.begin(), vtso.end(), vnnso[l]);
280  }
281 
282 
283  ////rather stupid to do this but necessary
284  //vector<RealType> temp(npts);
285  //for(int i=0; i<npts; i++) temp[i]=grid_global->r(i);
286  if (!is_r_times_V)
287  {
288  app_log() << " Input pseudopotential is converted into r*V" << std::endl;
289  for (int i = 0; i < vnn.rows(); i++)
290  for (int j = 0; j < npts; j++)
291  vnn[i][j] *= grid_global->r(j);
292  for (int i = 0; i < vnnso.rows(); i++)
293  for (int j = 0; j < npts; j++)
294  vnnso[i][j] *= grid_global->r(j);
295  }
296  app_log() << " Number of angular momentum channels " << angList.size() << std::endl;
297  app_log() << " Maximum angular momentum channel (Lmax) " << Lmax << std::endl;
298  doBreakUp(angList, vnn, rmax, Vprefactor);
299 
300  //If any spinorbit terms are found...
301  if (nso > 0)
302  buildSO(angListSO, vnnso, rmax, 1.0);
303  else
304  {
305  //No SO channels found. Delete pp_so
306  pp_so.reset();
307  }
308 }
309 
310 //Most of this is copied directly from doBreakUp, but is separated to prevent from cluttering doBreakUp.
311 //This function takes the input grid and input SO potential table, interpolates it onto a linear grid if necessary
312 //via a cubic spline, and then adds the final splined RadialPotentialType object to the SOECPComponent object.
313 void ECPComponentBuilder::buildSO(const std::vector<int>& angList,
314  const Matrix<mRealType>& vnnso,
315  RealType rmax,
316  mRealType Vprefactor)
317 {
318  const int max_points = 100000;
319  app_log() << " Creating a Linear Grid Rmax=" << rmax << std::endl;
320  //this is a new grid
321  mRealType d = 1e-4;
322  auto agrid = std::make_unique<LinearGrid<RealType>>();
323  // If the global grid is already linear, do not interpolate the data
324  int ng;
325  if (grid_global->getGridTag() == LINEAR_1DGRID)
326  {
327  ng = (int)std::ceil(rmax * grid_global->DeltaInv) + 1;
328  if (ng <= max_points)
329  {
330  app_log() << " Using global grid with delta = " << grid_global->Delta << std::endl;
331  rmax = grid_global->Delta * (ng - 1);
332  agrid->set(0.0, rmax, ng);
333  }
334  else
335  agrid->set(0.0, rmax, max_points);
336  }
337  else
338  {
339  ng = std::min(max_points, static_cast<int>(rmax / d) + 1);
340  agrid->set(0, rmax, ng);
341  }
342  // This is critical!!!
343  // If d is not reset, we generate an error in the interpolated PP!
344  d = agrid->Delta;
345  int ngIn = vnnso.cols() - 2;
346  std::vector<RealType> newP(ng);
347  std::vector<mRealType> newPin(ngIn);
348  for (int l = 0; l < angList.size(); l++)
349  {
350  const mRealType* restrict vp = vnnso[l];
351  for (int i = 0; i < ngIn; i++)
352  newPin[i] = Vprefactor * vp[i];
353 
354  OneDimCubicSpline<mRealType> infunc(grid_global->makeClone(), newPin);
355  infunc.spline(0, 0.0, ngIn - 1, 0.0);
356  for (int i = 1; i < ng - 1; i++)
357  {
358  mRealType r = d * i;
359  newP[i] = infunc.splint(r) / r;
360  }
361  newP[0] = newP[1];
362  newP[ng - 1] = 0.0;
363  RadialPotentialType* app = new RadialPotentialType(agrid->makeClone(), newP);
364  app->spline();
365  pp_so->add(angList[l], app);
366  }
367  NumSO = angList.size();
368  pp_so->setRmax(rmax);
369 }
370 
371 bool ECPComponentBuilder::parseCasino(const std::string& fname, xmlNodePtr cur)
372 {
373  app_log() << " Start ECPComponentBuilder::parseCasino" << std::endl;
374  RealType rmax = 2.0;
375  Llocal = -1;
376  Lmax = -1;
377  OhmmsAttributeSet aAttrib;
378  aAttrib.add(rmax, "cutoff");
379  aAttrib.add(Llocal, "l-local");
380  aAttrib.add(Lmax, "lmax");
381  aAttrib.add(Nrule, "nrule");
382  aAttrib.put(cur);
383 
384  std::ifstream fin(fname.c_str(), std::ios_base::in);
385  if (!fin)
386  {
387  app_error() << "Could not open file " << fname << std::endl;
388  myComm->barrier_and_abort("ECPComponentBuilder::parseCasino");
389  }
390  if (!pp_nonloc)
391  pp_nonloc = std::make_unique<NonLocalECPComponent>();
392  OhmmsAsciiParser aParser;
393  int npts = 0, idummy;
394  std::string eunits("rydberg");
395  app_log() << " ECPComponentBuilder::parseCasino" << std::endl;
396  aParser.skiplines(fin, 1); //Header
397  aParser.skiplines(fin, 1); //Atomic number and pseudo-charge
398  aParser.getValue(fin, AtomicNumber, Zeff);
399  app_log() << " Atomic number = " << AtomicNumber << " Zeff = " << Zeff << std::endl;
400  aParser.skiplines(fin, 1); //Energy units (rydberg/hartree/ev):
401  aParser.getValue(fin, eunits);
402  app_log() << " Unit of the potentials = " << eunits << std::endl;
403  mRealType Vprefactor = (eunits == "rydberg") ? 0.5 : 1.0;
404  aParser.skiplines(fin, 1); //Angular momentum of local component (0=s,1=p,2=d..)
405  aParser.getValue(fin, idummy);
406  if (Lmax < 0)
407  Lmax = idummy;
408  aParser.skiplines(fin, 1); //NLRULE override (1) VMC/DMC (2) config gen (0 ==> input/default value)
409  aParser.skiplines(fin, 1); //0 0, not sure what to do yet
410  aParser.skiplines(fin, 1); //Number of grid points
411  aParser.getValue(fin, npts);
412  app_log() << " Input Grid size = " << npts << std::endl;
413  std::vector<mRealType> temp(npts);
414  aParser.skiplines(fin, 1); //R(i) in atomic units
415  aParser.getValues(fin, temp.begin(), temp.end());
416  //create a global grid of numerical type
417  grid_global = std::make_unique<NumericalGrid<mRealType>>(temp);
418  Matrix<mRealType> vnn(Lmax + 1, npts);
419  for (int l = 0; l <= Lmax; l++)
420  {
421  aParser.skiplines(fin, 1);
422  aParser.getValues(fin, vnn[l], vnn[l] + npts);
423  }
424  std::vector<int> angList(Lmax + 1);
425  for (int l = 0; l <= Lmax; l++)
426  angList[l] = l;
427  // Now, check to see what maximum cutoff should be
428  if (vnn.size() > 1)
429  {
430  const double tolerance = 1.0e-5;
431  double rc_check = grid_global->r(npts - 1);
432  for (int j = npts - 1; j > 0; j--)
433  {
434  bool closeEnough = true;
435  for (int i = 0; i < vnn.rows(); i++)
436  for (int k = i + 1; k < vnn.rows(); k++)
437  if (std::abs(vnn[i][j] - vnn[k][j]) > tolerance)
438  closeEnough = false;
439  if (!closeEnough)
440  {
441  rc_check = grid_global->r(j);
442  break;
443  }
444  }
445  app_log() << " Maxium cutoff for non-local pseudopotentials " << rc_check << std::endl;
446  }
447  doBreakUp(angList, vnn, rmax, Vprefactor);
449  app_log() << " Non-local pseudopotential parameters" << std::endl;
450  pp_nonloc->print(app_log());
451  return true;
452 }
453 
454 
455 /** Separate local from non-local potentials
456  * @param angList angular momentum list
457  * @param vnn semilocal tables of size (angList.size(),global_grid->size())
458  * @param rmax cutoff radius
459  * @param Vprefactor conversion factor to Hartree
460  *
461  * Note that local pseudopotential is r*V !!!
462  */
463 void ECPComponentBuilder::doBreakUp(const std::vector<int>& angList,
464  const Matrix<mRealType>& vnn,
465  RealType rmax,
466  mRealType Vprefactor)
467 {
468  //ALERT magic number
469  const int max_points = 100000;
470  app_log() << " Creating a Linear Grid Rmax=" << rmax << std::endl;
471  //this is a new grid
472  mRealType d = 1e-4;
473  auto agrid = std::make_unique<LinearGrid<RealType>>();
474  // If the global grid is already linear, do not interpolate the data
475  int ng;
476  if (grid_global->getGridTag() == LINEAR_1DGRID)
477  {
478  ng = (int)std::ceil(rmax * grid_global->DeltaInv) + 1;
479  if (ng <= max_points)
480  {
481  app_log() << " Using global grid with delta = " << grid_global->Delta << std::endl;
482  rmax = grid_global->Delta * (ng - 1);
483  agrid->set(0.0, rmax, ng);
484  }
485  else
486  agrid->set(0.0, rmax, max_points);
487  }
488  else
489  {
490  ng = std::min(max_points, static_cast<int>(rmax / d) + 1);
491  agrid->set(0, rmax, ng);
492  }
493  // This is critical!!!
494  // If d is not reset, we generate an error in the interpolated PP!
495  d = agrid->Delta;
496  int ngIn = vnn.cols() - 2;
497 
498  assert(angList.size() > 0 && "ECPComponentBuilder::doBreakUp angList cannot be empty!");
499  //find the index of local
500  int iLlocal = -1;
501  for (int l = 0; l < angList.size(); l++)
502  if (angList[l] == Llocal)
503  iLlocal = l;
504  std::vector<RealType> newP(ng);
505  std::vector<mRealType> newPin(ngIn);
506  for (int l = 0; l < angList.size(); l++)
507  {
508  if (angList[l] == Llocal)
509  continue;
510  const mRealType* restrict vp = vnn[angList[l]];
511  const mRealType* restrict vpLoc = vnn[iLlocal];
512  int ll = angList[l];
513  for (int i = 0; i < ngIn; i++)
514  newPin[i] = Vprefactor * (vp[i] - vpLoc[i]);
515  OneDimCubicSpline<mRealType> infunc(grid_global->makeClone(), newPin);
516  infunc.spline(0, 0.0, ngIn - 1, 0.0);
517  for (int i = 1; i < ng - 1; i++)
518  {
519  mRealType r = d * i;
520  newP[i] = infunc.splint(r) / r;
521  }
522  newP[0] = newP[1];
523  newP[ng - 1] = 0.0;
524  auto app = new RadialPotentialType(agrid->makeClone(), newP);
525  app->spline();
526  pp_nonloc->add(angList[l], app);
527  }
528  NumNonLocal = Lmax;
529  if (Llocal == Lmax)
530  Lmax--;
531  if (NumNonLocal)
532  {
533  pp_nonloc->lmax = Lmax;
534  pp_nonloc->Rmax = rmax;
535  }
536  else
537  {
538  //only one component, remove non-local potentials
539  pp_nonloc.reset();
540  }
541  {
542  // Spline local potential on original grid
543  newPin[0] = 0.0;
544  mRealType vfac = -Vprefactor / Zeff;
545  const mRealType* restrict vpLoc = vnn[iLlocal];
546  for (int i = 0; i < ngIn; i++)
547  newPin[i] = vfac * vpLoc[i];
548  double dy0 = (newPin[1] - newPin[0]) / ((*grid_global)[1] - (*grid_global)[0]);
549  OneDimCubicSpline<mRealType> infunc(grid_global->makeClone(), newPin);
550  infunc.spline(0, dy0, ngIn - 1, 0.0);
551  int m = grid_global->size();
552  double loc_max = grid_global->r(m - 1);
553  int nloc = (int)std::floor(loc_max / d);
554  loc_max = (nloc - 1) * d;
555  auto grid_loc = std::make_unique<LinearGrid<RealType>>();
556  grid_loc->set(0.0, loc_max, nloc);
557  app_log() << " Making L=" << Llocal << " a local potential with a radial cutoff of " << loc_max << std::endl;
558  std::vector<RealType> newPloc(nloc);
559  for (int i = 1; i < nloc - 1; i++)
560  {
561  mRealType r = d * i;
562  newPloc[i] = infunc.splint(r);
563  }
564  newPloc[0] = 0.0;
565  newPloc[nloc - 1] = 1.0;
566  pp_loc = std::make_unique<RadialPotentialType>(std::move(grid_loc), newPloc);
567  pp_loc->spline(0, dy0, nloc - 1, 0.0);
568  // for (double r=0.0; r<3.50001; r+=0.001)
569  // fprintf (stderr, "%10.5f %10.5f\n", r, pp_loc->splint(r));
570  }
571 }
572 
573 } // namespace qmcplusplus
std::ostream & app_warning()
Definition: OutputManager.h:69
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
QTBase::RealType RealType
Definition: Configuration.h:58
std::map< std::string, int > angMon
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
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
std::ostream & app_error()
Definition: OutputManager.h:67
void spline(int imin, value_type yp1, int imax, value_type ypn) override
Evaluate the 2nd derivative on the grid points.
T min(T a, T b)
std::unique_ptr< NonLocalECPComponent > pp_nonloc
size_type cols() const
Definition: OhmmsMatrix.h:78
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639
std::unique_ptr< mGridType > grid_global
std::unique_ptr< SOECPComponent > pp_so
MakeReturn< UnaryNode< FnCeil, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t ceil(const Vector< T1, C1 > &l)
Communicate * myComm
pointer to Communicate
Definition: MPIObjectBase.h:62
Declaration of a builder class for an ECP component for an ionic type.
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
bool parseCasino(const std::string &fname, xmlNodePtr cur)
std::unique_ptr< RadialPotentialType > pp_loc
LocalECPotential::RadialPotentialType RadialPotentialType
bool putContent(T &a, xmlNodePtr cur)
replaces a&#39;s value with the first "element" in the "string" returned by XMLNodeString{cur}.
Definition: libxmldefs.h:88
void buildSemiLocalAndLocal(std::vector< xmlNodePtr > &semiPtr)
void doBreakUp(const std::vector< int > &angList, const Matrix< mRealType > &vnn, RealType rmax, mRealType Vprefactor=1.0)
Separate local from non-local potentials.
void barrier_and_abort(const std::string &msg) const
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
void buildSO(const std::vector< int > &angList, const Matrix< mRealType > &vnnso, RealType rmax, mRealType Vprefactor=1.0)
brief buildSO - takes the previously parsed angular momenta and spin-orbit tabulated potentials and u...
MakeReturn< UnaryNode< FnFloor, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t floor(const Vector< T1, C1 > &l)