ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
pseudopot Namespace Reference

Helpers that the pseudopotential reader uses but that hold no state. More...

Functions

int set_pseudo_type (const std::string &fn, std::string &type)
 Set pseudopotential type based on the file's header line.
std::string & trim (std::string &in_str)
 Remove every tab and space from a string, in place.
void setqfnew (const int &nqf, const int &mesh, const int &l, const int &n, const double *qfcoef, const double *r, double *rho)
 Compute the Q function from its polynomial expansion (r < rinner).
void complete_default_h (Atom_pseudo &pp)
 Fill in the header-level defaults of an Atom_pseudo.

Detailed Description

Helpers that the pseudopotential reader uses but that hold no state.

These were private members of Pseudopot_upf, which meant their unit tests had to reach past access control to call them. None of them touches this: they work entirely on their arguments, so they are plain functions and are declared here as such – publicly callable and directly testable, without widening the interface of Pseudopot_upf.

Function Documentation

◆ complete_default_h()

void pseudopot::complete_default_h ( Atom_pseudo & pp)

Fill in the header-level defaults of an Atom_pseudo.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pseudo_type()

int pseudopot::set_pseudo_type ( const std::string & fn,
std::string & type )

Set pseudopotential type based on the file's header line.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setqfnew()

void pseudopot::setqfnew ( const int & nqf,
const int & mesh,
const int & l,
const int & n,
const double * qfcoef,
const double * r,
double * rho )

Compute the Q function from its polynomial expansion (r < rinner).

Parameters
nqfnumber of polynomial coefficients
meshnumber of mesh points
langular momentum
nadditional exponent, result is multiplied by r^n
qfcoefpolynomial coefficients
rradial mesh
rhooutput: r^n * Q(r)
Here is the caller graph for this function:

◆ trim()

std::string & pseudopot::trim ( std::string & in_str)

Remove every tab and space from a string, in place.

Here is the call graph for this function:
Here is the caller graph for this function: