QMCPACK
AtomicOrbitals< ST > Class Template Reference
+ Collaboration diagram for AtomicOrbitals< ST >:

Public Types

using AtomicSplineType = typename bspline_traits< ST, 1 >::SplineType
 
using AtomicBCType = typename bspline_traits< ST, 1 >::BCType
 
using AtomicSingleSplineType = UBspline_1d_d
 
using PointType = TinyVector< ST, D >
 
using value_type = ST
 
using vContainer_type = aligned_vector< ST >
 

Public Member Functions

 AtomicOrbitals (int Lmax)
 
ST getCutoff () const
 
ST getCutoffBuffer () const
 
ST getSplineRadius () const
 
ST getNonOverlappingRadius () const
 
int getSplineNpoints () const
 
int getLmax () const
 
const PointTypegetCenterPos () const
 
void resizeStorage (size_t Nb)
 
void bcast_tables (Communicate *comm)
 
void gather_tables (Communicate *comm, std::vector< int > &offset)
 
template<typename PT , typename VT >
void set_info (const PT &R, const VT &cutoff_in, const VT &cutoff_buffer_in, const VT &spline_radius_in, const VT &non_overlapping_radius_in, const int spline_npoints_in)
 
void create_spline ()
 
size_t getSplineSizeInBytes () const
 
void flush_zero ()
 
void set_spline (AtomicSingleSplineType *spline, int lm, int ispline)
 
bool read_splines (hdf_archive &h5f)
 
bool write_splines (hdf_archive &h5f)
 
template<typename VV >
void evaluate_v (const ST &r, const PointType &dr, VV &myV)
 
template<typename DISPL , typename VM >
void evaluateValues (const DISPL &Displacements, const int center_idx, const ST &r, VM &multi_myV)
 
template<typename VV , typename GV >
void evaluate_vgl (const ST &r, const PointType &dr, VV &myV, GV &myG, VV &myL)
 
template<typename VV , typename GV , typename HT >
void evaluate_vgh (const ST &r, const PointType &dr, VV &myV, GV &myG, HT &myH)
 
void storeParamsBeforeRotation ()
 
template<typename VM >
void applyRotation (const VM &rot_mat, bool use_stored_copy)
 

Static Public Attributes

static const int D = 3
 

Private Attributes

ST rmin
 
ST rmin_sqrt
 
ST cutoff
 
ST cutoff_buffer
 
ST spline_radius
 
ST non_overlapping_radius
 
int spline_npoints
 
int BaseN
 
int NumBands
 
int Npad
 
PointType center_pos
 
const int lmax
 
const int lm_tot
 
SoaSphericalTensor< ST > Ylm
 
vContainer_type l_vals
 
vContainer_type r_power_minus_l
 
std::shared_ptr< MultiBspline1D< ST > > SplineInst
 1D spline of radial functions of all the orbitals More...
 
std::shared_ptr< std::vector< ST > > coef_copy_
 coef copy for orbital rotation More...
 
vContainer_type localV
 
vContainer_type localG
 
vContainer_type localL
 

Detailed Description

template<typename ST>
class qmcplusplus::AtomicOrbitals< ST >

Definition at line 33 of file HybridRepCenterOrbitals.h.

Member Typedef Documentation

◆ AtomicBCType

using AtomicBCType = typename bspline_traits<ST, 1>::BCType

Definition at line 38 of file HybridRepCenterOrbitals.h.

◆ AtomicSingleSplineType

using AtomicSingleSplineType = UBspline_1d_d

Definition at line 39 of file HybridRepCenterOrbitals.h.

◆ AtomicSplineType

using AtomicSplineType = typename bspline_traits<ST, 1>::SplineType

Definition at line 37 of file HybridRepCenterOrbitals.h.

◆ PointType

using PointType = TinyVector<ST, D>

Definition at line 40 of file HybridRepCenterOrbitals.h.

◆ value_type

using value_type = ST

Definition at line 41 of file HybridRepCenterOrbitals.h.

◆ vContainer_type

Definition at line 43 of file HybridRepCenterOrbitals.h.

Constructor & Destructor Documentation

◆ AtomicOrbitals()

AtomicOrbitals ( int  Lmax)
inline

Definition at line 66 of file HybridRepCenterOrbitals.h.

References qmcplusplus::exp(), AtomicOrbitals< ST >::l_vals, AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::lmax, qmcplusplus::log(), qmcplusplus::Units::distance::m, omptarget::min(), AtomicOrbitals< ST >::r_power_minus_l, AtomicOrbitals< ST >::rmin, AtomicOrbitals< ST >::rmin_sqrt, and qmcplusplus::sqrt().

66  : lmax(Lmax), lm_tot((Lmax + 1) * (Lmax + 1)), Ylm(Lmax)
67  {
68  r_power_minus_l.resize(lm_tot);
69  l_vals.resize(lm_tot);
70  for (int l = 0; l <= lmax; l++)
71  for (int m = -l; m <= l; m++)
72  l_vals[l * (l + 1) + m] = l;
73  rmin = std::exp(std::log(std::numeric_limits<ST>::min()) / std::max(Lmax, 1));
74  rmin = std::max(rmin, std::numeric_limits<ST>::epsilon());
75  rmin_sqrt = std::max(rmin, std::sqrt(std::numeric_limits<ST>::epsilon()));
76  }
T min(T a, T b)
SoaSphericalTensor< ST > Ylm
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
MakeReturn< UnaryNode< FnLog, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t log(const Vector< T1, C1 > &l)
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)

Member Function Documentation

◆ applyRotation()

void applyRotation ( const VM &  rot_mat,
bool  use_stored_copy 
)
inline

Definition at line 413 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::coef_copy_, qmcplusplus::syclBLAS::copy_n(), AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::Npad, and AtomicOrbitals< ST >::SplineInst.

414  {
415  // SplineInst is a MultiBspline. See src/spline2/MultiBspline.hpp
416  const auto spline_ptr = SplineInst->getSplinePtr();
417  assert(spline_ptr != nullptr);
418  const auto spl_coefs = spline_ptr->coefs;
419  const auto Nsplines = spline_ptr->num_splines; // May include padding
420  const auto coefs_tot_size = spline_ptr->coefs_size;
421  const auto BasisSetSize = coefs_tot_size / Nsplines;
422  const auto TrueNOrbs = rot_mat.size1(); // == Nsplines - padding
423 
424  if (!use_stored_copy)
425  {
426  assert(coef_copy_ != nullptr);
427  std::copy_n(spl_coefs, coefs_tot_size, coef_copy_->begin());
428  }
429 
430  // There are TrueNOrb splines for every l,m pair, and also padding
431 #ifdef QMC_COMPLEX
432  for (size_t lidx = 0; lidx < lm_tot; lidx++)
433  for (size_t i = 0; i < BasisSetSize; i++)
434  for (size_t j = 0; j < TrueNOrbs; j++)
435  {
436  const auto cur_elem = i * Nsplines + lidx * Npad + 2 * j;
437  ST newval_r{0.};
438  ST newval_i{0.};
439  for (size_t k = 0; k < TrueNOrbs; k++)
440  {
441  const auto index = i * Nsplines + lidx * Npad + 2 * k;
442  ST zr = (*coef_copy_)[index];
443  ST zi = (*coef_copy_)[index + 1];
444  ST wr = rot_mat[k][j].real();
445  ST wi = rot_mat[k][j].imag();
446  newval_r += zr * wr - zi * wi;
447  newval_i += zr * wi + zi * wr;
448  }
449  spl_coefs[cur_elem] = newval_r;
450  spl_coefs[cur_elem + 1] = newval_i;
451  }
452 #else
453  for (size_t lidx = 0; lidx < lm_tot; lidx++)
454  for (size_t i = 0; i < BasisSetSize; i++)
455  for (size_t j = 0; j < TrueNOrbs; j++)
456  {
457  const auto cur_elem = i * Nsplines + lidx * Npad + j;
458  ST newval{0.};
459  for (size_t k = 0; k < TrueNOrbs; k++)
460  {
461  const auto index = i * Nsplines + lidx * Npad + k;
462  newval += (*coef_copy_)[index] * rot_mat[k][j];
463  }
464  spl_coefs[cur_elem] = newval;
465  }
466 #endif
467  }
std::shared_ptr< std::vector< ST > > coef_copy_
coef copy for orbital rotation
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
Definition: syclBLAS.cpp:548

◆ bcast_tables()

void bcast_tables ( Communicate comm)
inline

Definition at line 97 of file HybridRepCenterOrbitals.h.

References qmcplusplus::comm, and AtomicOrbitals< ST >::SplineInst.

97 { chunked_bcast(comm, SplineInst->getSplinePtr()); }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ create_spline()

void create_spline ( )
inline

Definition at line 123 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::Npad, AtomicOrbitals< ST >::spline_npoints, AtomicOrbitals< ST >::spline_radius, and AtomicOrbitals< ST >::SplineInst.

Referenced by AtomicOrbitals< ST >::resizeStorage().

124  {
125  AtomicBCType bc;
126  bc.lCode = FLAT;
127  bc.rCode = NATURAL;
128  Ugrid grid;
129  grid.start = 0.0;
130  grid.end = spline_radius;
131  grid.num = spline_npoints;
132  SplineInst = std::make_shared<MultiBspline1D<ST>>();
133  SplineInst->create(grid, bc, lm_tot * Npad);
134  }
typename bspline_traits< ST, 1 >::BCType AtomicBCType
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ evaluate_v()

void evaluate_v ( const ST &  r,
const PointType dr,
VV &  myV 
)
inline

Definition at line 173 of file HybridRepCenterOrbitals.h.

References BLAS::czero, SoaSphericalTensor< T >::evaluateV(), AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::localV, AtomicOrbitals< ST >::Npad, AtomicOrbitals< ST >::SplineInst, and AtomicOrbitals< ST >::Ylm.

174  {
175  if (r > std::numeric_limits<ST>::epsilon())
176  Ylm.evaluateV(dr[0] / r, dr[1] / r, dr[2] / r);
177  else
178  Ylm.evaluateV(0, 0, 1);
179  const ST* restrict Ylm_v = Ylm[0];
180 
181  constexpr ST czero(0);
182  ST* restrict val = myV.data();
183  ST* restrict local_val = localV.data();
184  std::fill(myV.begin(), myV.end(), czero);
185 
186  SplineInst->evaluate(r, localV);
187 
188  for (size_t lm = 0; lm < lm_tot; lm++)
189  {
190 #pragma omp simd aligned(val, local_val : QMC_SIMD_ALIGNMENT)
191  for (size_t ib = 0; ib < myV.size(); ib++)
192  val[ib] += Ylm_v[lm] * local_val[ib];
193  local_val += Npad;
194  }
195  }
constexpr std::complex< float > czero
Definition: BLAS.hpp:51
SoaSphericalTensor< ST > Ylm
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals
void evaluateV(T x, T y, T z, T *Ylm) const
compute Ylm

◆ evaluate_vgh()

void evaluate_vgh ( const ST &  r,
const PointType dr,
VV &  myV,
GV &  myG,
HT &  myH 
)
inline

Definition at line 398 of file HybridRepCenterOrbitals.h.

References APP_ABORT.

399  {
400  //Needed to do tensor product here
401  APP_ABORT("AtomicOrbitals::evaluate_vgh");
402  }
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
Definition: AppAbort.h:27

◆ evaluate_vgl()

void evaluate_vgl ( const ST &  r,
const PointType dr,
VV &  myV,
GV &  myG,
VV &  myL 
)
inline

Definition at line 229 of file HybridRepCenterOrbitals.h.

References BLAS::cone, BLAS::czero, SoaSphericalTensor< T >::evaluateVGL(), AtomicOrbitals< ST >::l_vals, AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::lmax, AtomicOrbitals< ST >::localG, AtomicOrbitals< ST >::localL, AtomicOrbitals< ST >::localV, qmcplusplus::Units::distance::m, AtomicOrbitals< ST >::Npad, AtomicOrbitals< ST >::r_power_minus_l, AtomicOrbitals< ST >::rmin, AtomicOrbitals< ST >::rmin_sqrt, AtomicOrbitals< ST >::SplineInst, and AtomicOrbitals< ST >::Ylm.

