Octopus
elec_matrix_elements_oct_m Module Reference

Data Types

interface  dipole_me
 
interface  ks_multipoles_1d
 
interface  ks_multipoles_2d
 
interface  ks_multipoles_3d
 
interface  one_body_me
 
interface  two_body_me
 

Functions/Subroutines

subroutine, public elec_momentum_me (namespace, gr, st, space, hm, ions, momentum, non_local)
 
subroutine, public elec_angular_momentum_me (gr, st, space, ll, l2)
 
subroutine zelec_momentum_me (namespace, gr, st, space, hm, ions, momentum, non_local)
 The routine calculates the expectation value of the momentum operator. More...
 
subroutine zelec_angular_momentum_me (gr, st, space, ll, l2)
 It calculates the expectation value of the angular momentum of the states. If l2 is passed, it also calculates the expectation value of the square of the angular momentum of the state phi. More...
 
subroutine zelec_ks_multipoles_3d_me (gr, st, space, ll, mm, ik, elements)
 Prints out the multipole matrix elements between KS states. More...
 
subroutine zelec_ks_multipoles_2d_me (gr, st, ll, ik, elements)
 Prints out the dipole matrix elements (X or Y) between single orbitals, in the 1d case. More...
 
subroutine zelec_ks_multipoles_1d_me (gr, st, ll, ik, elements)
 Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case. More...
 
subroutine zelec_dipole_me (gr, st, namespace, hm, ions, ik, st_start, st_end, elements)
 Computes the dipole matrix elements between KS states. More...
 
subroutine zcalculate_expectation_values_matrix (namespace, hm, der, st, eigen, terms, diagonal_states)
 
subroutine zelec_one_body_me (gr, st, namespace, hm, iindex, jindex, oneint)
 
subroutine zelec_two_body_me (gr, st, space, namespace, kpoints, psolver, st_min, st_max, iindex, jindex, kindex, lindex, twoint, phase, singularity, exc_k)
 
subroutine delec_momentum_me (namespace, gr, st, space, hm, ions, momentum, non_local)
 The routine calculates the expectation value of the momentum operator. More...
 
subroutine delec_angular_momentum_me (gr, st, space, ll, l2)
 It calculates the expectation value of the angular momentum of the states. If l2 is passed, it also calculates the expectation value of the square of the angular momentum of the state phi. More...
 
subroutine delec_ks_multipoles_3d_me (gr, st, space, ll, mm, ik, elements)
 Prints out the multipole matrix elements between KS states. More...
 
subroutine delec_ks_multipoles_2d_me (gr, st, ll, ik, elements)
 Prints out the dipole matrix elements (X or Y) between single orbitals, in the 1d case. More...
 
subroutine delec_ks_multipoles_1d_me (gr, st, ll, ik, elements)
 Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case. More...
 
subroutine delec_dipole_me (gr, st, namespace, hm, ions, ik, st_start, st_end, elements)
 Computes the dipole matrix elements between KS states. More...
 
subroutine dcalculate_expectation_values_matrix (namespace, hm, der, st, eigen, terms, diagonal_states)
 
subroutine delec_one_body_me (gr, st, namespace, hm, iindex, jindex, oneint)
 
subroutine delec_two_body_me (gr, st, space, namespace, kpoints, psolver, st_min, st_max, iindex, jindex, kindex, lindex, twoint, phase, singularity, exc_k)
 

Function/Subroutine Documentation

◆ elec_momentum_me()

subroutine, public elec_matrix_elements_oct_m::elec_momentum_me ( type(namespace_t), intent(in)  namespace,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
real(real64), dimension(:,:,:), intent(out)  momentum,
logical, intent(in), optional  non_local 
)

Definition at line 196 of file elec_matrix_elements.F90.

◆ elec_angular_momentum_me()

subroutine, public elec_matrix_elements_oct_m::elec_angular_momentum_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
real(real64), dimension(:, :, :), intent(out), contiguous  ll,
real(real64), dimension(:, :), intent(out), optional, contiguous  l2 
)
Parameters
[out]ll(stnst, stnik, 1 or 3)
[out]l2(stnst, stnik)

Definition at line 218 of file elec_matrix_elements.F90.

◆ zelec_momentum_me()

subroutine elec_matrix_elements_oct_m::zelec_momentum_me ( type(namespace_t), intent(in)  namespace,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
real(real64), dimension(:,:,:), intent(out)  momentum,
logical, intent(in), optional  non_local 
)
private

The routine calculates the expectation value of the momentum operator.

\[ <p> = < phi*(ist, k) | -i \nabla | phi(ist, ik) > \]

Optionally, this can be used to compute the velocity matrix element if non_local=.true.

In this case this computes

\[ <v> = < phi*(ist, k) | \hat{v} | phi(ist, ik) > \]

Definition at line 301 of file elec_matrix_elements.F90.

◆ zelec_angular_momentum_me()

subroutine elec_matrix_elements_oct_m::zelec_angular_momentum_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
real(real64), dimension(:, :, :), intent(out), contiguous  ll,
real(real64), dimension(:, :), intent(out), optional, contiguous  l2 
)
private

It calculates the expectation value of the angular momentum of the states. If l2 is passed, it also calculates the expectation value of the square of the angular momentum of the state phi.

Parameters
[out]ll(stnst, stnik, 1 or 3)
[out]l2(stnst, stnik)

Definition at line 423 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_3d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_3d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
integer, intent(in)  ll,
integer, intent(in)  mm,
integer, intent(in)  ik,
complex(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the multipole matrix elements between KS states.

It prints the states to the file opened in iunit. It prints the (ll,mm) multipole moment, for the Kohn-Sham states in the irreducible subspace ik.

Definition at line 500 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_2d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_2d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
integer, intent(in)  ll,
integer, intent(in)  ik,
complex(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the dipole matrix elements (X or Y) between single orbitals, in the 1d case.

It prints the states to the file opened in iunit. It prints the moment, for single orbital states irreducible subspace ik. It only prints the first order moments X or Y. Eventually it should print the circular multipoles of arbitrary order, similar to the 3D case.

The argument ll should be 1 (X) or 2 (Y).

Definition at line 560 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_1d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_1d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
integer, intent(in)  ll,
integer, intent(in)  ik,
complex(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case.

It prints the states to the file opened in iunit. It prints the moment of ll-th order, for single orbital states irreducible subspace ik.

Definition at line 612 of file elec_matrix_elements.F90.

◆ zelec_dipole_me()

subroutine elec_matrix_elements_oct_m::zelec_dipole_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
integer, intent(in)  ik,
integer, intent(in)  st_start,
integer, intent(in)  st_end,
complex(real64), dimension(:,:,:), intent(out)  elements 
)
private

Computes the dipole matrix elements between KS states.

Definition at line 657 of file elec_matrix_elements.F90.

◆ zcalculate_expectation_values_matrix()

subroutine elec_matrix_elements_oct_m::zcalculate_expectation_values_matrix ( type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(derivatives_t), intent(in)  der,
type(states_elec_t), intent(inout)  st,
complex(real64), dimension(st%st_start:,st%st_start:,st%d%kpt%start:), intent(out)  eigen,
integer, intent(in), optional  terms,
logical, intent(in), optional  diagonal_states 
)
private

Definition at line 771 of file elec_matrix_elements.F90.

◆ zelec_one_body_me()

subroutine elec_matrix_elements_oct_m::zelec_one_body_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout)  st,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
integer, dimension(:), intent(out)  iindex,
integer, dimension(:), intent(out)  jindex,
complex(real64), dimension(:), intent(out)  oneint 
)
private

Definition at line 827 of file elec_matrix_elements.F90.

◆ zelec_two_body_me()

subroutine elec_matrix_elements_oct_m::zelec_two_body_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout), target  st,
class(space_t), intent(in)  space,
type(namespace_t), intent(in)  namespace,
type(kpoints_t), intent(in)  kpoints,
type(poisson_t), intent(inout)  psolver,
integer, intent(in)  st_min,
integer, intent(in)  st_max,
integer, dimension(:,:), intent(out)  iindex,
integer, dimension(:,:), intent(out)  jindex,
integer, dimension(:,:), intent(out)  kindex,
integer, dimension(:,:), intent(out)  lindex,
complex(real64), dimension(:), intent(out), contiguous  twoint,
type(phase_t), intent(in), optional  phase,
type(singularity_t), intent(in), optional  singularity,
logical, intent(in), optional  exc_k 
)
private

Definition at line 909 of file elec_matrix_elements.F90.

◆ delec_momentum_me()

