Octopus
lcao_oct_m Module Reference

Data Types

type  lcao_t
 

Functions/Subroutines

subroutine, public lcao_init (this, namespace, space, gr, ions, st, st_start)
 
subroutine, public lcao_run (namespace, space, gr, ions, ext_partners, st, ks, hm, st_start, lmm_r)
 
subroutine, public lcao_end (this)
 
subroutine, public lcao_wf (this, st, gr, ions, hm, namespace, start)
 
logical function, public lcao_is_available (this)
 Returns true if LCAO can be done. More...
 
integer function, public lcao_num_orbitals (this)
 Returns the number of LCAO orbitas. More...
 
subroutine lcao_local_index (this, ig, jg, il, jl, prow, pcol)
 
subroutine lcao_alt_end_orbital (this, iatom)
 This function deallocates a set of an atomic orbitals for an atom. It can be called when the batch is empty, in that case it does not do anything. More...
 
subroutine lcao_atom_density (this, st, mesh, ions, iatom, spin_channels, rho)
 
subroutine lcao_guess_density (this, namespace, st, gr, hm, ions, qtot, ispin, rho)
 builds a density which is the sum of the atomic densities More...
 
real(real64) function integrated_charge_density (gr, st, rho)
 Computes the integral of rho, summed over spin channels. More...
 
subroutine accumulate_rotated_density (mesh, rho, atom_rho, theta, phi)
 
subroutine, public lcao_init_orbitals (this, namespace, st, gr, ions, start)
 
subroutine get_angles_from_magnetization (mag, lmag, theta, phi)
 Given a magnetization vector, and its norm, this returns the corresponding inclination and azimuthal angles. More...
 
subroutine rotate_random_states_to_local_frame (st, gr, rel_type, ist_start, gmd_opt)
 Rotate the spinors with band index >= ist_start to the local frame of the magnetization. More...
 
subroutine dlcao_atomic_orbital (this, iorb, mesh, st, ions, psi, spin_channel)
 This routine fills state psi with an atomic orbital – provided by the pseudopotential structure in geo. More...
 
subroutine dlcao_wf (this, st, gr, ions, hm, namespace, start)
 
subroutine dinit_orbitals (this, namespace, st, gr, ions, start)
 
subroutine dget_ao (this, st, mesh, ions, iorb, ispin, ao, use_psi)
 
subroutine dlcao_alt_init_orbitals (this, namespace, st, gr, ions, start)
 
subroutine dlcao_alt_wf (this, st, gr, ions, hm, namespace, start)
 The alternative implementation. More...
 
subroutine dlcao_alt_get_orbital (this, sphere, ions, ispin, iatom, norbs)
 This function generates the set of an atomic orbitals for an atom and stores it in the batch orbitalb. It can be called when the orbitals are already stored. In that case it does not do anything. More...
 
subroutine zlcao_atomic_orbital (this, iorb, mesh, st, ions, psi, spin_channel)
 This routine fills state psi with an atomic orbital – provided by the pseudopotential structure in geo. More...
 
subroutine zlcao_wf (this, st, gr, ions, hm, namespace, start)
 
subroutine zinit_orbitals (this, namespace, st, gr, ions, start)
 
subroutine zget_ao (this, st, mesh, ions, iorb, ispin, ao, use_psi)
 
subroutine zlcao_alt_init_orbitals (this, namespace, st, gr, ions, start)
 
subroutine zlcao_alt_wf (this, st, gr, ions, hm, namespace, start)
 The alternative implementation. More...
 
subroutine zlcao_alt_get_orbital (this, sphere, ions, ispin, iatom, norbs)
 This function generates the set of an atomic orbitals for an atom and stores it in the batch orbitalb. It can be called when the orbitals are already stored. In that case it does not do anything. More...
 

Variables

integer, parameter initrho_paramagnetic = 1
 
integer, parameter initrho_ferromagnetic = 2
 
integer, parameter initrho_random = 3
 
integer, parameter initrho_userdef = 77
 

Function/Subroutine Documentation

◆ lcao_init()

