Octopus
paw_onsite_oct_m::paw_sphere_t Type Reference

Per-species, geometry-independent one-center data. Built once at setup and immutable during the SCF; the compute routine only reads it. More...

Detailed Description

Per-species, geometry-independent one-center data. Built once at setup and immutable during the SCF; the compute routine only reads it.

Definition at line 190 of file paw_onsite.F90.

Private Attributes

integer nspin = 1
 number of spin components of rho/dij More...
 
integer spin_channels = 1
 number of spin channels (1 or 2) More...
 
real(real64) rc = M_ZERO
 radius of the augmentation sphere More...
 
integer nr = 0
 number of radial points inside the sphere More...
 
real(real64), dimension(:), allocatable r
 r_k More...
 
real(real64), dimension(:), allocatable r2
 r_k^2 More...
 
real(real64), dimension(:), allocatable invr
 1/r_k, defined as 0 at the origin (r_k = 0), so the radial-gradient angular terms (phi/r) need no branch in the hot loops More...
 
real(real64), dimension(:), allocatable wr
 native radial weights: int f dr = sum f_k wr_k More...
 
real(real64), dimension(:), allocatable vwr
 radial volume weight r_k^2 wr_k: int f r^2 dr = sum f_k vwr_k More...
 
integer nrad = 0
 number of radial partial waves More...
 
integer, dimension(:), allocatable lrad
 l of each radial partial wave More...
 
real(real64), dimension(:,:), allocatable phi_ae
 (nr, nrad) AE partial wave phi_i(r) More...
 
real(real64), dimension(:,:), allocatable phi_ps
 (nr, nrad) PS partial wave phitilde_i(r) More...
 
integer, dimension(:), allocatable rad_2j
 (nrad) 2j of each partial wave (0 for scalar-relativistic datasets) More...
 
logical has_small = .false.
 fully-relativistic dataset with small components More...
 
real(real64), dimension(:,:), allocatable phi_ae_small
 (nr, nrad) small component of the AE waves More...
 
integer nlm = 0
 total number of (radial, m) projectors More...
 
integer, dimension(:), allocatable p_rad
 (nlm) radial channel of projector More...
 
integer, dimension(:), allocatable p_l
 (nlm) l of projector More...
 
integer, dimension(:), allocatable p_m
 (nlm) m of projector More...
 
integer laug = -1
 max L of the augmentation More...
 
real(real64), dimension(:,:,:), allocatable qaug
 (nr, npair, 0:laug) Qhat_{ij}^L(r) More...
 
integer npair = 0
 The one-center densities, D-matrix accumulations and GGA pair gradients all contract rho_ij (or v_LM) with the species-constant radial pair products phi_i phi_j and the real Gaunt coefficients int Y_{l_i m_i} Y_{l_j m_j} Y_{LM} dOmega. More...
 
real(real64), dimension(:,:), allocatable pair_ae
 (nr, npair) phi_i(r) phi_j(r) More...
 
real(real64), dimension(:,:), allocatable pair_ps
 (nr, npair) phitilde_i(r) phitilde_j(r) More...
 
integer ngnt = 0
 number of nonzero Gaunt couplings (i, j, L, M) More...
 
integer, dimension(:), allocatable gnt_pair
 (ngnt) radial pair index of each coupling More...
 
integer, dimension(:), allocatable gnt_l
 (ngnt) L of each coupling (the qaug channel) More...
 
integer, dimension(:), allocatable gnt_lm
 (ngnt) packed (L,M) index L(L+1)+M+1 More...
 
real(real64), dimension(:), allocatable gnt_c
 (ngnt) real Gaunt coefficient More...
 
integer, dimension(:), allocatable gnt_ptr
 (nlm*nlm+1) CSR offsets: the couplings of the projector pair (i, j) are gnt_ptr(ij) to gnt_ptr(ij+1)-1 with ij = (i-1)*nlm + j More...
 
real(real64), dimension(:,:), allocatable dpair_ae
 (nr, npair) d(phi_i phi_j)/dr More...
 
real(real64), dimension(:,:), allocatable dpair_ps
 (nr, npair) d(phitilde_i phitilde_j)/dr More...
 
real(real64), dimension(:,:,:), allocatable dqaug
 (nr, npair, 0:laug) d Qhat_{ij}^L/dr More...
 
real(real64), dimension(:), allocatable nc_ae_der
 (nr) d n_c^AE/dr More...
 
real(real64), dimension(:), allocatable nc_ps_der
 (nr) d n_c^PS/dr More...
 
integer der_nw = 5
 Five-point Fornberg finite-difference weights on the (nonuniform) radial grid inside the sphere: df(k) = sum_w der_w(w, k) f(der_i0(k)+w-1). Built once at init; applying it and its transpose is allocation-free and O(nr). It is only used by the moment expansion of the GGA one-center XC (paw_xc_moments), which needs a linear operator on the sphere grid together with its discrete adjoint. All the other radial derivatives are the precomputed full-grid ones above. More...
 
real(real64), dimension(:,:), allocatable der_w
 (der_nw, nr) derivative weights per radial point More...
 
integer, dimension(:), allocatable der_i0
 (nr) leftmost stencil index per radial point More...
 
integer der_ntw = 0
 
real(real64), dimension(:,:), allocatable der_wt
 (der_ntw, nr) transposed weights per output point More...
 
integer, dimension(:), allocatable der_trow0
 (nr) first contributing row per output point More...
 
integer, dimension(:), allocatable der_tn
 (nr) number of contributing rows per output point More...
 
logical has_ae_core = .false.
 
logical has_ps_core = .false.
 
real(real64), dimension(:), allocatable nc_ae
 (nr) AE core density n_c(r) More...
 
real(real64), dimension(:), allocatable nc_ps
 (nr) PS core density ntilde_c(r) More...
 
real(real64), dimension(:), allocatable vref_ae
 (nr) AE reference potential (Ha): -Z/r + v_H[core] More...
 
real(real64), dimension(:), allocatable vref_ps
 (nr) PS reference potential vbar (Ha) More...
 
real(real64), dimension(:,:), allocatable kin_ae
 (nrad, nrad) <phi_i|T|phi_j> More...
 
real(real64), dimension(:,:), allocatable kin_ps
 (nrad, nrad) <phitilde_i|T|phitilde_j> More...
 
integer nang = 0
 number of angular points More...
 
integer lmax_rho = 0
 max L of the density expansion (= 2 max l) More...
 
integer nlm_rho = 0
 (lmax_rho+1)^2 More...
 
real(real64), dimension(:), allocatable wang
 (nang) angular weights (int dOmega) More...
 
real(real64), dimension(:,:), allocatable ylm
 (nang, nlm_rho) real spherical harmonics More...
 
real(real64), dimension(:,:), allocatable dylm_dth
 (nang, nlm_rho) dY_LM/dtheta (GGA) More...
 
real(real64), dimension(:,:), allocatable dylm_dph
 (nang, nlm_rho) (1/sin theta) dY_LM/dphi (GGA) More...
 
real(real64), dimension(:,:), allocatable wylm
 (nang, nlm_rho) quadrature-weighted Y_LM More...
 
real(real64), dimension(:,:), allocatable wdylm_dth
 (nang, nlm_rho) quadrature-weighted dY_LM/dtheta More...
 
real(real64), dimension(:,:), allocatable wdylm_dph
 (nang, nlm_rho) quadrature-weighted (1/sin theta) dY_LM/dphi More...
 
real(real64), dimension(:,:), allocatable rhat
 Cartesian components of the spherical orthonormal basis at each angular point, used to build the Cartesian gradient of phi(r) Y_LM(Omega) for the one-center current: rhat = radial, that = theta, phat = phi. grad(phi Y) = phi` Y rhat + (phi/r)(dY/dth that + (1/sin th)dY/dph phat). More...
 
real(real64), dimension(:,:), allocatable that
 (nang, 3) theta unit vector More...
 
real(real64), dimension(:,:), allocatable phat
 (nang, 3) phi unit vector More...
 
integer formulation = PAW_KRESSE_JOUBERT
 
type(xc_functional_t), dimension(2) xc_functl
 Exchange and correlation functionals, taken from the pseudopotential. More...
 
logical xc_is_gga = .false.
 set if either functional needs the density gradient More...
 
integer xc_scheme = PAW_XC_SCHEME_MOMENTS
 one-center XC scheme More...
 

Member Data Documentation

◆ nspin

integer paw_onsite_oct_m::paw_sphere_t::nspin = 1
private

number of spin components of rho/dij

Definition at line 192 of file paw_onsite.F90.

◆ spin_channels

integer paw_onsite_oct_m::paw_sphere_t::spin_channels = 1
private

number of spin channels (1 or 2)

Definition at line 193 of file paw_onsite.F90.

◆ rc

real(real64) paw_onsite_oct_m::paw_sphere_t::rc = M_ZERO
private

radius of the augmentation sphere

Definition at line 196 of file paw_onsite.F90.

◆ nr

integer paw_onsite_oct_m::paw_sphere_t::nr = 0
private

number of radial points inside the sphere

Definition at line 197 of file paw_onsite.F90.

◆ r

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::r
private

r_k

Definition at line 198 of file paw_onsite.F90.

◆ r2

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::r2
private

r_k^2

Definition at line 199 of file paw_onsite.F90.

◆ invr

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::invr
private

1/r_k, defined as 0 at the origin (r_k = 0), so the radial-gradient angular terms (phi/r) need no branch in the hot loops

Definition at line 200 of file paw_onsite.F90.

◆ wr

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::wr
private

native radial weights: int f dr = sum f_k wr_k

Definition at line 203 of file paw_onsite.F90.

◆ vwr

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::vwr
private

radial volume weight r_k^2 wr_k: int f r^2 dr = sum f_k vwr_k

Definition at line 204 of file paw_onsite.F90.

◆ nrad

integer paw_onsite_oct_m::paw_sphere_t::nrad = 0
private

number of radial partial waves

Definition at line 207 of file paw_onsite.F90.

◆ lrad

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::lrad
private

l of each radial partial wave

Definition at line 208 of file paw_onsite.F90.

◆ phi_ae

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::phi_ae
private

(nr, nrad) AE partial wave phi_i(r)

Definition at line 209 of file paw_onsite.F90.

◆ phi_ps

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::phi_ps
private

(nr, nrad) PS partial wave phitilde_i(r)

Definition at line 210 of file paw_onsite.F90.

◆ rad_2j

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::rad_2j
private

(nrad) 2j of each partial wave (0 for scalar-relativistic datasets)

Definition at line 211 of file paw_onsite.F90.

◆ has_small

logical paw_onsite_oct_m::paw_sphere_t::has_small = .false.
private

fully-relativistic dataset with small components

Definition at line 212 of file paw_onsite.F90.

◆ phi_ae_small

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::phi_ae_small
private

(nr, nrad) small component of the AE waves

Definition at line 213 of file paw_onsite.F90.

◆ nlm

integer paw_onsite_oct_m::paw_sphere_t::nlm = 0
private

total number of (radial, m) projectors

Definition at line 216 of file paw_onsite.F90.

◆ p_rad

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::p_rad
private

(nlm) radial channel of projector

Definition at line 217 of file paw_onsite.F90.

◆ p_l

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::p_l
private

(nlm) l of projector

Definition at line 218 of file paw_onsite.F90.

◆ p_m

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::p_m
private

(nlm) m of projector

Definition at line 219 of file paw_onsite.F90.

◆ laug

integer paw_onsite_oct_m::paw_sphere_t::laug = -1
private

max L of the augmentation

Definition at line 222 of file paw_onsite.F90.

◆ qaug

real(real64), dimension(:,:,:), allocatable paw_onsite_oct_m::paw_sphere_t::qaug
private

(nr, npair, 0:laug) Qhat_{ij}^L(r)

Definition at line 223 of file paw_onsite.F90.

◆ npair

integer paw_onsite_oct_m::paw_sphere_t::npair = 0
private

The one-center densities, D-matrix accumulations and GGA pair gradients all contract rho_ij (or v_LM) with the species-constant radial pair products phi_i phi_j and the real Gaunt coefficients int Y_{l_i m_i} Y_{l_j m_j} Y_{LM} dOmega.

nrad*(nrad+1)/2 packed (i <= j) radial channel pairs

Definition at line 229 of file paw_onsite.F90.

◆ pair_ae

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::pair_ae
private

(nr, npair) phi_i(r) phi_j(r)

Definition at line 230 of file paw_onsite.F90.

◆ pair_ps

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::pair_ps
private

(nr, npair) phitilde_i(r) phitilde_j(r)

Definition at line 231 of file paw_onsite.F90.

◆ ngnt

integer paw_onsite_oct_m::paw_sphere_t::ngnt = 0
private

number of nonzero Gaunt couplings (i, j, L, M)

Definition at line 232 of file paw_onsite.F90.

◆ gnt_pair

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::gnt_pair
private

(ngnt) radial pair index of each coupling

Definition at line 233 of file paw_onsite.F90.

◆ gnt_l

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::gnt_l
private

(ngnt) L of each coupling (the qaug channel)

Definition at line 234 of file paw_onsite.F90.

◆ gnt_lm

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::gnt_lm
private

(ngnt) packed (L,M) index L(L+1)+M+1

Definition at line 235 of file paw_onsite.F90.

◆ gnt_c

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::gnt_c
private

(ngnt) real Gaunt coefficient

Definition at line 236 of file paw_onsite.F90.

◆ gnt_ptr

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::gnt_ptr
private

(nlm*nlm+1) CSR offsets: the couplings of the projector pair (i, j) are gnt_ptr(ij) to gnt_ptr(ij+1)-1 with ij = (i-1)*nlm + j

Definition at line 237 of file paw_onsite.F90.

◆ dpair_ae

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::dpair_ae
private

(nr, npair) d(phi_i phi_j)/dr

Definition at line 244 of file paw_onsite.F90.

◆ dpair_ps

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::dpair_ps
private

(nr, npair) d(phitilde_i phitilde_j)/dr

Definition at line 245 of file paw_onsite.F90.

◆ dqaug

real(real64), dimension(:,:,:), allocatable paw_onsite_oct_m::paw_sphere_t::dqaug
private

(nr, npair, 0:laug) d Qhat_{ij}^L/dr

Definition at line 246 of file paw_onsite.F90.

◆ nc_ae_der

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::nc_ae_der
private

(nr) d n_c^AE/dr

Definition at line 247 of file paw_onsite.F90.

◆ nc_ps_der

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::nc_ps_der
private

(nr) d n_c^PS/dr

Definition at line 248 of file paw_onsite.F90.

◆ der_nw

integer paw_onsite_oct_m::paw_sphere_t::der_nw = 5
private

Five-point Fornberg finite-difference weights on the (nonuniform) radial grid inside the sphere: df(k) = sum_w der_w(w, k) f(der_i0(k)+w-1). Built once at init; applying it and its transpose is allocation-free and O(nr). It is only used by the moment expansion of the GGA one-center XC (paw_xc_moments), which needs a linear operator on the sphere grid together with its discrete adjoint. All the other radial derivatives are the precomputed full-grid ones above.

Definition at line 257 of file paw_onsite.F90.

◆ der_w

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::der_w
private

(der_nw, nr) derivative weights per radial point

Definition at line 258 of file paw_onsite.F90.

◆ der_i0

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::der_i0
private

(nr) leftmost stencil index per radial point

Definition at line 259 of file paw_onsite.F90.

◆ der_ntw

integer paw_onsite_oct_m::paw_sphere_t::der_ntw = 0
private

Definition at line 260 of file paw_onsite.F90.

◆ der_wt

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::der_wt
private

(der_ntw, nr) transposed weights per output point

Definition at line 261 of file paw_onsite.F90.

◆ der_trow0

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::der_trow0
private

(nr) first contributing row per output point

Definition at line 262 of file paw_onsite.F90.

◆ der_tn

integer, dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::der_tn
private

(nr) number of contributing rows per output point

Definition at line 263 of file paw_onsite.F90.

◆ has_ae_core

logical paw_onsite_oct_m::paw_sphere_t::has_ae_core = .false.
private

Definition at line 266 of file paw_onsite.F90.

◆ has_ps_core

logical paw_onsite_oct_m::paw_sphere_t::has_ps_core = .false.
private

Definition at line 267 of file paw_onsite.F90.

◆ nc_ae

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::nc_ae
private

(nr) AE core density n_c(r)

Definition at line 268 of file paw_onsite.F90.

◆ nc_ps

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::nc_ps
private

(nr) PS core density ntilde_c(r)

Definition at line 269 of file paw_onsite.F90.

◆ vref_ae

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::vref_ae
private

(nr) AE reference potential (Ha): -Z/r + v_H[core]

Definition at line 270 of file paw_onsite.F90.

◆ vref_ps

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::vref_ps
private

(nr) PS reference potential vbar (Ha)

Definition at line 271 of file paw_onsite.F90.

◆ kin_ae

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::kin_ae
private

(nrad, nrad) <phi_i|T|phi_j>

Definition at line 274 of file paw_onsite.F90.

◆ kin_ps

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::kin_ps
private

(nrad, nrad) <phitilde_i|T|phitilde_j>

Definition at line 275 of file paw_onsite.F90.

◆ nang

integer paw_onsite_oct_m::paw_sphere_t::nang = 0
private

number of angular points

Definition at line 278 of file paw_onsite.F90.

◆ lmax_rho

integer paw_onsite_oct_m::paw_sphere_t::lmax_rho = 0
private

max L of the density expansion (= 2 max l)

Definition at line 279 of file paw_onsite.F90.

◆ nlm_rho

integer paw_onsite_oct_m::paw_sphere_t::nlm_rho = 0
private

(lmax_rho+1)^2

Definition at line 280 of file paw_onsite.F90.

◆ wang

real(real64), dimension(:), allocatable paw_onsite_oct_m::paw_sphere_t::wang
private

(nang) angular weights (int dOmega)

Definition at line 281 of file paw_onsite.F90.

◆ ylm

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::ylm
private

(nang, nlm_rho) real spherical harmonics

Definition at line 282 of file paw_onsite.F90.

◆ dylm_dth

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::dylm_dth
private

(nang, nlm_rho) dY_LM/dtheta (GGA)

Definition at line 283 of file paw_onsite.F90.

◆ dylm_dph

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::dylm_dph
private

(nang, nlm_rho) (1/sin theta) dY_LM/dphi (GGA)

Definition at line 284 of file paw_onsite.F90.

◆ wylm

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::wylm
private

(nang, nlm_rho) quadrature-weighted Y_LM

Definition at line 285 of file paw_onsite.F90.

◆ wdylm_dth

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::wdylm_dth
private

(nang, nlm_rho) quadrature-weighted dY_LM/dtheta

Definition at line 286 of file paw_onsite.F90.

◆ wdylm_dph

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::wdylm_dph
private

(nang, nlm_rho) quadrature-weighted (1/sin theta) dY_LM/dphi

Definition at line 287 of file paw_onsite.F90.

◆ rhat

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::rhat
private

Cartesian components of the spherical orthonormal basis at each angular point, used to build the Cartesian gradient of phi(r) Y_LM(Omega) for the one-center current: rhat = radial, that = theta, phat = phi. grad(phi Y) = phi` Y rhat + (phi/r)(dY/dth that + (1/sin th)dY/dph phat).

(nang, 3) radial unit vector (= Omega direction)

Definition at line 291 of file paw_onsite.F90.

◆ that

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::that
private

(nang, 3) theta unit vector

Definition at line 292 of file paw_onsite.F90.

◆ phat

real(real64), dimension(:,:), allocatable paw_onsite_oct_m::paw_sphere_t::phat
private

(nang, 3) phi unit vector

Definition at line 293 of file paw_onsite.F90.

◆ formulation

integer paw_onsite_oct_m::paw_sphere_t::formulation = PAW_KRESSE_JOUBERT
private

Definition at line 296 of file paw_onsite.F90.

◆ xc_functl

type(xc_functional_t), dimension(2) paw_onsite_oct_m::paw_sphere_t::xc_functl
private

Exchange and correlation functionals, taken from the pseudopotential.

Definition at line 298 of file paw_onsite.F90.

◆ xc_is_gga

logical paw_onsite_oct_m::paw_sphere_t::xc_is_gga = .false.
private

set if either functional needs the density gradient

Definition at line 299 of file paw_onsite.F90.

◆ xc_scheme

integer paw_onsite_oct_m::paw_sphere_t::xc_scheme = PAW_XC_SCHEME_MOMENTS
private

one-center XC scheme

Definition at line 300 of file paw_onsite.F90.


The documentation for this type was generated from the following file: