ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions
projgen.cpp File Reference
#include "projgen.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <numeric>
#include "source_base/cubic_spline.h"
#include "source_base/math_integral.h"
#include "source_base/math_sphbes.h"
Include dependency graph for projgen.cpp:

Functions

void projgen (const int l, const int nr, const double *r, const double *chi, const double rcut, const int nbes, std::vector< double > &alpha)
 Generates a projector's radial function for DFT+U.
 
void smoothgen (const int nr, const double *r, const double *chi, const double rcut, std::vector< double > &alpha)
 

Function Documentation

◆ projgen()

void projgen ( const int  l,
const int  nr,
const double *  r,
const double *  chi,
const double  rcut,
const int  nbes,
std::vector< double > &  alpha 
)

Generates a projector's radial function for DFT+U.

Starting with a numerical radial function chi on grid r with angular momentum l, given a smaller cutoff radius rcut and the number of spherical Bessel components (j_l), this function generates a new radial function alpha of the same l on the truncated grid which satisfies the following conditions:

  • alpha = \sum_p j_l(theta[p]*r/rcut) * c[p] where theta[p] is the p-th zero of j_l;
  • \int_0^rcut alpha(r) r^2 dr = 1 (normalization);
  • \int_0^rcut alpha(r) chi(r) r^2 dr is maximized;
Parameters
[in]langular momentum
[in]nrnumber of grid points
[in]rradial grid
[in]chiradial function
[in]rcutcutoff radius of the projector
[in]nbesnumber of spherical Bessel components
[out]alphanew radial function of the projector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ smoothgen()

void smoothgen ( const int  nr,
const double *  r,
const double *  chi,
const double  rcut,
std::vector< double > &  alpha 
)
Here is the call graph for this function:
Here is the caller graph for this function: