Octopus
nonlocal_pseudopotential_oct_m Module Reference

Data Types

type  nonlocal_pseudopotential_t
 nonlocal part of the pseudopotential More...
 
type  projection_t
 Class for projections of wave functions. More...
 

Functions/Subroutines

subroutine nonlocal_pseudopotential_init (this)
 initialize the nonlocal_pseudopotential_t object More...
 
subroutine, public nonlocal_pseudopotential_rebind_projectors (this, epot)
 Rebind projector matrix pointers (map, position) to a target epot. More...
 
subroutine nonlocal_pseudopotential_destroy_proj (this)
 Destroy the data of nonlocal_pseudopotential_t. More...
 
subroutine nonlocal_pseudopotential_build_proj (this, space, mesh, epot)
 build the projectors for the application of pseudo-potentials More...
 
subroutine, public nonlocal_pseudopotential_accel_rebuild (this, space, mesh)
 Rebuild accelerator buffers after an intrinsic copy. More...
 
subroutine nonlocal_pseudopotential_detach_accel_buffers (this)
 Clear copied accelerator handles so they do not alias source buffers. More...
 
subroutine nonlocal_pseudopotential_build_accel_buffers (this, space, mesh)
 Build accelerator buffers for projectors from host-side projector matrices. More...
 
subroutine nonlocal_pseudopotential_build_projector_phase_accel_buffer (this)
 Rebuild projector phase accelerator buffer from host-side projector phases. More...
 
logical pure function nonlocal_pseudopotential_self_overlap (this)
 Returns .true. if the Hamiltonian contains projectors, which overlap with themself. More...
 
subroutine dnonlocal_pseudopotential_start (this, mesh, std, spiral_bnd, psib, projection, async)
 Start application of non-local potentials (stored in the Hamiltonian) to the wave functions. More...
 
subroutine dnonlocal_pseudopotential_finish (this, mesh, spiral_bnd, std, projection, vpsib)
 finish the application of non-local potentials. More...
 
subroutine dnonlocal_pseudopotential_force (this, mesh, st, spiral_bnd, iqn, ndim, psi1b, psi2b, force)
 calculate contribution to forces, from non-local potentials More...
 
subroutine dnonlocal_pseudopotential_position_commutator (this, mesh, std, spiral_bnd, psib, commpsib, async)
 apply the commutator between the non-local potential and the position to the wave functions. More...
 
subroutine dnonlocal_pseudopotential_r_vnlocal (this, mesh, std, spiral_bnd, psib, commpsib)
 Accumulates to commpsib the result of x V_{nl} | psib > More...
 
subroutine znonlocal_pseudopotential_start (this, mesh, std, spiral_bnd, psib, projection, async)
 Start application of non-local potentials (stored in the Hamiltonian) to the wave functions. More...
 
subroutine znonlocal_pseudopotential_finish (this, mesh, spiral_bnd, std, projection, vpsib)
 finish the application of non-local potentials. More...
 
subroutine znonlocal_pseudopotential_force (this, mesh, st, spiral_bnd, iqn, ndim, psi1b, psi2b, force)
 calculate contribution to forces, from non-local potentials More...
 
subroutine znonlocal_pseudopotential_position_commutator (this, mesh, std, spiral_bnd, psib, commpsib, async)
 apply the commutator between the non-local potential and the position to the wave functions. More...
 
subroutine znonlocal_pseudopotential_r_vnlocal (this, mesh, std, spiral_bnd, psib, commpsib)
 Accumulates to commpsib the result of x V_{nl} | psib > More...
 

Function/Subroutine Documentation

◆ nonlocal_pseudopotential_init()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_init ( class(nonlocal_pseudopotential_t), intent(inout)  this)
private

initialize the nonlocal_pseudopotential_t object

Definition at line 239 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_rebind_projectors()

subroutine, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_rebind_projectors ( class(nonlocal_pseudopotential_t), intent(inout), target  this,
type(epot_t), intent(in), target  epot 
)

Rebind projector matrix pointers (map, position) to a target epot.

After intrinsic assignment, these pointer components still point to the source epot spheres and must be rebound to the snapshot epot.

Definition at line 258 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_destroy_proj()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_destroy_proj ( class(nonlocal_pseudopotential_t), intent(inout)  this)
private

Destroy the data of nonlocal_pseudopotential_t.

Definition at line 295 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_build_proj()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_build_proj ( class(nonlocal_pseudopotential_t), intent(inout), target  this,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
type(epot_t), intent(in), target  epot 
)
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.

Definition at line 335 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_accel_rebuild()

subroutine, public nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_accel_rebuild ( class(nonlocal_pseudopotential_t), intent(inout), target  this,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh 
)

Rebuild accelerator buffers after an intrinsic copy.

Definition at line 712 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_detach_accel_buffers()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_detach_accel_buffers ( class(nonlocal_pseudopotential_t), intent(inout)  this)
private

Clear copied accelerator handles so they do not alias source buffers.

Definition at line 739 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_build_accel_buffers()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_build_accel_buffers ( class(nonlocal_pseudopotential_t), intent(inout), target  this,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh 
)
private

Build accelerator buffers for projectors from host-side projector matrices.

Definition at line 759 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_build_projector_phase_accel_buffer()

subroutine nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_build_projector_phase_accel_buffer ( class(nonlocal_pseudopotential_t), intent(inout)  this)
private

Rebuild projector phase accelerator buffer from host-side projector phases.

Definition at line 908 of file nonlocal_pseudopotential.F90.

◆ nonlocal_pseudopotential_self_overlap()

logical pure function nonlocal_pseudopotential_oct_m::nonlocal_pseudopotential_self_overlap ( class(nonlocal_pseudopotential_t), intent(in)  this)
private

Returns .true. if the Hamiltonian contains projectors, which overlap with themself.

Definition at line 947 of file nonlocal_pseudopotential.F90.

◆ dnonlocal_pseudopotential_start()

subroutine nonlocal_pseudopotential_oct_m::dnonlocal_pseudopotential_start ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
type(projection_t), intent(out)  projection,
logical, intent(in), optional  async 
)
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.

Parameters
[in]meshthe mesh
[in]stddimensions of the states
[in]spiral_bndflag for spiral boundary conditions
[in]psiboriginal wave functions
[out]projectionTODO: add description

Definition at line 1029 of file nonlocal_pseudopotential.F90.

◆ dnonlocal_pseudopotential_finish()

subroutine nonlocal_pseudopotential_oct_m::dnonlocal_pseudopotential_finish ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
logical, intent(in)  spiral_bnd,
type(states_elec_dim_t), intent(in)  std,
type(projection_t), intent(inout), target  projection,
class(wfs_elec_t), intent(inout)  vpsib 
)
private

finish the application of non-local potentials.

Definition at line 1440 of file nonlocal_pseudopotential.F90.

◆ dnonlocal_pseudopotential_force()

subroutine nonlocal_pseudopotential_oct_m::dnonlocal_pseudopotential_force ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
logical, intent(in)  spiral_bnd,
integer, intent(in)  iqn,
integer, intent(in)  ndim,
type(wfs_elec_t), intent(in)  psi1b,
type(wfs_elec_t), dimension(:), intent(in)  psi2b,
real(real64), dimension(:, :), intent(inout)  force 
)
private

calculate contribution to forces, from non-local potentials

TODO: add more details

spiral BC ik should be the same for psi2b

Definition at line 1779 of file nonlocal_pseudopotential.F90.

◆ dnonlocal_pseudopotential_position_commutator()

subroutine nonlocal_pseudopotential_oct_m::dnonlocal_pseudopotential_position_commutator ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout), target  commpsib,
logical, intent(in), optional  async 
)
private

apply the commutator between the non-local potential and the position to the wave functions.

TODO: add more details

Parameters
[in]meshthe mesh
[in]stdthe electronic states
[in]spiral_bndflag for spiral boundary conditions
[in]psiboriginal wave functions psi
[in,out]commpsibresulting [v_nl, r]*psi

Definition at line 2070 of file nonlocal_pseudopotential.F90.

◆ dnonlocal_pseudopotential_r_vnlocal()

subroutine nonlocal_pseudopotential_oct_m::dnonlocal_pseudopotential_r_vnlocal ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(1:3), intent(inout), target  commpsib 
)
private

Accumulates to commpsib the result of x V_{nl} | psib >

Definition at line 2472 of file nonlocal_pseudopotential.F90.

◆ znonlocal_pseudopotential_start()

subroutine nonlocal_pseudopotential_oct_m::znonlocal_pseudopotential_start ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
type(projection_t), intent(out)  projection,
logical, intent(in), optional  async 
)
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.

Parameters
[in]meshthe mesh
[in]stddimensions of the states
[in]spiral_bndflag for spiral boundary conditions
[in]psiboriginal wave functions
[out]projectionTODO: add description

Definition at line 2940 of file nonlocal_pseudopotential.F90.

◆ znonlocal_pseudopotential_finish()

subroutine nonlocal_pseudopotential_oct_m::znonlocal_pseudopotential_finish ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
logical, intent(in)  spiral_bnd,
type(states_elec_dim_t), intent(in)  std,
type(projection_t), intent(inout), target  projection,
class(wfs_elec_t), intent(inout)  vpsib 
)
private

finish the application of non-local potentials.

Definition at line 3433 of file nonlocal_pseudopotential.F90.

◆ znonlocal_pseudopotential_force()

subroutine nonlocal_pseudopotential_oct_m::znonlocal_pseudopotential_force ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
logical, intent(in)  spiral_bnd,
integer, intent(in)  iqn,
integer, intent(in)  ndim,
type(wfs_elec_t), intent(in)  psi1b,
type(wfs_elec_t), dimension(:), intent(in)  psi2b,
real(real64), dimension(:, :), intent(inout)  force 
)
private

calculate contribution to forces, from non-local potentials

TODO: add more details

spiral BC ik should be the same for psi2b

Definition at line 3863 of file nonlocal_pseudopotential.F90.

◆ znonlocal_pseudopotential_position_commutator()

subroutine nonlocal_pseudopotential_oct_m::znonlocal_pseudopotential_position_commutator ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(:), intent(inout), target  commpsib,
logical, intent(in), optional  async 
)
private

apply the commutator between the non-local potential and the position to the wave functions.

TODO: add more details

Parameters
[in]meshthe mesh
[in]stdthe electronic states
[in]spiral_bndflag for spiral boundary conditions
[in]psiboriginal wave functions psi
[in,out]commpsibresulting [v_nl, r]*psi

Definition at line 4214 of file nonlocal_pseudopotential.F90.

◆ znonlocal_pseudopotential_r_vnlocal()

subroutine nonlocal_pseudopotential_oct_m::znonlocal_pseudopotential_r_vnlocal ( class(nonlocal_pseudopotential_t), intent(in), target  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
logical, intent(in)  spiral_bnd,
type(wfs_elec_t), intent(in)  psib,
class(wfs_elec_t), dimension(1:3), intent(inout), target  commpsib 
)
private

Accumulates to commpsib the result of x V_{nl} | psib >

Definition at line 4683 of file nonlocal_pseudopotential.F90.