![]() |
Octopus
|
nonlocal part of the pseudopotential More...
nonlocal part of the pseudopotential
Definition at line 172 of file nonlocal_pseudopotential.F90.
Public Attributes | |
| type(projector_matrix_t), dimension(:), allocatable, public | projector_matrices |
| projectors More... | |
| integer, public | nprojector_matrices |
| number of projector matrices More... | |
| logical, public | apply_projector_matrices |
| flag whether to apply projection matrices More... | |
| logical, public | has_non_local_potential |
| flag whether non-local potential exists More... | |
| integer, public | full_projection_size |
| integer, public | max_npoints |
| integer, public | total_points |
| integer, public | max_nprojs |
| complex(real64), dimension(:, :, :, :), allocatable, public | projector_phases |
| integer, dimension(:), allocatable, public | projector_to_atom |
| integer, public | nphase |
| number of phases: More... | |
| type(accel_mem_t), public | buff_projector_phases |
| type(accel_mem_t), pointer, public | buff_bra_phasepsi => null() |
| type(accel_mem_t), pointer, public | buff_bra_projection_temp => null() |
| type(overlap_matrix_t), public | ovlp_inv |
| Exact inverse-overlap operator (cross-block Woodbury) for overlapping augmentation spheres. Only used on the S^{-1} instance; a no-op when no distinct-atom overlap is present. More... | |
| real(real64), dimension(:,:,:), pointer, public | spin => null() |
| logical, public | uspp_save_memory = .false. |
| if .true., recompute the spin-orbit ultrasoft screening Y_LM every call instead of caching them (saves memory) More... | |
| real(real64), dimension(:, :, :, :), allocatable, public | onsite_density_matrix |
| PAW one-center density matrix rho_ij = sum_nk f_nk <beta_i|psi~><psi~|beta_j> (Torrent et al., Comput. Mater. Sci. 42, 337 (2008), Eqs. (8) and (52)), accumulated during the density calculation on the instance that builds the augmentation density (the overlap instance) and allreduced over the states x kpoints plane there. More... | |
| real(real64), dimension(:, :, :, :), allocatable, public | onsite_current_matrix |
| PAW one-center current matrix A_ij = sum_nk f_nk Im[<beta_i|psi~><psi~|beta_j>], the imaginary (antisymmetric) part of the one-center density matrix. More... | |
| real(real64), public | energy_paw = M_ZERO |
| Accumulated PAW one-center energy correction sum_atoms [(E^1 - E~^1) - Tr(rho D_onsite)]. More... | |
| type(mpi_grp_t), public | paw_onsite_grp |
| Communicator plane over which the PAW one-center are distributed. More... | |
| logical, public | owns_projector_data = .true. |
| Whether this instance owns the per-point projector data of its matrices. The ultrasoft/PAW overlap and inverse-overlap instances alias the arrays of the Hamiltonian (vnl) instance (nonlocal_pseudopotential_share_projector_data), and deep copies of a hamiltonian alias their source likewise; neither must free them. More... | |
Private Member Functions | |
| procedure | init => nonlocal_pseudopotential_init |
| initialize the nonlocal_pseudopotential_t object More... | |
| procedure | build => nonlocal_pseudopotential_build_proj |
| build the projectors for the application of pseudo-potentials More... | |
| procedure | end => nonlocal_pseudopotential_destroy_proj |
| Destroy the data of nonlocal_pseudopotential_t. More... | |
| procedure | has_self_overlap => nonlocal_pseudopotential_self_overlap |
| Returns .true. if the Hamiltonian contains projectors, which overlap with themself. More... | |
| procedure | dstart => dnonlocal_pseudopotential_start |
| Start application of non-local potentials (stored in the Hamiltonian) to the wave functions. More... | |
| procedure | zstart => znonlocal_pseudopotential_start |
| Start application of non-local potentials (stored in the Hamiltonian) to the wave functions. More... | |
| procedure | dfinish => dnonlocal_pseudopotential_finish |
| finish the application of non-local potentials. More... | |
| procedure | zfinish => znonlocal_pseudopotential_finish |
| finish the application of non-local potentials. More... | |
| procedure | dforce => dnonlocal_pseudopotential_force |
| calculate contribution to forces, from non-local potentials More... | |
| procedure | zforce => znonlocal_pseudopotential_force |
| calculate contribution to forces, from non-local potentials More... | |
| procedure | dforce_overlap_cross => dnonlocal_pseudopotential_force_overlap_cross |
| Ultrasoft DFT+U force: the overlap-derivative (d_R S) term, as a cross density matrix. More... | |
| procedure | zforce_overlap_cross => znonlocal_pseudopotential_force_overlap_cross |
| Ultrasoft DFT+U force: the overlap-derivative (d_R S) term, as a cross density matrix. More... | |
| procedure | dposition_commutator => dnonlocal_pseudopotential_position_commutator |
| apply the commutator between the non-local potential and the position to the wave functions. More... | |
| procedure | zposition_commutator => znonlocal_pseudopotential_position_commutator |
| apply the commutator between the non-local potential and the position to the wave functions. More... | |
| procedure | dr_vn_local => dnonlocal_pseudopotential_r_vnlocal |
| Accumulates to commpsib the result of x V_{nl} | psib > More... | |
| procedure | zr_vn_local => znonlocal_pseudopotential_r_vnlocal |
| Accumulates to commpsib the result of x V_{nl} | psib > More... | |
Private Attributes | |
| logical | projector_mix |
| integer | nregions |
| number of non-overlapping regions More... | |
| integer, dimension(:), allocatable | regions |
| list of atomd in each region. More... | |
| type(accel_mem_t) | buff_offsets |
| type(accel_mem_t) | buff_matrices |
| type(accel_mem_t) | buff_maps |
| type(accel_mem_t) | buff_sphere_weights |
| per-point bra weights (vol_pp meshes) More... | |
| type(accel_mem_t) | buff_scals |
| type(accel_mem_t) | buff_position |
| type(accel_mem_t) | buff_pos |
| type(accel_mem_t) | buff_invmap |
| type(accel_mem_t) | buff_invmap_mat |
| type(accel_mem_t) | buff_point_to_mat |
| matrix of each projector point More... | |
| type(accel_mem_t) | buff_proj_to_mat |
| matrix of each projector More... | |
| type(accel_mem_t) | buff_mix |
| logical | projector_self_overlap |
| if .true. some projectors overlap with themselves More... | |
| logical | ghost_checked = .false. |
| One-shot flag of the augmentation ghost check. More... | |
| real(real64), dimension(:, :, :, :), allocatable | paw_symm_rot |
| Crystal-symmetry data to symmetrize the PAW one-center density matrix: the real-spherical-harmonic rotation matrices D^l_{m m`}(S) and, per symmetry operation, the projector matrix (equivalent atom) each atom is mapped from. More... | |
| integer, dimension(:, :), allocatable | paw_symm_map |
| (nprojector_matrices, nops) source matrix More... | |
| integer | paw_symm_nops = 0 |
| integer | paw_symm_lmax = -1 |
|
private |
initialize the nonlocal_pseudopotential_t object
Definition at line 242 of file nonlocal_pseudopotential.F90.
|
private |
build the projectors for the application of pseudo-potentials
This routine also determines the regions for the projectors and whether any projector overlaps with itself in a periodic system.
| [in] | overlap_operator | build the overlap S (mix = q_ij) |
| [in] | inverse_overlap_operator | build the inverse overlap S^{-1} (mix = -T_ij) |
Definition at line 244 of file nonlocal_pseudopotential.F90.
|
private |
Destroy the data of nonlocal_pseudopotential_t.
Definition at line 246 of file nonlocal_pseudopotential.F90.
|
private |
Returns .true. if the Hamiltonian contains projectors, which overlap with themself.
Definition at line 248 of file nonlocal_pseudopotential.F90.
|
private |
Start application of non-local potentials (stored in the Hamiltonian) to the wave functions.
This routine is split into the *_start and *_finish parts, in order to allow for other operations during device transfer or communications.
TODO: add more details.
| [in] | mesh | the mesh |
| [in] | std | dimensions of the states |
| [in] | spiral_bnd | flag for spiral boundary conditions |
| [in] | psib | original wave functions |
| [out] | projection | TODO: add description |
Definition at line 250 of file nonlocal_pseudopotential.F90.
|
private |
Start application of non-local potentials (stored in the Hamiltonian) to the wave functions.
This routine is split into the *_start and *_finish parts, in order to allow for other operations during device transfer or communications.
TODO: add more details.
| [in] | mesh | the mesh |
| [in] | std | dimensions of the states |
| [in] | spiral_bnd | flag for spiral boundary conditions |
| [in] | psib | original wave functions |
| [out] | projection | TODO: add description |
Definition at line 252 of file nonlocal_pseudopotential.F90.
|
private |
finish the application of non-local potentials.
Definition at line 254 of file nonlocal_pseudopotential.F90.
|
private |
finish the application of non-local potentials.
Definition at line 256 of file nonlocal_pseudopotential.F90.
|
private |
calculate contribution to forces, from non-local potentials
TODO: add more details
Definition at line 258 of file nonlocal_pseudopotential.F90.
|
private |
calculate contribution to forces, from non-local potentials
TODO: add more details
Definition at line 260 of file nonlocal_pseudopotential.F90.
|
private |
Ultrasoft DFT+U force: the overlap-derivative (d_R S) term, as a cross density matrix.
Implements the contribution of the position dependence of the generalized overlap S to the +U force, F^B_a(J) = -2 sum_n f_n Re <psi~_n|(d_a S)|chi_n>, with chi_n the bare +U ket chi_n = sum_m |phi_m> sum_mp V_mmp <phi_mp|S|psi~_n> = P S psi~_n. With S = 1 + sum_ij q_ij |beta_i><beta_j| and d_{R_J} beta = -grad beta this is
F^B_a(J) = -2 sum_n f_n Re sum_ij q_ij [ <grad_a beta_i|psi~_n> <beta_j|chi_n>
the overlap charges q_ij = pmatqmix. See Timrov et al., PRB 102, 235159 (2020), Eqs. (17)-(18).
| [in] | psib | psi~ (phase-set) |
| [in] | gpsib | grad psi~ (ndim batches) |
| [in] | chib | chi = P S psi~ (phase-set) |
| [in] | gchib | grad chi (ndim batches) |
Definition at line 262 of file nonlocal_pseudopotential.F90.
|
private |
Ultrasoft DFT+U force: the overlap-derivative (d_R S) term, as a cross density matrix.
Implements the contribution of the position dependence of the generalized overlap S to the +U force, F^B_a(J) = -2 sum_n f_n Re <psi~_n|(d_a S)|chi_n>, with chi_n the bare +U ket chi_n = sum_m |phi_m> sum_mp V_mmp <phi_mp|S|psi~_n> = P S psi~_n. With S = 1 + sum_ij q_ij |beta_i><beta_j| and d_{R_J} beta = -grad beta this is
F^B_a(J) = -2 sum_n f_n Re sum_ij q_ij [ <grad_a beta_i|psi~_n> <beta_j|chi_n>
the overlap charges q_ij = pmatqmix. See Timrov et al., PRB 102, 235159 (2020), Eqs. (17)-(18).
| [in] | psib | psi~ (phase-set) |
| [in] | gpsib | grad psi~ (ndim batches) |
| [in] | chib | chi = P S psi~ (phase-set) |
| [in] | gchib | grad chi (ndim batches) |
Definition at line 264 of file nonlocal_pseudopotential.F90.
|
private |
apply the commutator between the non-local potential and the position to the wave functions.
TODO: add more details
| [in] | mesh | the mesh |
| [in] | std | the electronic states |
| [in] | spiral_bnd | flag for spiral boundary conditions |
| [in] | psib | original wave functions psi |
| [in,out] | commpsib | resulting [v_nl, r]*psi |
Definition at line 266 of file nonlocal_pseudopotential.F90.
|
private |
apply the commutator between the non-local potential and the position to the wave functions.
TODO: add more details
| [in] | mesh | the mesh |
| [in] | std | the electronic states |
| [in] | spiral_bnd | flag for spiral boundary conditions |
| [in] | psib | original wave functions psi |
| [in,out] | commpsib | resulting [v_nl, r]*psi |
Definition at line 268 of file nonlocal_pseudopotential.F90.
|
private |
Accumulates to commpsib the result of x V_{nl} | psib >
Here x = (r - R_I) is relative to each projector atom (pmatposition). For ultrasoft projectors (allocated pmatqmix) the coupling matrix is the per-state ( D^scr_ij - eps_n q_ij ), so eigenval must be passed
See Laasonen et al., PRB 47, 10142 (1993)
| [in] | eigenval | eigenvalues for psib`s k-point, indexed by the true state index. Required for ultrasoft projectors (allocated pmatqmix): the coupling becomes D^scr_ij - eps_n q_ij per state. |
| [in] | only_qmix | when .true., couple with the overlap charges q_ij instead of D_ij: computes x (S-1) |psib>. Projectors without q (norm-conserving) give zero. Used by the overlap-strain cross terms (DFT+U stress). |
Definition at line 270 of file nonlocal_pseudopotential.F90.
|
private |
Accumulates to commpsib the result of x V_{nl} | psib >
Here x = (r - R_I) is relative to each projector atom (pmatposition). For ultrasoft projectors (allocated pmatqmix) the coupling matrix is the per-state ( D^scr_ij - eps_n q_ij ), so eigenval must be passed
See Laasonen et al., PRB 47, 10142 (1993)
| [in] | eigenval | eigenvalues for psib`s k-point, indexed by the true state index. Required for ultrasoft projectors (allocated pmatqmix): the coupling becomes D^scr_ij - eps_n q_ij per state. |
| [in] | only_qmix | when .true., couple with the overlap charges q_ij instead of D_ij: computes x (S-1) |psib>. Projectors without q (norm-conserving) give zero. Used by the overlap-strain cross terms (DFT+U stress). |
Definition at line 272 of file nonlocal_pseudopotential.F90.
| type(projector_matrix_t), dimension(:), allocatable, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::projector_matrices |
projectors
Definition at line 174 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::nprojector_matrices |
number of projector matrices
Definition at line 175 of file nonlocal_pseudopotential.F90.
| logical, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::apply_projector_matrices |
flag whether to apply projection matrices
Definition at line 176 of file nonlocal_pseudopotential.F90.
| logical, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::has_non_local_potential |
flag whether non-local potential exists
Definition at line 177 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::full_projection_size |
Definition at line 178 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::max_npoints |
Definition at line 179 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::total_points |
Definition at line 180 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::max_nprojs |
Definition at line 181 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 182 of file nonlocal_pseudopotential.F90.
| complex(real64), dimension(:, :, :, :), allocatable, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::projector_phases |
Definition at line 183 of file nonlocal_pseudopotential.F90.
| integer, dimension(:), allocatable, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::projector_to_atom |
Definition at line 184 of file nonlocal_pseudopotential.F90.
|
private |
number of non-overlapping regions
Definition at line 185 of file nonlocal_pseudopotential.F90.
|
private |
list of atomd in each region.
Definition at line 186 of file nonlocal_pseudopotential.F90.
| integer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::nphase |
number of phases:
Definition at line 187 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 192 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 193 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 194 of file nonlocal_pseudopotential.F90.
|
private |
per-point bra weights (vol_pp meshes)
Definition at line 195 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 196 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 197 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 198 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 199 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 200 of file nonlocal_pseudopotential.F90.
|
private |
matrix of each projector point
Definition at line 201 of file nonlocal_pseudopotential.F90.
|
private |
matrix of each projector
Definition at line 202 of file nonlocal_pseudopotential.F90.
| type(accel_mem_t), public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::buff_projector_phases |
Definition at line 203 of file nonlocal_pseudopotential.F90.
| type(accel_mem_t), pointer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::buff_bra_phasepsi => null() |
Definition at line 204 of file nonlocal_pseudopotential.F90.
| type(accel_mem_t), pointer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::buff_bra_projection_temp => null() |
Definition at line 205 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 206 of file nonlocal_pseudopotential.F90.
|
private |
if .true. some projectors overlap with themselves
Definition at line 207 of file nonlocal_pseudopotential.F90.
| type(overlap_matrix_t), public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::ovlp_inv |
Exact inverse-overlap operator (cross-block Woodbury) for overlapping augmentation spheres. Only used on the S^{-1} instance; a no-op when no distinct-atom overlap is present.
Definition at line 210 of file nonlocal_pseudopotential.F90.
| real(real64), dimension(:,:,:), pointer, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::spin => null() |
Definition at line 211 of file nonlocal_pseudopotential.F90.
| logical, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::uspp_save_memory = .false. |
if .true., recompute the spin-orbit ultrasoft screening Y_LM every call instead of caching them (saves memory)
Definition at line 212 of file nonlocal_pseudopotential.F90.
| real(real64), dimension(:, :, :, :), allocatable, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::onsite_density_matrix |
PAW one-center density matrix rho_ij = sum_nk f_nk <beta_i|psi~><psi~|beta_j> (Torrent et al., Comput. Mater. Sci. 42, 337 (2008), Eqs. (8) and (52)), accumulated during the density calculation on the instance that builds the augmentation density (the overlap instance) and allreduced over the states x kpoints plane there.
Definition at line 218 of file nonlocal_pseudopotential.F90.
| real(real64), dimension(:, :, :, :), allocatable, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::onsite_current_matrix |
PAW one-center current matrix A_ij = sum_nk f_nk Im[<beta_i|psi~><psi~|beta_j>], the imaginary (antisymmetric) part of the one-center density matrix.
Definition at line 221 of file nonlocal_pseudopotential.F90.
| real(real64), public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::energy_paw = M_ZERO |
Accumulated PAW one-center energy correction sum_atoms [(E^1 - E~^1) - Tr(rho D_onsite)].
Definition at line 223 of file nonlocal_pseudopotential.F90.
| type(mpi_grp_t), public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::paw_onsite_grp |
Communicator plane over which the PAW one-center are distributed.
Definition at line 225 of file nonlocal_pseudopotential.F90.
|
private |
One-shot flag of the augmentation ghost check.
Definition at line 227 of file nonlocal_pseudopotential.F90.
| logical, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_t::owns_projector_data = .true. |
Whether this instance owns the per-point projector data of its matrices. The ultrasoft/PAW overlap and inverse-overlap instances alias the arrays of the Hamiltonian (vnl) instance (nonlocal_pseudopotential_share_projector_data), and deep copies of a hamiltonian alias their source likewise; neither must free them.
Definition at line 232 of file nonlocal_pseudopotential.F90.
|
private |
Crystal-symmetry data to symmetrize the PAW one-center density matrix: the real-spherical-harmonic rotation matrices D^l_{m m`}(S) and, per symmetry operation, the projector matrix (equivalent atom) each atom is mapped from.
(2*lmax+1, 2*lmax+1, 0:lmax, nops)
Definition at line 236 of file nonlocal_pseudopotential.F90.
|
private |
(nprojector_matrices, nops) source matrix
Definition at line 237 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 238 of file nonlocal_pseudopotential.F90.
|
private |
Definition at line 239 of file nonlocal_pseudopotential.F90.