Octopus
paw_ae_reconstruction_oct_m Module Reference

All-electron reconstruction of mesh fields from the PAW one-center terms. More...

Detailed Description

All-electron reconstruction of mesh fields from the PAW one-center terms.

The smooth (pseudized) mesh quantities are corrected by the one-center differences built by the radial engine (paw_onsite): the density n^1 - (n~^1 + nhat), the kinetic-energy density tau^1 - tau~^1 and the current j^1 - j~^1, splatted onto the augmentation submeshes with the same radial x Y_LM double-grid transform used for the compensation charge. These are output-time (or per-TD-step, for the current) reconstructions: they do not touch the SCF, energies or forces.

Functions/Subroutines

subroutine, public paw_ae_reconstruct_field (this, epot, mesh, density, tau, current)
 Reconstruct all-electron mesh fields from the PAW one-center terms. Any subset of the supported quantities can be requested through optional arguments, a la states_elec_calc_quantities; each is accumulated in place. More...
 
subroutine paw_splat_onsite_columns (dgrid, sphere, ncol, spl, ll, mm, rcut, field_col, cache)
 Splat the radial x Y_LM columns of a one-center difference (spl/ll/mm from paw_onsite_density_diff / paw_onsite_tau_diff) onto one spin channel of a mesh field, summing the columns. Frees spl/ll/mm on exit. More...
 
subroutine, public paw_ae_build_current_basis (this, epot, dim)
 Tabulate the one-center all-electron current basis on each projector sphere. More...
 
subroutine, public paw_ae_add_onsite_current (this, epot, current)
 Add the time-dependent one-center all-electron current to the current density. More...
 

Function/Subroutine Documentation

◆ paw_ae_reconstruct_field()

subroutine, public paw_ae_reconstruction_oct_m::paw_ae_reconstruct_field ( class(nonlocal_pseudopotential_t), intent(in), target  this,
type(epot_t), intent(in), target  epot,
class(mesh_t), intent(in)  mesh,
real(real64), dimension(:, :), intent(inout), optional  density,
real(real64), dimension(:, :), intent(inout), optional  tau,
real(real64), dimension(:, :, :), intent(inout), optional  current 
)

Reconstruct all-electron mesh fields from the PAW one-center terms. Any subset of the supported quantities can be requested through optional arguments, a la states_elec_calc_quantities; each is accumulated in place.

  • density: n_AE = strho + sum_a [ n^1_a - (ntilde^1_a + nhat_a) ]. The smooth mesh density already carries the compensation charge nhat (Kresse-Joubert), and the neutrality sum rule int(ntilde^1 + nhat) = int n^1 keeps the integrated charge unchanged.
  • tau: the all-electron kinetic-energy density, tau_AE = tautilde + sum_a (tau^1_a - tautilde^1_a).

For each PAW atom the radial one-center differences (per collinear spin) are built by the one-center engine (paw_onsite_density_diff / paw_onsite_tau_diff), splatted onto the augmentation submesh with the same radial x Y_LM transform used for the compensation charge (double_grid_transform), and scattered onto the mesh. The (expensive) one-center density-matrix assembly is shared across the requested quantities.

This is an output-time reconstruction: it does not touch strho, the SCF, energies or forces.

Parameters
[in,out]density(meshnp, nspin), accumulated
[in,out]tau(meshnp, nspin), accumulated
[in,out]currentAll-electron current-density correction

Definition at line 146 of file paw_ae_reconstruction.F90.

◆ paw_splat_onsite_columns()

subroutine paw_ae_reconstruction_oct_m::paw_splat_onsite_columns ( type(double_grid_t), intent(in)  dgrid,
type(submesh_t), intent(in)  sphere,
integer, intent(in)  ncol,
type(spline_t), dimension(:), intent(inout), allocatable  spl,
integer, dimension(:), intent(inout), allocatable  ll,
integer, dimension(:), intent(inout), allocatable  mm,
real(real64), intent(in)  rcut,
real(real64), dimension(:), intent(inout)  field_col,
type(double_grid_cache_t), intent(in), optional  cache 
)
private

Splat the radial x Y_LM columns of a one-center difference (spl/ll/mm from paw_onsite_density_diff / paw_onsite_tau_diff) onto one spin channel of a mesh field, summing the columns. Frees spl/ll/mm on exit.

Parameters
[in,out]field_col(meshnp), accumulated
[in]cacheprecomputed geometry for sphere

Definition at line 242 of file paw_ae_reconstruction.F90.

◆ paw_ae_build_current_basis()

subroutine, public paw_ae_reconstruction_oct_m::paw_ae_build_current_basis ( class(nonlocal_pseudopotential_t), intent(in), target  this,
type(epot_t), intent(in), target  epot,
integer, intent(in)  dim 
)

Tabulate the one-center all-electron current basis on each projector sphere.

For every projector pair (i,j) and Cartesian direction alpha, the mesh field of the current density j^1_alpha - j~^1_alpha of the unit density-matrix (paw_onsite_current_diff, splatted with the double grid) is stored in projaugjbasis(:, (i-1)*nprojs+j, alpha). This is done once (geometry-only, like qflm) so the time-dependent on-site current can be added to stcurrent with no per-step double-grid transform. Only the s-p-type pairs (velocity connects l and l+-1) give nonzero columns; the rest leave jbasis at zero.

Definition at line 287 of file paw_ae_reconstruction.F90.

◆ paw_ae_add_onsite_current()

subroutine, public paw_ae_reconstruction_oct_m::paw_ae_add_onsite_current ( class(nonlocal_pseudopotential_t), intent(in), target  this,
type(epot_t), intent(in), target  epot,
real(real64), dimension(:, :, :), intent(inout)  current 
)

Add the time-dependent one-center all-electron current to the current density.

Using the tabulated basis, current(:, alpha, s) += sum_ij Im[rho_ij] jbasis(:, (i,j), alpha), where Im[rho_ij] is the antisymmetric one-center current matrix accumulated during the density calculation. This is the current analogue of the qflm augmentation charge added to strho: no double-grid transform is done here (the geometry is baked into jbasis), just one matrix-vector product per sphere and direction. It makes stcurrent the all-electron current j~ + (j^1 - j~^1), so both the integrated total_current and the spatially-resolved output carry the one-center part.

Parameters
[in,out]current(meshnp, dim, nspin)

Definition at line 403 of file paw_ae_reconstruction.F90.