subroutine elec_matrix_elements_oct_m::delec_momentum_me ( type(namespace_t), intent(in)  namespace,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
real(real64), dimension(:,:,:), intent(out)  momentum,
logical, intent(in), optional  non_local 
)
private

The routine calculates the expectation value of the momentum operator.

\[ <p> = < phi*(ist, k) | -i \nabla | phi(ist, ik) > \]

Optionally, this can be used to compute the velocity matrix element if non_local=.true.

In this case this computes

\[ <v> = < phi*(ist, k) | \hat{v} | phi(ist, ik) > \]

Definition at line 1199 of file elec_matrix_elements.F90.

◆ delec_angular_momentum_me()

subroutine elec_matrix_elements_oct_m::delec_angular_momentum_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
real(real64), dimension(:, :, :), intent(out), contiguous  ll,
real(real64), dimension(:, :), intent(out), optional, contiguous  l2 
)
private

It calculates the expectation value of the angular momentum of the states. If l2 is passed, it also calculates the expectation value of the square of the angular momentum of the state phi.

Parameters
[out]ll(stnst, stnik, 1 or 3)
[out]l2(stnst, stnik)

Definition at line 1321 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_3d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_3d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(space_t), intent(in)  space,
integer, intent(in)  ll,
integer, intent(in)  mm,
integer, intent(in)  ik,
real(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the multipole matrix elements between KS states.

It prints the states to the file opened in iunit. It prints the (ll,mm) multipole moment, for the Kohn-Sham states in the irreducible subspace ik.

Definition at line 1390 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_2d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_2d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
integer, intent(in)  ll,
integer, intent(in)  ik,
real(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the dipole matrix elements (X or Y) between single orbitals, in the 1d case.

It prints the states to the file opened in iunit. It prints the moment, for single orbital states irreducible subspace ik. It only prints the first order moments X or Y. Eventually it should print the circular multipoles of arbitrary order, similar to the 3D case.

The argument ll should be 1 (X) or 2 (Y).

Definition at line 1450 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_1d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_1d_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
integer, intent(in)  ll,
integer, intent(in)  ik,
real(real64), dimension(:,:), intent(out)  elements 
)
private

Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case.

It prints the states to the file opened in iunit. It prints the moment of ll-th order, for single orbital states irreducible subspace ik.

Definition at line 1502 of file elec_matrix_elements.F90.

◆ delec_dipole_me()

subroutine elec_matrix_elements_oct_m::delec_dipole_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
integer, intent(in)  ik,
integer, intent(in)  st_start,
integer, intent(in)  st_end,
real(real64), dimension(:,:,:), intent(out)  elements 
)
private

Computes the dipole matrix elements between KS states.

Definition at line 1547 of file elec_matrix_elements.F90.

◆ dcalculate_expectation_values_matrix()

subroutine elec_matrix_elements_oct_m::dcalculate_expectation_values_matrix ( type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(derivatives_t), intent(in)  der,
type(states_elec_t), intent(inout)  st,
real(real64), dimension(st%st_start:,st%st_start:,st%d%kpt%start:), intent(out)  eigen,
integer, intent(in), optional  terms,
logical, intent(in), optional  diagonal_states 
)
private

Definition at line 1650 of file elec_matrix_elements.F90.

◆ delec_one_body_me()

subroutine elec_matrix_elements_oct_m::delec_one_body_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout)  st,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
integer, dimension(:), intent(out)  iindex,
integer, dimension(:), intent(out)  jindex,
real(real64), dimension(:), intent(out)  oneint 
)
private

Definition at line 1706 of file elec_matrix_elements.F90.

◆ delec_two_body_me()

subroutine elec_matrix_elements_oct_m::delec_two_body_me ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout), target  st,
class(space_t), intent(in)  space,
type(namespace_t), intent(in)  namespace,
type(kpoints_t), intent(in)  kpoints,
type(poisson_t), intent(inout)  psolver,
integer, intent(in)  st_min,
integer, intent(in)  st_max,
integer, dimension(:,:), intent(out)  iindex,
integer, dimension(:,:), intent(out)  jindex,
integer, dimension(:,:), intent(out)  kindex,
integer, dimension(:,:), intent(out)  lindex,
real(real64), dimension(:), intent(out), contiguous  twoint,
type(phase_t), intent(in), optional  phase,
type(singularity_t), intent(in), optional  singularity,
logical, intent(in), optional  exc_k 
)
private

Definition at line 1788 of file elec_matrix_elements.F90.