Functions | |
| std::vector< Real > | build_compensation_shape (int angular_momentum, Real augmentation_radius, const std::vector< Real > &radial_grid, int mesh_size) |
| Real | partial_wave_moment (const PawPseudopotential &pseudopotential, int first_channel, int second_channel, int angular_momentum) |
| Real | spherical_bessel_derivative (int degree, Real argument) |
| d/dx j_L(x), from the standard recurrence. | |
| std::vector< Real > | spherical_bessel_zeros (int degree, int count) |
| void | synthesize_augmentation_functions (PawPseudopotential &pseudopotential) |
|
inline |
A unit-moment compensation shape for one angular momentum.
Returns G_L(r), r-weighted and confined to r ≤ r_aug, satisfying ∫ G_L(r) r^L dr = 1. Multiply by a channel's moment to obtain its Q_ij^L(r).
Moment of each Bessel component, and its slope at the boundary.
The integral is normalized in the continuum, the modern default; a legacy compatibility mode some codes keep normalizes on the discrete mesh instead. Use the exact identity
integral_0^R j_L(q r) r^(L+2) dr = R^(L+2) j_(L+1)(q R) / q
so the construction follows the continuous convention without adding another quadrature error. The old mesh-normalized form matched the legacy mode instead and was most visible for Cu d channels in the absolute parity gate.
Solve a₁·m₁ + a₂·m₂ = 1 (unit moment) a₁·s₁ + a₂·s₂ = 0 (no kink at the boundary)
Definition at line 107 of file compensation_charge.hpp.
References q3::spherical_bessel(), spherical_bessel_derivative(), and spherical_bessel_zeros().
Referenced by synthesize_augmentation_functions().
|
inline |
Multipole moment ∫(φ_i φ_j − φ̃_i φ̃_j) r^L dr for one radial channel pair.
The quantity the compensation charge must reproduce. Identical to the check in paw/validation.hpp, promoted here because it is now production input rather than only a dataset sanity test.
Definition at line 178 of file compensation_charge.hpp.
References q3::Pseudopotential::mesh_size, q3::PawPseudopotential::partial_waves_all_electron, q3::PawPseudopotential::partial_waves_pseudo, q3::Pseudopotential::radial_grid, q3::Pseudopotential::radial_grid_derivative, and q3::simpson_rule().
Referenced by synthesize_augmentation_functions().
d/dx j_L(x), from the standard recurrence.
Definition at line 91 of file compensation_charge.hpp.
References q3::spherical_bessel().
Referenced by build_compensation_shape().
|
inline |
The first count positive zeros of j_L, by scan-and-bisect.
A closed form exists only for L = 0 (multiples of π); for higher L the zeros are found numerically, which is cheap because only two are ever needed per channel.
Definition at line 61 of file compensation_charge.hpp.
References q3::spherical_bessel().
Referenced by build_compensation_shape().
|
inline |
Fill augmentation_function_by_angular_momentum for a dataset that does not ship it.
A no-op when the dataset already has them: a UPF PAW file's own Q_ij^L are the generator's, and replacing them with a synthesized shape would discard information the file actually contains.
Channels the triangle condition forbids carry no compensation charge — the same selection rule the UPF datasets encode as exact zeros.
Definition at line 208 of file compensation_charge.hpp.
References q3::PawPseudopotential::augmentation_cutoff_radius, q3::UltrasoftPseudopotential::augmentation_function_by_angular_momentum, build_compensation_shape(), q3::Pseudopotential::mesh_size, q3::Pseudopotential::number_of_projectors, q3::UltrasoftPseudopotential::number_of_q_angular_momenta, partial_wave_moment(), q3::PawPseudopotential::partial_waves_pseudo, and q3::Pseudopotential::radial_grid.