Octopus
zora_oct_m Module Reference

This module implements the ZORA terms for the Hamoiltonian. More...

Detailed Description

This module implements the ZORA terms for the Hamoiltonian.

Data Types

interface  zora_t
 This class is responsible for calculating and applying the ZORA. More...
 

Functions/Subroutines

class(zora_t) function, pointer zora_constructor (namespace, der, st_d, ep, mass)
 initialize the ZORA More...
 
subroutine zora_finalize (this)
 finalize the ZORA object and free memory More...
 
subroutine zora_update (this, der, potential)
 update the ZORA potentials More...
 
subroutine dzora_apply_batch (this, mesh, der, states_dim, psib, hpsib)
 apply the ZORA to a batch of states psib More...
 
subroutine zzora_apply_batch (this, mesh, der, states_dim, psib, hpsib)
 apply the ZORA to a batch of states psib More...
 

Variables

integer, parameter, public zora_none = 0
 no ZORA More...
 
integer, parameter, public zora_scalar_relativistic = 1
 ZORA for scalar relativistic calculations. More...
 
integer, parameter, public zora_fully_relativistic = 2
 ZORA for fully relativistic calculations. More...
 

Function/Subroutine Documentation

◆ zora_constructor()

class(zora_t) function, pointer zora_oct_m::zora_constructor ( type(namespace_t), intent(in)  namespace,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  st_d,
type(epot_t), intent(in)  ep,
real(real64), intent(in)  mass 
)
private

initialize the ZORA

allocate memory for ZORA potentials.

Definition at line 174 of file zora.F90.

◆ zora_finalize()

subroutine zora_oct_m::zora_finalize ( type(zora_t), intent(inout)  this)
private

finalize the ZORA object and free memory

Definition at line 220 of file zora.F90.

◆ zora_update()

subroutine zora_oct_m::zora_update ( class(zora_t), intent(inout)  this,
class (derivatives_t), intent(in)  der,
real(real64), dimension(:, :), intent(in), contiguous  potential 
)
private

update the ZORA potentials

This routine performs calculations, which do not require the wave functions but only depend on the potential.

It calculates:

  • \( {\rm zora\%pot}({\bf r}) = \frac{c^2}{2c^2 - V({\bf r})} \)
  • \( {\rm zora\%grad_pot}({\bf r}) = \nabla \frac{c^2}{2c^2 - V({\bf r})} \)

and for the fully relativistic case

  • \( {\rm zora\%soc}({\bf r}) = {\rm prefactor}({\bf r}) \, \sigma \cdot ( \nabla V({\bf r}) \times {\bf p} )\) = \( {\rm prefactor}({\bf r}) * (\sigma \times ( \nabla V)({\bf r})) \cdot {\bf p} \)

where \( {\rm prefactor}({\bf r}) = {\rm so\_strength} * 2 c^2 / (2 m c^2 - {\rm V({\bf r})^2} ) \)

These are used in dzora_apply_batch() and zzora_apply_batch().

Parameters
[in,out]thisthe ZORA object
[in]derthe derivatives
[in]potentialdimensions (1:np, 1:thisspin_channels)

Definition at line 252 of file zora.F90.

◆ dzora_apply_batch()

subroutine zora_oct_m::dzora_apply_batch ( class(zora_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  states_dim,
type(wfs_elec_t), intent(inout), target  psib,
type(wfs_elec_t), intent(inout), target  hpsib 
)
private

apply the ZORA to a batch of states psib

Note
This routine assumes
  • that hpsib already contains \( (\boldsymbol{p}^2 \Phi^\mathrm{ZORA}) \)
  • that zora_oct_m::zora_update() had been called before.

The routine makes use of the relation:

\[ \boldsymbol{p} \frac{c^2}{2c^2 - V} \boldsymbol{p} \Phi^\mathrm{ZORA} = (\boldsymbol{p} \frac{c^2}{2c^2 - V})(\boldsymbol{p} \Phi^\mathrm{ZORA}) + \frac{c^2}{2c^2 - V} (\boldsymbol{p}^2 \Phi^\mathrm{ZORA}) \]

Parameters
[in]thisThe ZORA object
[in]meshmesh needs to be passed through
[in]derthe derivatives
[in]states_dimfor accessing the spin index from the batch
[in,out]psibinput states
[in,out]hpsiboutput states with ZORA applied

Definition at line 485 of file zora.F90.

◆ zzora_apply_batch()

subroutine zora_oct_m::zzora_apply_batch ( class(zora_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  states_dim,
type(wfs_elec_t), intent(inout), target  psib,
type(wfs_elec_t), intent(inout), target  hpsib 
)
private

apply the ZORA to a batch of states psib

Note
This routine assumes
  • that hpsib already contains \( (\boldsymbol{p}^2 \Phi^\mathrm{ZORA}) \)
  • that zora_oct_m::zora_update() had been called before.

The routine makes use of the relation:

\[ \boldsymbol{p} \frac{c^2}{2c^2 - V} \boldsymbol{p} \Phi^\mathrm{ZORA} = (\boldsymbol{p} \frac{c^2}{2c^2 - V})(\boldsymbol{p} \Phi^\mathrm{ZORA}) + \frac{c^2}{2c^2 - V} (\boldsymbol{p}^2 \Phi^\mathrm{ZORA}) \]

Parameters
[in]thisThe ZORA object
[in]meshmesh needs to be passed through
[in]derthe derivatives
[in]states_dimfor accessing the spin index from the batch
[in,out]psibinput states
[in,out]hpsiboutput states with ZORA applied

Definition at line 623 of file zora.F90.

Variable Documentation

◆ zora_none

integer, parameter, public zora_oct_m::zora_none = 0

no ZORA

Definition at line 138 of file zora.F90.

◆ zora_scalar_relativistic

integer, parameter, public zora_oct_m::zora_scalar_relativistic = 1

ZORA for scalar relativistic calculations.

Definition at line 138 of file zora.F90.

◆ zora_fully_relativistic

integer, parameter, public zora_oct_m::zora_fully_relativistic = 2

ZORA for fully relativistic calculations.

Definition at line 138 of file zora.F90.