230  {
231  ST drx, dry, drz, rhatx, rhaty, rhatz, rinv;
232  if (r > rmin)
233  {
234  rinv = 1.0 / r;
235  }
236  else
237  {
238  rinv = 0;
239  }
240  drx = dr[0];
241  dry = dr[1];
242  drz = dr[2];
243  rhatx = drx * rinv;
244  rhaty = dry * rinv;
245  rhatz = drz * rinv;
246 
247  Ylm.evaluateVGL(drx, dry, drz);
248  const ST* restrict Ylm_v = Ylm[0];
249  const ST* restrict Ylm_gx = Ylm[1];
250  const ST* restrict Ylm_gy = Ylm[2];
251  const ST* restrict Ylm_gz = Ylm[3];
252 
253  ST* restrict g0 = myG.data(0);
254  ST* restrict g1 = myG.data(1);
255  ST* restrict g2 = myG.data(2);
256  constexpr ST czero(0), cone(1), chalf(0.5);
257  std::fill(myV.begin(), myV.end(), czero);
258  std::fill(g0, g0 + Npad, czero);
259  std::fill(g1, g1 + Npad, czero);
260  std::fill(g2, g2 + Npad, czero);
261  std::fill(myL.begin(), myL.end(), czero);
262  ST* restrict val = myV.data();
263  ST* restrict lapl = myL.data();
264  ST* restrict local_val = localV.data();
265  ST* restrict local_grad = localG.data();
266  ST* restrict local_lapl = localL.data();
267 
268  SplineInst->evaluate_vgl(r, localV, localG, localL);
269 
270  if (r > rmin_sqrt)
271  {
272  // far from core
273  r_power_minus_l[0] = cone;
274  ST r_power_temp = cone;
275  for (int l = 1; l <= lmax; l++)
276  {
277  r_power_temp *= rinv;
278  for (int m = -l, lm = l * l; m <= l; m++, lm++)
279  r_power_minus_l[lm] = r_power_temp;
280  }
281 
282  for (size_t lm = 0; lm < lm_tot; lm++)
283  {
284  const ST& l_val = l_vals[lm];
285  const ST& r_power = r_power_minus_l[lm];
286  const ST Ylm_rescale = Ylm_v[lm] * r_power;
287  const ST rhat_dot_G = (rhatx * Ylm_gx[lm] + rhaty * Ylm_gy[lm] + rhatz * Ylm_gz[lm]) * r_power;
288 #pragma omp simd aligned(val, g0, g1, g2, lapl, local_val, local_grad, local_lapl : QMC_SIMD_ALIGNMENT)
289  for (size_t ib = 0; ib < myV.size(); ib++)
290  {
291  const ST local_v = local_val[ib];
292  const ST local_g = local_grad[ib];
293  const ST local_l = local_lapl[ib];
294  // value
295  const ST Vpart = l_val * rinv * local_v;
296  val[ib] += Ylm_rescale * local_v;
297 
298  // grad
299  const ST factor1 = local_g * Ylm_rescale;
300  const ST factor2 = local_v * r_power;
301  const ST factor3 = -Vpart * Ylm_rescale;
302  g0[ib] += factor1 * rhatx + factor2 * Ylm_gx[lm] + factor3 * rhatx;
303  g1[ib] += factor1 * rhaty + factor2 * Ylm_gy[lm] + factor3 * rhaty;
304  g2[ib] += factor1 * rhatz + factor2 * Ylm_gz[lm] + factor3 * rhatz;
305 
306  // laplacian
307  lapl[ib] += (local_l + (local_g * (2 - l_val) - Vpart) * rinv) * Ylm_rescale + (local_g - Vpart) * rhat_dot_G;
308  }
309  local_val += Npad;
310  local_grad += Npad;
311  local_lapl += Npad;
312  }
313  }
314  else if (r > rmin)
315  {
316  // the possibility of reaching here is very very low
317  std::cout << "Warning: an electron is very close to an ion, distance=" << r << " be careful!" << std::endl;
318  // near core, kill divergence in the laplacian
319  r_power_minus_l[0] = cone;
320  ST r_power_temp = cone;
321  for (int l = 1; l <= lmax; l++)
322  {
323  r_power_temp *= rinv;
324  for (int m = -l, lm = l * l; m <= l; m++, lm++)
325  r_power_minus_l[lm] = r_power_temp;
326  }
327 
328  for (size_t lm = 0; lm < lm_tot; lm++)
329  {
330  const ST& l_val = l_vals[lm];
331  const ST& r_power = r_power_minus_l[lm];
332  const ST Ylm_rescale = Ylm_v[lm] * r_power;
333  const ST rhat_dot_G = (Ylm_gx[lm] * rhatx + Ylm_gy[lm] * rhaty + Ylm_gz[lm] * rhatz) * r_power * r;
334 #pragma omp simd aligned(val, g0, g1, g2, lapl, local_val, local_grad, local_lapl : QMC_SIMD_ALIGNMENT)
335  for (size_t ib = 0; ib < myV.size(); ib++)
336  {
337  const ST local_v = local_val[ib];
338  const ST local_g = local_grad[ib];
339  const ST local_l = local_lapl[ib];
340  // value
341  const ST Vpart = Ylm_rescale * local_v;
342  val[ib] += Vpart;
343 
344  // grad
345  const ST factor1 = local_g * Ylm_rescale;
346  const ST factor2 = local_v * r_power;
347  const ST factor3 = -l_val * Vpart * rinv;
348  g0[ib] += factor1 * rhatx + factor2 * Ylm_gx[lm] + factor3 * rhatx;
349  g1[ib] += factor1 * rhaty + factor2 * Ylm_gy[lm] + factor3 * rhaty;
350  g2[ib] += factor1 * rhatz + factor2 * Ylm_gz[lm] + factor3 * rhatz;
351 
352  // laplacian
353  lapl[ib] += local_l * (cone - chalf * l_val) * (3 * Ylm_rescale + rhat_dot_G);
354  }
355  local_val += Npad;
356  local_grad += Npad;
357  local_lapl += Npad;
358  }
359  }
360  else
361  {
362  std::cout << "Warning: an electron is on top of an ion!" << std::endl;
363  // strictly zero
364 
365 #pragma omp simd aligned(val, lapl, local_val, local_lapl : QMC_SIMD_ALIGNMENT)
366  for (size_t ib = 0; ib < myV.size(); ib++)
367  {
368  // value
369  val[ib] = Ylm_v[0] * local_val[ib];
370 
371  // laplacian
372  lapl[ib] = local_lapl[ib] * static_cast<ST>(3) * Ylm_v[0];
373  }
374  local_val += Npad;
375  local_grad += Npad;
376  local_lapl += Npad;
377  if (lm_tot > 0)
378  {
379  //std::cout << std::endl;
380  for (size_t lm = 1; lm < 4; lm++)
381  {
382 #pragma omp simd aligned(g0, g1, g2, local_grad : QMC_SIMD_ALIGNMENT)
383  for (size_t ib = 0; ib < myV.size(); ib++)
384  {
385  const ST local_g = local_grad[ib];
386  // grad
387  g0[ib] += local_g * Ylm_gx[lm];
388  g1[ib] += local_g * Ylm_gy[lm];
389  g2[ib] += local_g * Ylm_gz[lm];
390  }
391  local_grad += Npad;
392  }
393  }
394  }
395  }
constexpr std::complex< float > czero
Definition: BLAS.hpp:51
constexpr std::complex< float > cone
Definition: BLAS.hpp:50
void evaluateVGL(T x, T y, T z)
makes a table of and their gradients up to Lmax.
SoaSphericalTensor< ST > Ylm
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ evaluateValues()

void evaluateValues ( const DISPL &  Displacements,
const int  center_idx,
const ST &  r,
VM &  multi_myV 
)
inline

Definition at line 198 of file HybridRepCenterOrbitals.h.

References BLAS::czero, SoaSphericalTensor< T >::evaluateV(), AtomicOrbitals< ST >::lm_tot, AtomicOrbitals< ST >::localV, qmcplusplus::Units::distance::m, AtomicOrbitals< ST >::Npad, AtomicOrbitals< ST >::SplineInst, and AtomicOrbitals< ST >::Ylm.

199  {
200  if (r <= std::numeric_limits<ST>::epsilon())
201  Ylm.evaluateV(0, 0, 1);
202  const ST* restrict Ylm_v = Ylm[0];
203 
204  const size_t m = multi_myV.cols();
205  constexpr ST czero(0);
206  std::fill(multi_myV.begin(), multi_myV.end(), czero);
207  SplineInst->evaluate(r, localV);
208 
209  for (int ivp = 0; ivp < Displacements.size(); ivp++)
210  {
211  PointType dr = Displacements[ivp][center_idx];
212  if (r > std::numeric_limits<ST>::epsilon())
213  Ylm.evaluateV(-dr[0] / r, -dr[1] / r, -dr[2] / r);
214 
215  ST* restrict val = multi_myV[ivp];
216  ST* restrict local_val = localV.data();
217  for (size_t lm = 0; lm < lm_tot; lm++)
218  {
219 #pragma omp simd aligned(val, local_val : QMC_SIMD_ALIGNMENT)
220  for (size_t ib = 0; ib < m; ib++)
221  val[ib] += Ylm_v[lm] * local_val[ib];
222  local_val += Npad;
223  }
224  }
225  }
constexpr std::complex< float > czero
Definition: BLAS.hpp:51
SoaSphericalTensor< ST > Ylm
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals
void evaluateV(T x, T y, T z, T *Ylm) const
compute Ylm

◆ flush_zero()

void flush_zero ( )
inline

Definition at line 138 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::SplineInst.

138 { SplineInst->flush_zero(); }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ gather_tables()

void gather_tables ( Communicate comm,
std::vector< int > &  offset 
)
inline

Definition at line 99 of file HybridRepCenterOrbitals.h.

References qmcplusplus::comm, gatherv(), AtomicOrbitals< ST >::Npad, and AtomicOrbitals< ST >::SplineInst.

100  {
101  gatherv(comm, SplineInst->getSplinePtr(), Npad, offset);
102  }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals
void gatherv(T *sb, T *rb, int n, IT &counts, IT &displ, int dest)

◆ getCenterPos()

const PointType& getCenterPos ( ) const
inline

Definition at line 85 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::center_pos.

◆ getCutoff()

ST getCutoff ( ) const
inline

◆ getCutoffBuffer()

ST getCutoffBuffer ( ) const
inline

◆ getLmax()

int getLmax ( ) const
inline

Definition at line 84 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::lmax.

84 { return lmax; }

◆ getNonOverlappingRadius()

ST getNonOverlappingRadius ( ) const
inline

◆ getSplineNpoints()

int getSplineNpoints ( ) const
inline

◆ getSplineRadius()

ST getSplineRadius ( ) const
inline

◆ getSplineSizeInBytes()

size_t getSplineSizeInBytes ( ) const
inline

Definition at line 136 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::SplineInst.

136 { return SplineInst->sizeInByte(); }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ read_splines()

bool read_splines ( hdf_archive h5f)
inline

Definition at line 145 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::lmax, hdf_archive::readEntry(), AtomicOrbitals< ST >::spline_npoints, AtomicOrbitals< ST >::spline_radius, and AtomicOrbitals< ST >::SplineInst.

146  {
147  einspline_engine<AtomicSplineType> bigtable(SplineInst->getSplinePtr());
148  int lmax_in = 0, spline_npoints_in = 0;
149  ST spline_radius_in;
150  if (!h5f.readEntry(lmax_in, "l_max") || lmax_in != lmax)
151  return false;
152  if (!h5f.readEntry(spline_radius_in, "spline_radius") || spline_radius_in != spline_radius)
153  return false;
154  if (!h5f.readEntry(spline_npoints_in, "spline_npoints") || spline_npoints_in != spline_npoints)
155  return false;
156  return h5f.readEntry(bigtable, "radial_spline");
157  }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ resizeStorage()

◆ set_info()

void set_info ( const PT &  R,
const VT &  cutoff_in,
const VT &  cutoff_buffer_in,
const VT &  spline_radius_in,
const VT &  non_overlapping_radius_in,
const int  spline_npoints_in 
)
inline

◆ set_spline()

void set_spline ( AtomicSingleSplineType spline,
int  lm,
int  ispline 
)
inline

Definition at line 140 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::BaseN, AtomicOrbitals< ST >::Npad, and AtomicOrbitals< ST >::SplineInst.

141  {
142  SplineInst->copy_spline(spline, lm * Npad + ispline, 0, BaseN);
143  }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

◆ storeParamsBeforeRotation()

void storeParamsBeforeRotation ( )
inline

Definition at line 404 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::coef_copy_, qmcplusplus::syclBLAS::copy_n(), and AtomicOrbitals< ST >::SplineInst.

405  {
406  const auto spline_ptr = SplineInst->getSplinePtr();
407  const auto coefs_tot_size = spline_ptr->coefs_size;
408  coef_copy_ = std::make_shared<std::vector<ST>>(coefs_tot_size);
409  std::copy_n(spline_ptr->coefs, coefs_tot_size, coef_copy_->begin());
410  }
std::shared_ptr< std::vector< ST > > coef_copy_
coef copy for orbital rotation
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
Definition: syclBLAS.cpp:548

◆ write_splines()

bool write_splines ( hdf_archive h5f)
inline

Definition at line 159 of file HybridRepCenterOrbitals.h.

References AtomicOrbitals< ST >::center_pos, AtomicOrbitals< ST >::lmax, AtomicOrbitals< ST >::spline_npoints, AtomicOrbitals< ST >::spline_radius, AtomicOrbitals< ST >::SplineInst, and hdf_archive::writeEntry().

160  {
161  bool success = true;
162  success = success && h5f.writeEntry(spline_radius, "spline_radius");
163  success = success && h5f.writeEntry(spline_npoints, "spline_npoints");
164  success = success && h5f.writeEntry(lmax, "l_max");
165  success = success && h5f.writeEntry(center_pos, "position");
166  einspline_engine<AtomicSplineType> bigtable(SplineInst->getSplinePtr());
167  success = success && h5f.writeEntry(bigtable, "radial_spline");
168  return success;
169  }
std::shared_ptr< MultiBspline1D< ST > > SplineInst
1D spline of radial functions of all the orbitals

Member Data Documentation

◆ BaseN

int BaseN
private

◆ center_pos

◆ coef_copy_

std::shared_ptr<std::vector<ST> > coef_copy_
private

coef copy for orbital rotation

Definition at line 61 of file HybridRepCenterOrbitals.h.

Referenced by AtomicOrbitals< ST >::applyRotation(), and AtomicOrbitals< ST >::storeParamsBeforeRotation().

◆ cutoff

ST cutoff
private

◆ cutoff_buffer

ST cutoff_buffer
private

◆ D

const int D = 3
static

Definition at line 36 of file HybridRepCenterOrbitals.h.

◆ l_vals

◆ lm_tot

◆ lmax

◆ localG

◆ localL

◆ localV

◆ non_overlapping_radius

ST non_overlapping_radius
private

◆ Npad

◆ NumBands

int NumBands
private

Definition at line 52 of file HybridRepCenterOrbitals.h.

Referenced by AtomicOrbitals< ST >::resizeStorage().

◆ r_power_minus_l

vContainer_type r_power_minus_l
private

◆ rmin

ST rmin
private

◆ rmin_sqrt

ST rmin_sqrt
private

◆ spline_npoints

◆ spline_radius

◆ SplineInst

◆ Ylm


The documentation for this class was generated from the following file: