Octopus
linear_response_oct_m Module Reference

Data Types

type  lr_t
 

Functions/Subroutines

subroutine, public lr_init (lr)
 
subroutine, public lr_allocate (lr, st, mesh, allocate_rho)
 
subroutine, public lr_zero (lr, st)
 
subroutine, public lr_dealloc (lr)
 
subroutine, public lr_copy (st, mesh, src, dest)
 
logical function, public lr_is_allocated (this)
 
real(real64) function, public lr_alpha_j (st, jst, ik)
 
subroutine, public dlr_orth_vector (mesh, st, vec, ist, ik, omega, min_proj)
 Orthogonalizes vec against all the occupied states. For details on the metallic part, take a look at de Gironcoli, PRB 51, 6773 (1995). More...
 
subroutine, public dlr_build_dl_rho (mesh, st, lr, nsigma)
 
subroutine, public dlr_orth_response (mesh, st, lr, omega)
 
subroutine, public dlr_swap_sigma (st, mesh, plus, minus)
 
subroutine, public dlr_dump_rho (lr, space, mesh, nspin, restart, rho_tag, ierr)
 
subroutine, public dlr_load_rho (dl_rho, space, mesh, nspin, restart, rho_tag, ierr)
 
subroutine, public zlr_orth_vector (mesh, st, vec, ist, ik, omega, min_proj)
 Orthogonalizes vec against all the occupied states. For details on the metallic part, take a look at de Gironcoli, PRB 51, 6773 (1995). More...
 
subroutine, public zlr_build_dl_rho (mesh, st, lr, nsigma)
 
subroutine, public zlr_orth_response (mesh, st, lr, omega)
 
subroutine, public zlr_swap_sigma (st, mesh, plus, minus)
 
subroutine, public zlr_dump_rho (lr, space, mesh, nspin, restart, rho_tag, ierr)
 
subroutine, public zlr_load_rho (dl_rho, space, mesh, nspin, restart, rho_tag, ierr)
 

Function/Subroutine Documentation

◆ lr_init()

subroutine, public linear_response_oct_m::lr_init ( type(lr_t), intent(out)  lr)

Definition at line 185 of file linear_response.F90.

◆ lr_allocate()

subroutine, public linear_response_oct_m::lr_allocate ( type(lr_t), intent(inout)  lr,
type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
logical, intent(in), optional  allocate_rho 
)

Definition at line 199 of file linear_response.F90.

◆ lr_zero()

subroutine, public linear_response_oct_m::lr_zero ( type(lr_t), intent(inout)  lr,
type(states_elec_t), intent(in)  st 
)

Definition at line 233 of file linear_response.F90.

◆ lr_dealloc()

subroutine, public linear_response_oct_m::lr_dealloc ( type(lr_t), intent(inout)  lr)

Definition at line 255 of file linear_response.F90.

◆ lr_copy()

subroutine, public linear_response_oct_m::lr_copy ( type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(lr_t), intent(in)  src,
type(lr_t), intent(inout)  dest 
)

Definition at line 277 of file linear_response.F90.

◆ lr_is_allocated()

logical function, public linear_response_oct_m::lr_is_allocated ( type(lr_t), intent(in)  this)

Definition at line 320 of file linear_response.F90.

◆ lr_alpha_j()

real(real64) function, public linear_response_oct_m::lr_alpha_j ( type(states_elec_t), intent(in)  st,
integer, intent(in)  jst,
integer, intent(in)  ik 
)

Definition at line 332 of file linear_response.F90.

◆ dlr_orth_vector()

subroutine, public linear_response_oct_m::dlr_orth_vector ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
real(real64), dimension(:,:), intent(inout), contiguous  vec,
integer, intent(in)  ist,
integer, intent(in)  ik,
real(real64), intent(in)  omega,
logical, intent(in), optional  min_proj 
)

Orthogonalizes vec against all the occupied states. For details on the metallic part, take a look at de Gironcoli, PRB 51, 6773 (1995).

min_proj: Let Pc = projector onto unoccupied states, Pn= projector that removes states degenerate with n For an SCF run, we will apply Pn for the last step always, since the whole wavefunction is useful for some things and the extra cost here is small. If occ_response, previous steps will also use Pn`. If !occ_response, previous steps will use Pc, which generally reduces the number of linear-solver iterations needed. Only the wavefunctions in the unoccupied subspace are needed to construct the first-order density. I am not sure what the generalization of this scheme is for metals, so we will just use Pc if there is smearing.

Definition at line 432 of file linear_response.F90.

◆ dlr_build_dl_rho()

subroutine, public linear_response_oct_m::dlr_build_dl_rho ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(lr_t), dimension(:), intent(inout)  lr,
integer, intent(in)  nsigma 
)

Definition at line 529 of file linear_response.F90.

◆ dlr_orth_response()

subroutine, public linear_response_oct_m::dlr_orth_response ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(lr_t), intent(inout)  lr,
real(real64), intent(in)  omega 
)

Definition at line 644 of file linear_response.F90.

◆ dlr_swap_sigma()

subroutine, public linear_response_oct_m::dlr_swap_sigma ( type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(lr_t), intent(inout)  plus,
type(lr_t), intent(inout)  minus 
)

Definition at line 664 of file linear_response.F90.

◆ dlr_dump_rho()

subroutine, public linear_response_oct_m::dlr_dump_rho ( type(lr_t), intent(in)  lr,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  nspin,
type(restart_t), intent(in)  restart,
character(len=*), intent(in)  rho_tag,
integer, intent(out)  ierr 
)

Definition at line 688 of file linear_response.F90.

◆ dlr_load_rho()

subroutine, public linear_response_oct_m::dlr_load_rho ( real(real64), dimension(:,:), intent(inout), contiguous  dl_rho,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  nspin,
type(restart_t), intent(in)  restart,
character(len=*), intent(in)  rho_tag,
integer, intent(out)  ierr 
)
Parameters
[in,out]dl_rho(meshnp, nspin)

Definition at line 731 of file linear_response.F90.

◆ zlr_orth_vector()

subroutine, public linear_response_oct_m::zlr_orth_vector ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
complex(real64), dimension(:,:), intent(inout), contiguous  vec,
integer, intent(in)  ist,
integer, intent(in)  ik,
complex(real64), intent(in)  omega,
logical, intent(in), optional  min_proj 
)

Orthogonalizes vec against all the occupied states. For details on the metallic part, take a look at de Gironcoli, PRB 51, 6773 (1995).

min_proj: Let Pc = projector onto unoccupied states, Pn= projector that removes states degenerate with n For an SCF run, we will apply Pn for the last step always, since the whole wavefunction is useful for some things and the extra cost here is small. If occ_response, previous steps will also use Pn`. If !occ_response, previous steps will use Pc, which generally reduces the number of linear-solver iterations needed. Only the wavefunctions in the unoccupied subspace are needed to construct the first-order density. I am not sure what the generalization of this scheme is for metals, so we will just use Pc if there is smearing.

Definition at line 864 of file linear_response.F90.

◆ zlr_build_dl_rho()

subroutine, public linear_response_oct_m::zlr_build_dl_rho ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(lr_t), dimension(:), intent(inout)  lr,
integer, intent(in)  nsigma 
)

Definition at line 961 of file linear_response.F90.

◆ zlr_orth_response()

subroutine, public linear_response_oct_m::zlr_orth_response ( class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(lr_t), intent(inout)  lr,
complex(real64), intent(in)  omega 
)

Definition at line 1076 of file linear_response.F90.

◆ zlr_swap_sigma()

subroutine, public linear_response_oct_m::zlr_swap_sigma ( type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(lr_t), intent(inout)  plus,
type(lr_t), intent(inout)  minus 
)

Definition at line 1096 of file linear_response.F90.

◆ zlr_dump_rho()

subroutine, public linear_response_oct_m::zlr_dump_rho ( type(lr_t), intent(in)  lr,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  nspin,
type(restart_t), intent(in)  restart,
character(len=*), intent(in)  rho_tag,
integer, intent(out)  ierr 
)

Definition at line 1120 of file linear_response.F90.

◆ zlr_load_rho()

subroutine, public linear_response_oct_m::zlr_load_rho ( complex(real64), dimension(:,:), intent(inout), contiguous  dl_rho,
class(space_t), intent(in)  space,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  nspin,
type(restart_t), intent(in)  restart,
character(len=*), intent(in)  rho_tag,
integer, intent(out)  ierr 
)
Parameters
[in,out]dl_rho(meshnp, nspin)

Definition at line 1163 of file linear_response.F90.