(git:3d5d2e5)
Loading...
Searching...
No Matches
uspp_augmentation Module Reference

Direct reciprocal-space reference for scalar UPF augmentation. Uses the complete tabulated radial mesh and CP2K real spherical harmonics. The overlap correction is the zero-frequency limit of this same transform. More...

Data Types

type  uspp_augmentation_type

Functions/Subroutines

subroutine, public uspp_augmentation_init (pot, projectors, augmentation)
 Prepare radial quadrature and Gaunt coefficients in the native beta convention.
subroutine, public uspp_augmentation_prepare_realspace (pot, augmentation)
 Prepare regular radial splines for atom-grid augmentation quadrature. UPF stores r**2 Q_ij^L(r). Interpolate Q_ij^L(r)/r**L in r**2 and multiply by solid harmonics, so values and Cartesian derivatives remain regular at the origin. The existing reciprocal-space quadrature and its overlap correction are unchanged.
subroutine, public uspp_augmentation_realspace (augmentation, displacement, qr, gradient, hessian)
 Evaluate the augmentation matrix and derivatives at a Cartesian displacement. Uses cubic splines with a C2 quintic closure into an exact tabulated zero suffix. Values, gradients and Hessians share the same polynomial. No angular division by radius is needed, including at the center and on coordinate axes.
subroutine, public uspp_augmentation_collocate_atom (augmentation, displacements, density, rho, gradient)
 Add one center's augmentation density and gradient to arbitrary atom-grid points.
subroutine, public uspp_augmentation_integrate_atom (augmentation, displacements, weights, v_rho, v_gradient, matrix, density, center_gradient, point_gradient)
 Adjoint of the atom-grid density map, including the GGA gradient term.
subroutine, public uspp_augmentation_prepare_fourier (augmentation, gvecs, max_bytes)
 Cache exact radial transforms for repeated reciprocal-vector lengths. The retained arrays are bounded; uncached lengths use direct quadrature. Initialization of a new augmentation object also releases this cache.
subroutine, public uspp_augmentation_fourier (augmentation, g, position, volume, qg, strain, grid_index)
 Evaluate Q_ij(G) = integral Q_ij(r-R) exp(-i G.r) dr / volume. Direct radial quadrature is a reference without reciprocal interpolation.
subroutine, public uspp_augmentation_collocate (augmentation, gvecs, position, volume, density_matrix, rho)
 Add the augmentation density on a list of reciprocal vectors.
subroutine, public uspp_augmentation_integrate (augmentation, gvecs, position, volume, vg, multiplicity, matrix, derivative, strain)
 Adjoint of augmentation collocation: integrate a real local potential against Q.

Detailed Description

Direct reciprocal-space reference for scalar UPF augmentation. Uses the complete tabulated radial mesh and CP2K real spherical harmonics. The overlap correction is the zero-frequency limit of this same transform.

Function/Subroutine Documentation

◆ uspp_augmentation_init()

subroutine, public uspp_augmentation::uspp_augmentation_init ( type(atom_upfpot_type), intent(in) pot,
type(upf_projector_type), intent(in) projectors,
type(uspp_augmentation_type), intent(out) augmentation )

Prepare radial quadrature and Gaunt coefficients in the native beta convention.

Parameters
potOriginal scalar USPP with angular-resolved augmentation.
projectorsPrepared native projectors, with Cartesian degree at least max(lbeta).
augmentationImmutable augmentation data, in the same magnetic-projector ordering.

Definition at line 62 of file uspp_augmentation.F.

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

◆ uspp_augmentation_prepare_realspace()

subroutine, public uspp_augmentation::uspp_augmentation_prepare_realspace ( type(atom_upfpot_type), intent(in) pot,
type(uspp_augmentation_type), intent(inout) augmentation )

Prepare regular radial splines for atom-grid augmentation quadrature. UPF stores r**2 Q_ij^L(r). Interpolate Q_ij^L(r)/r**L in r**2 and multiply by solid harmonics, so values and Cartesian derivatives remain regular at the origin. The existing reciprocal-space quadrature and its overlap correction are unchanged.

Parameters
potOriginal scalar USPP used to initialize augmentation.
augmentationPrepared angular data; owns the optional real-space cache on return.

Definition at line 138 of file uspp_augmentation.F.

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

◆ uspp_augmentation_realspace()

subroutine, public uspp_augmentation::uspp_augmentation_realspace ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(3), intent(in) displacement,
real(kind=dp), dimension(:, :), intent(out) qr,
real(kind=dp), dimension(:, :, :), intent(out), optional gradient,
real(kind=dp), dimension(:, :, :, :), intent(out), optional hessian )

Evaluate the augmentation matrix and derivatives at a Cartesian displacement. Uses cubic splines with a C2 quintic closure into an exact tabulated zero suffix. Values, gradients and Hessians share the same polynomial. No angular division by radius is needed, including at the center and on coordinate axes.

Parameters
augmentationData with an initialized real-space cache.
displacementEvaluation point minus augmentation center, in bohr.
qrSymmetric Q_ij(r), without radial Jacobian or quadrature weights.
gradientOptional Cartesian gradient of qr with respect to the evaluation point.
hessianOptional Cartesian Hessian of qr, also needed for GGA geometry derivatives.

Definition at line 198 of file uspp_augmentation.F.

Here is the caller graph for this function:

◆ uspp_augmentation_collocate_atom()

subroutine, public uspp_augmentation::uspp_augmentation_collocate_atom ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(:, :), intent(in) displacements,
real(kind=dp), dimension(:, :), intent(in) density,
real(kind=dp), dimension(:), intent(inout) rho,
real(kind=dp), dimension(:, :), intent(inout) gradient )

Add one center's augmentation density and gradient to arbitrary atom-grid points.

Parameters
augmentationData with an initialized real-space cache.
displacementsCartesian quadrature points relative to this center, in bohr.
densityReal symmetric on-site density matrix, including off-diagonal entries.
rhoAccumulated density values; no quadrature weights included.
gradientAccumulated Cartesian density gradients.

Definition at line 368 of file uspp_augmentation.F.

Here is the caller graph for this function:

◆ uspp_augmentation_integrate_atom()

subroutine, public uspp_augmentation::uspp_augmentation_integrate_atom ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(:, :), intent(in) displacements,
real(kind=dp), dimension(:), intent(in) weights,
real(kind=dp), dimension(:), intent(in) v_rho,
real(kind=dp), dimension(:, :), intent(in) v_gradient,
real(kind=dp), dimension(:, :), intent(out) matrix,
real(kind=dp), dimension(:, :), intent(in), optional density,
real(kind=dp), dimension(3), intent(out), optional center_gradient,
real(kind=dp), dimension(:, :), intent(out), optional point_gradient )

Adjoint of the atom-grid density map, including the GGA gradient term.

Parameters
augmentationData with an initialized real-space cache.
displacementsCartesian quadrature points relative to this center, in bohr.
weightsQuadrature weights, optionally signed for a hard/soft energy difference.
v_rhoDerivative of the energy density with respect to density, without weights.
v_gradientDerivative with respect to the Cartesian density gradient, without weights.
matrixResulting symmetric on-site operator.
densityOptional on-site density, required for center_gradient.
center_gradientOptional energy gradient from translating this center at fixed grid points. Projector, moving-grid and partition-weight derivatives are separate contributions.
point_gradientOptional energy gradient of each quadrature point at fixed center and weights.

Definition at line 414 of file uspp_augmentation.F.

Here is the caller graph for this function:

◆ uspp_augmentation_prepare_fourier()

subroutine, public uspp_augmentation::uspp_augmentation_prepare_fourier ( type(uspp_augmentation_type), intent(inout) augmentation,
real(dp), dimension(:, :), intent(in) gvecs,
integer(int_8), intent(in), optional max_bytes )

Cache exact radial transforms for repeated reciprocal-vector lengths. The retained arrays are bounded; uncached lengths use direct quadrature. Initialization of a new augmentation object also releases this cache.

Parameters
augmentationPrepared radial data, with the cache updated in place.
gvecsLocal Cartesian reciprocal vectors, in their current ordering.
max_bytesOptional retained-memory limit per kind and rank (default 64 MiB).

Definition at line 486 of file uspp_augmentation.F.

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

◆ uspp_augmentation_fourier()

subroutine, public uspp_augmentation::uspp_augmentation_fourier ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(3), intent(in) g,
real(kind=dp), dimension(3), intent(in) position,
real(kind=dp), intent(in) volume,
complex(kind=dp), dimension(:, :), intent(out) qg,
complex(kind=dp), dimension(:, :, :, :), intent(out), optional strain,
integer, intent(in), optional grid_index )

Evaluate Q_ij(G) = integral Q_ij(r-R) exp(-i G.r) dr / volume. Direct radial quadrature is a reference without reciprocal interpolation.

Parameters
augmentationPrepared data.
gCartesian reciprocal vector in inverse bohr.
positionAugmentation center in bohr.
volumeCell volume in bohr cubed.
qgComplex symmetric form-factor matrix. Q(-G) = conjugate(Q(G)).
strainOptional dQ/d epsilon_ab at fixed fractional center and reciprocal index. Includes the inverse-volume derivative; the center phase is strain invariant.
grid_indexOptional index in the prepared Fourier cache; absent entries use direct quadrature.

Definition at line 595 of file uspp_augmentation.F.

Here is the caller graph for this function:

◆ uspp_augmentation_collocate()

subroutine, public uspp_augmentation::uspp_augmentation_collocate ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(:, :), intent(in) gvecs,
real(kind=dp), dimension(3), intent(in) position,
real(kind=dp), intent(in) volume,
real(kind=dp), dimension(:, :), intent(in) density_matrix,
complex(kind=dp), dimension(:), intent(inout) rho )

Add the augmentation density on a list of reciprocal vectors.

Parameters
augmentationPrepared data.
gvecsCartesian reciprocal vectors (3,ng).
positionCenter in bohr.
volumeCell volume.
density_matrixReal symmetric projector density matrix, with occupations included.
rhoFourier density coefficients (integral divided by volume), accumulated in place.

Definition at line 716 of file uspp_augmentation.F.

Here is the call graph for this function:

◆ uspp_augmentation_integrate()

subroutine, public uspp_augmentation::uspp_augmentation_integrate ( type(uspp_augmentation_type), intent(in) augmentation,
real(kind=dp), dimension(:, :), intent(in) gvecs,
real(kind=dp), dimension(3), intent(in) position,
real(kind=dp), intent(in) volume,
complex(kind=dp), dimension(:), intent(in) vg,
real(kind=dp), dimension(:), intent(in) multiplicity,
real(kind=dp), dimension(:, :), intent(out) matrix,
real(kind=dp), dimension(:, :, :), intent(out), optional derivative,
real(kind=dp), dimension(:, :, :, :), intent(out), optional strain )

Adjoint of augmentation collocation: integrate a real local potential against Q.

Parameters
augmentationPrepared data.
gvecsCartesian reciprocal vectors (3,ng).
positionCenter in bohr.
volumeCell volume.
vgFourier potential coefficients (integral divided by volume).
multiplicityOne for a complete reciprocal list; two for a retained +/-G pair.
matrixReal symmetric screened projector contribution, overwritten.
derivativeOptional derivatives of matrix with respect to the augmentation center.
strainOptional density strain contribution at fixed Fourier potential and volume weight.

Definition at line 746 of file uspp_augmentation.F.

Here is the call graph for this function: