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, known_lower_bound)
 
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...
 
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...
 
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, 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
 
real(real64), parameter, public default_eigenval = 1.0e10_real64
 

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 249 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,
logical, intent(out), optional  known_lower_bound 
)
Parameters
[in]st_startuse for unoccupied-states run
[in]lmm_rused only if not present(st_start)
[out]known_lower_boundOn exit, true if we have not done random states

Definition at line 768 of file lcao.F90.

◆ lcao_end()

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

Definition at line 944 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 974 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 1013 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 1026 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 1053 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 1070 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 1186 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 1452 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 1478 of file lcao.F90.

◆ get_angles_from_magnetization()

subroutine lcao_oct_m::get_angles_from_magnetization ( real(real64), dimension(3), 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 1509 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)  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 1543 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 1729 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 1796 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 2056 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 2165 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 2197 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 2250 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 2715 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 2835 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 2911 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 3179 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 3288 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 3320 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 3373 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 3848 of file lcao.F90.

Variable Documentation

◆ initrho_paramagnetic

integer, parameter lcao_oct_m::initrho_paramagnetic = 1
private

Definition at line 184 of file lcao.F90.

◆ initrho_ferromagnetic

integer, parameter lcao_oct_m::initrho_ferromagnetic = 2
private

Definition at line 184 of file lcao.F90.

◆ initrho_random

integer, parameter lcao_oct_m::initrho_random = 3
private

Definition at line 184 of file lcao.F90.

◆ initrho_userdef

integer, parameter lcao_oct_m::initrho_userdef = 77
private

Definition at line 184 of file lcao.F90.

◆ default_eigenval

real(real64), parameter, public lcao_oct_m::default_eigenval = 1.0e10_real64

Definition at line 244 of file lcao.F90.