subroutine, public lcao_oct_m::lcao_init ( type(lcao_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
type(electron_space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(states_elec_t), intent(in)  st,
integer, intent(in)  st_start 
)

Definition at line 245 of file lcao.F90.

◆ lcao_run()

subroutine, public lcao_oct_m::lcao_run ( type(namespace_t), intent(in)  namespace,
type(electron_space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(partner_list_t), intent(in)  ext_partners,
type(states_elec_t), intent(inout)  st,
type(v_ks_t), intent(inout)  ks,
type(hamiltonian_elec_t), intent(inout)  hm,
integer, intent(in), optional  st_start,
real(real64), intent(in), optional  lmm_r 
)
Parameters
[in]st_startuse for unoccupied-states run
[in]lmm_rused only if not present(st_start)

Definition at line 810 of file lcao.F90.

◆ lcao_end()

subroutine, public lcao_oct_m::lcao_end ( type(lcao_t), intent(inout)  this)

Definition at line 980 of file lcao.F90.

◆ lcao_wf()

subroutine, public lcao_oct_m::lcao_wf ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(hamiltonian_elec_t), intent(in)  hm,
type(namespace_t), intent(in)  namespace,
integer, intent(in), optional  start 
)

Definition at line 1010 of file lcao.F90.

◆ lcao_is_available()

logical function, public lcao_oct_m::lcao_is_available ( type(lcao_t), intent(in)  this)

Returns true if LCAO can be done.

Definition at line 1049 of file lcao.F90.

◆ lcao_num_orbitals()

integer function, public lcao_oct_m::lcao_num_orbitals ( type(lcao_t), intent(in)  this)

Returns the number of LCAO orbitas.

Definition at line 1063 of file lcao.F90.

◆ lcao_local_index()

subroutine lcao_oct_m::lcao_local_index ( type(lcao_t), intent(in)  this,
integer, intent(in)  ig,
integer, intent(in)  jg,
integer, intent(out)  il,
integer, intent(out)  jl,
integer, intent(out)  prow,
integer, intent(out)  pcol 
)
private

Definition at line 1074 of file lcao.F90.

◆ lcao_alt_end_orbital()

subroutine lcao_oct_m::lcao_alt_end_orbital ( type(lcao_t), intent(inout)  this,
integer, intent(in)  iatom 
)
private

This function deallocates a set of an atomic orbitals for an atom. It can be called when the batch is empty, in that case it does not do anything.

Definition at line 1101 of file lcao.F90.

◆ lcao_atom_density()

subroutine lcao_oct_m::lcao_atom_density ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(ions_t), intent(in), target  ions,
integer, intent(in)  iatom,
integer, intent(in)  spin_channels,
real(real64), dimension(:, :), intent(inout)  rho 
)
private
Parameters
[in,out]rho(grnp, spin_channels)

Definition at line 1118 of file lcao.F90.

◆ lcao_guess_density()

subroutine lcao_oct_m::lcao_guess_density ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(in)  st,
type(grid_t), intent(in)  gr,
type(hamiltonian_elec_t), intent(in)  hm,
type(ions_t), intent(in)  ions,
real(real64), intent(in)  qtot,
integer, intent(in)  ispin,
real(real64), dimension(:, :), intent(out), contiguous  rho 
)
private

builds a density which is the sum of the atomic densities

Parameters
[in]qtotthe total charge of the system

Definition at line 1234 of file lcao.F90.

◆ integrated_charge_density()

real(real64) function lcao_oct_m::integrated_charge_density ( type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
real(real64), dimension(:,:), intent(in)  rho 
)
private

Computes the integral of rho, summed over spin channels.

Definition at line 1495 of file lcao.F90.

◆ accumulate_rotated_density()

subroutine lcao_oct_m::accumulate_rotated_density ( class(mesh_t), intent(in)  mesh,
real(real64), dimension(:,:), intent(inout)  rho,
real(real64), dimension(:,:), intent(in)  atom_rho,
real(real64), intent(in)  theta,
real(real64), intent(in)  phi 
)
private

Definition at line 1511 of file lcao.F90.

◆ lcao_init_orbitals()

subroutine, public lcao_oct_m::lcao_init_orbitals ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
integer, intent(in), optional  start 
)

Definition at line 1537 of file lcao.F90.

◆ get_angles_from_magnetization()

subroutine lcao_oct_m::get_angles_from_magnetization ( real(real64), dimension(:), intent(in)  mag,
real(real64), intent(in)  lmag,
real(real64), intent(out)  theta,
real(real64), intent(out)  phi 
)
private

Given a magnetization vector, and its norm, this returns the corresponding inclination and azimuthal angles.

Definition at line 1568 of file lcao.F90.

◆ rotate_random_states_to_local_frame()

subroutine lcao_oct_m::rotate_random_states_to_local_frame ( type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
integer, intent(in)  rel_type,
integer, intent(in)  ist_start,
integer, intent(in)  gmd_opt 
)
private

Rotate the spinors with band index >= ist_start to the local frame of the magnetization.

We first determine the direction given by the local density and then generate the spinor with components ( cos(theta/2); sin(theta/2) e^(-i\phi)) corresponding to the magnetization vector m=(sin(\theta)cos(\phi), sin(\theta)sin(\phi), cos(\theta)) i.e. the eigenvector of m.\sigma with a +1 eigenvalue

Definition at line 1608 of file lcao.F90.

◆ dlcao_atomic_orbital()

subroutine lcao_oct_m::dlcao_atomic_orbital ( type(lcao_t), intent(inout)  this,
integer, intent(in)  iorb,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(ions_t), intent(in), target  ions,
real(real64), dimension(:, :), intent(inout)  psi,
integer, intent(in)  spin_channel 
)
private

This routine fills state psi with an atomic orbital – provided by the pseudopotential structure in geo.

Definition at line 1790 of file lcao.F90.

◆ dlcao_wf()

subroutine lcao_oct_m::dlcao_wf ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(hamiltonian_elec_t), intent(in)  hm,
type(namespace_t), intent(in)  namespace,
integer, intent(in), optional  start 
)
private

Definition at line 1857 of file lcao.F90.

◆ dinit_orbitals()

subroutine lcao_oct_m::dinit_orbitals ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
integer, intent(in), optional  start 
)
private

Definition at line 2117 of file lcao.F90.

◆ dget_ao()

subroutine lcao_oct_m::dget_ao ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(ions_t), intent(in)  ions,
integer, intent(in)  iorb,
integer, intent(in)  ispin,
real(real64), dimension(:, :), intent(out), contiguous  ao,
logical, intent(in)  use_psi 
)
private

Definition at line 2226 of file lcao.F90.

◆ dlcao_alt_init_orbitals()

subroutine lcao_oct_m::dlcao_alt_init_orbitals ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
integer, intent(in), optional  start 
)
private

Definition at line 2258 of file lcao.F90.

◆ dlcao_alt_wf()

subroutine lcao_oct_m::dlcao_alt_wf ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(hamiltonian_elec_t), intent(in)  hm,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  start 
)
private

The alternative implementation.

Definition at line 2311 of file lcao.F90.

◆ dlcao_alt_get_orbital()

subroutine lcao_oct_m::dlcao_alt_get_orbital ( type(lcao_t), intent(inout)  this,
type(submesh_t), intent(in)  sphere,
type(ions_t), intent(in)  ions,
integer, intent(in)  ispin,
integer, intent(in)  iatom,
integer, intent(in)  norbs 
)
private

This function generates the set of an atomic orbitals for an atom and stores it in the batch orbitalb. It can be called when the orbitals are already stored. In that case it does not do anything.

Definition at line 2949 of file lcao.F90.

◆ zlcao_atomic_orbital()

subroutine lcao_oct_m::zlcao_atomic_orbital ( type(lcao_t), intent(inout)  this,
integer, intent(in)  iorb,
class(mesh_t), intent(in)  mesh,
type(states_elec_t), intent(in)  st,
type(ions_t), intent(in), target  ions,
complex(real64), dimension(:, :), intent(inout)  psi,
integer, intent(in)  spin_channel 
)
private

This routine fills state psi with an atomic orbital – provided by the pseudopotential structure in geo.

Definition at line 3069 of file lcao.F90.

◆ zlcao_wf()

subroutine lcao_oct_m::zlcao_wf ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(hamiltonian_elec_t), intent(in)  hm,
type(namespace_t), intent(in)  namespace,
integer, intent(in), optional  start 
)
private

Definition at line 3145 of file lcao.F90.

◆ zinit_orbitals()

subroutine lcao_oct_m::zinit_orbitals ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
integer, intent(in), optional  start 
)
private

Definition at line 3413 of file lcao.F90.

◆ zget_ao()

subroutine lcao_oct_m::zget_ao ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(in)  st,
class(mesh_t), intent(in)  mesh,
type(ions_t), intent(in)  ions,
integer, intent(in)  iorb,
integer, intent(in)  ispin,
complex(real64), dimension(:, :), intent(out), contiguous  ao,
logical, intent(in)  use_psi 
)
private

Definition at line 3522 of file lcao.F90.

◆ zlcao_alt_init_orbitals()

subroutine lcao_oct_m::zlcao_alt_init_orbitals ( type(lcao_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
integer, intent(in), optional  start 
)
private

Definition at line 3554 of file lcao.F90.

◆ zlcao_alt_wf()

subroutine lcao_oct_m::zlcao_alt_wf ( type(lcao_t), intent(inout)  this,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
type(ions_t), intent(in)  ions,
type(hamiltonian_elec_t), intent(in)  hm,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  start 
)
private

The alternative implementation.

Definition at line 3607 of file lcao.F90.

◆ zlcao_alt_get_orbital()

subroutine lcao_oct_m::zlcao_alt_get_orbital ( type(lcao_t), intent(inout)  this,
type(submesh_t), intent(in)  sphere,
type(ions_t), intent(in)  ions,
integer, intent(in)  ispin,
integer, intent(in)  iatom,
integer, intent(in)  norbs 
)
private

This function generates the set of an atomic orbitals for an atom and stores it in the batch orbitalb. It can be called when the orbitals are already stored. In that case it does not do anything.

Definition at line 4259 of file lcao.F90.

Variable Documentation

◆ initrho_paramagnetic

integer, parameter lcao_oct_m::initrho_paramagnetic = 1
private

Definition at line 236 of file lcao.F90.

◆ initrho_ferromagnetic

integer, parameter lcao_oct_m::initrho_ferromagnetic = 2
private

Definition at line 236 of file lcao.F90.

◆ initrho_random

integer, parameter lcao_oct_m::initrho_random = 3
private

Definition at line 236 of file lcao.F90.

◆ initrho_userdef

integer, parameter lcao_oct_m::initrho_userdef = 77
private

Definition at line 236 of file lcao.F90.