Octopus
elec_matrix_elements_oct_m Module Reference

Data Types

type  elec_matrix_elements_t
 

Functions/Subroutines

subroutine elec_matrix_elements_init (this, grid, space, states, st_start, st_end)
 Initialize the elec_matrix_elements object. More...
 
subroutine elec_matrix_elements_finalize (this)
 
subroutine elec_momentum_me (this, kpoints, momentum)
 
subroutine elec_angular_momentum_me (this, ll, l2)
 
subroutine zelec_momentum_me (this, kpoints, momentum)
 The routine calculates the expectation value of the momentum operator. More...
 
subroutine zelec_angular_momentum_me (this, 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 (this, ll, mm, ik, elements)
 Prints out the multipole matrix elements between KS states. More...
 
subroutine zelec_ks_multipoles_2d_me (this, 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 (this, ll, ik, elements)
 Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case. More...
 
subroutine zelec_dipole_me (this, namespace, hm, ions, ik, 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 (this, namespace, hm, iindex, jindex, oneint)
 
subroutine zelec_two_body_me (this, namespace, kpoints, psolver, st_min, st_max, iindex, jindex, kindex, lindex, twoint, phase, singularity, exc_k)
 
subroutine delec_momentum_me (this, kpoints, momentum)
 The routine calculates the expectation value of the momentum operator. More...
 
subroutine delec_angular_momentum_me (this, 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 (this, ll, mm, ik, elements)
 Prints out the multipole matrix elements between KS states. More...
 
subroutine delec_ks_multipoles_2d_me (this, 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 (this, ll, ik, elements)
 Prints out the multipole matrix elements (X**l) between single orbitals, in the 1d case. More...
 
subroutine delec_dipole_me (this, namespace, hm, ions, ik, 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 (this, namespace, hm, iindex, jindex, oneint)
 
subroutine delec_two_body_me (this, namespace, kpoints, psolver, st_min, st_max, iindex, jindex, kindex, lindex, twoint, phase, singularity, exc_k)
 

Function/Subroutine Documentation

◆ elec_matrix_elements_init()

subroutine elec_matrix_elements_oct_m::elec_matrix_elements_init ( class(elec_matrix_elements_t), intent(inout)  this,
type(grid_t), intent(in), target  grid,
class(space_t), intent(in), target  space,
type(states_elec_t), intent(in), target  states,
integer, intent(in), optional  st_start,
integer, intent(in), optional  st_end 
)
private

Initialize the elec_matrix_elements object.

Parameters
[in,out]thisThe object to be initialized
[in]gridThe grid of the electronic system
[in]spaceThe space object of the electronic system
[in]statesThe states object of the electronic system
[in]st_endStart and stop state index for the calculation

Definition at line 191 of file elec_matrix_elements.F90.

◆ elec_matrix_elements_finalize()

subroutine elec_matrix_elements_oct_m::elec_matrix_elements_finalize ( type(elec_matrix_elements_t), intent(inout)  this)
private

Definition at line 211 of file elec_matrix_elements.F90.

◆ elec_momentum_me()

subroutine elec_matrix_elements_oct_m::elec_momentum_me ( class(elec_matrix_elements_t), intent(in)  this,
type(kpoints_t), intent(in)  kpoints,
real(real64), dimension(:,:,:), intent(out)  momentum 
)
private

Definition at line 219 of file elec_matrix_elements.F90.

◆ elec_angular_momentum_me()

subroutine elec_matrix_elements_oct_m::elec_angular_momentum_me ( class(elec_matrix_elements_t), intent(in)  this,
real(real64), dimension(:, :, :), intent(out), contiguous  ll,
real(real64), dimension(:, :), intent(out), optional, contiguous  l2 
)
private
Parameters
[out]ll(stnst, stnik, 1 or 3)
[out]l2(stnst, stnik)

Definition at line 235 of file elec_matrix_elements.F90.

◆ zelec_momentum_me()

subroutine elec_matrix_elements_oct_m::zelec_momentum_me ( type(elec_matrix_elements_t), intent(in)  this,
type(kpoints_t), intent(in)  kpoints,
real(real64), dimension(:,:,:), intent(out)  momentum 
)
private

The routine calculates the expectation value of the momentum operator.

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

Definition at line 306 of file elec_matrix_elements.F90.

◆ zelec_angular_momentum_me()

subroutine elec_matrix_elements_oct_m::zelec_angular_momentum_me ( type(elec_matrix_elements_t), intent(in)  this,
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 411 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_3d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_3d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 486 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_2d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_2d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 544 of file elec_matrix_elements.F90.

◆ zelec_ks_multipoles_1d_me()

subroutine elec_matrix_elements_oct_m::zelec_ks_multipoles_1d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 595 of file elec_matrix_elements.F90.

◆ zelec_dipole_me()

subroutine elec_matrix_elements_oct_m::zelec_dipole_me ( class(elec_matrix_elements_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
integer, intent(in)  ik,
complex(real64), dimension(:,:,:), intent(out)  elements 
)
private

Computes the dipole matrix elements between KS states.

Definition at line 639 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 747 of file elec_matrix_elements.F90.

◆ zelec_one_body_me()

subroutine elec_matrix_elements_oct_m::zelec_one_body_me ( class(elec_matrix_elements_t), intent(in)  this,
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 803 of file elec_matrix_elements.F90.

◆ zelec_two_body_me()

subroutine elec_matrix_elements_oct_m::zelec_two_body_me ( class(elec_matrix_elements_t), intent(in)  this,
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 884 of file elec_matrix_elements.F90.

◆ delec_momentum_me()

subroutine elec_matrix_elements_oct_m::delec_momentum_me ( type(elec_matrix_elements_t), intent(in)  this,
type(kpoints_t), intent(in)  kpoints,
real(real64), dimension(:,:,:), intent(out)  momentum 
)
private

The routine calculates the expectation value of the momentum operator.

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

Definition at line 1164 of file elec_matrix_elements.F90.

◆ delec_angular_momentum_me()

subroutine elec_matrix_elements_oct_m::delec_angular_momentum_me ( type(elec_matrix_elements_t), intent(in)  this,
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 1269 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_3d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_3d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 1336 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_2d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_2d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 1394 of file elec_matrix_elements.F90.

◆ delec_ks_multipoles_1d_me()

subroutine elec_matrix_elements_oct_m::delec_ks_multipoles_1d_me ( class(elec_matrix_elements_t), intent(in)  this,
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 1445 of file elec_matrix_elements.F90.

◆ delec_dipole_me()

subroutine elec_matrix_elements_oct_m::delec_dipole_me ( class(elec_matrix_elements_t), intent(in)  this,
type(namespace_t), intent(in)  namespace,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
integer, intent(in)  ik,
real(real64), dimension(:,:,:), intent(out)  elements 
)
private

Computes the dipole matrix elements between KS states.

Definition at line 1489 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 1597 of file elec_matrix_elements.F90.

◆ delec_one_body_me()

subroutine elec_matrix_elements_oct_m::delec_one_body_me ( class(elec_matrix_elements_t), intent(in)  this,
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 1653 of file elec_matrix_elements.F90.

◆ delec_two_body_me()

subroutine elec_matrix_elements_oct_m::delec_two_body_me ( class(elec_matrix_elements_t), intent(in)  this,
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 1734 of file elec_matrix_elements.F90.