|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
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. | |
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.
| void pseudopot::complete_default_h | ( | Atom_pseudo & | pp | ) |
Fill in the header-level defaults of an Atom_pseudo.
| int pseudopot::set_pseudo_type | ( | const std::string & | fn, |
| std::string & | type ) |
Set pseudopotential type based on the file's header line.
| 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).
| nqf | number of polynomial coefficients |
| mesh | number of mesh points |
| l | angular momentum |
| n | additional exponent, result is multiplied by r^n |
| qfcoef | polynomial coefficients |
| r | radial mesh |
| rho | output: r^n * Q(r) |
| std::string & pseudopot::trim | ( | std::string & | in_str | ) |
Remove every tab and space from a string, in place.