Octopus
hamiltonian_elec_base_oct_m Module Reference

Data Types

type  hamiltonian_elec_base_t
 The basic Hamiltonian for electronic system. More...
 

Functions/Subroutines

subroutine hamiltonian_elec_base_init (this, nspin, mass, rashba_coupling)
 initialize the hamiltonian_elec_base_t object More...
 
subroutine hamiltonian_elec_base_end (this)
 Finalizer for hamiltonian_elec_base_t. More...
 
subroutine hamiltonian_elec_base_clear (this, np)
 This functions sets to zero all fields that are currently allocated. More...
 
subroutine hamiltonian_elec_base_allocate (this, mesh, field, complex_potential)
 This function ensures that the corresponding field is allocated. More...
 
subroutine hamiltonian_elec_base_update_magnetic_terms (this, mesh, gyromagnetic_ratio, ispin)
 update the magnetic terms of the hamiltonian_elec_base_t. More...
 
subroutine hamiltonian_elec_base_accel_copy_pot (this, mesh, vtau)
 copy the potential to the acceleration device buffer More...
 
logical pure function hamiltonian_elec_base_has_magnetic (this)
 return .true. if the Hamiltonian contains any magnetic field More...
 
logical pure function hamiltonian_elec_base_has_zeeman (this)
 return .true. of the Hamiltonian contains a zeeman term More...
 
logical pure function hamiltonian_elec_base_has_vector_potential (this)
 return .true. of the Hamiltonian contains any vector potential More...
 
subroutine hamiltonian_elec_base_rashba (this, mesh, der, std, psib, vpsib)
 
subroutine dhamiltonian_elec_base_local (this, mesh, std, ispin, psib, vpsib, async)
 apply the local potential (stored in the hamiltonian) to the states More...
 
subroutine, public dhamiltonian_elec_base_local_sub (potential, mesh, std, ispin, psib, vpsib, Impotential, potential_accel, impotential_accel, async)
 apply a local potential to a set of states More...
 
subroutine dhamiltonian_elec_base_magnetic (this, mesh, der, std, ep, ispin, psib, vpsib)
 apply magnetic terms form the Hamiltonian to the wave functions More...
 
subroutine zhamiltonian_elec_base_local (this, mesh, std, ispin, psib, vpsib, async)
 apply the local potential (stored in the hamiltonian) to the states More...
 
subroutine, public zhamiltonian_elec_base_local_sub (potential, mesh, std, ispin, psib, vpsib, Impotential, potential_accel, impotential_accel, async)
 apply a local potential to a set of states More...
 
subroutine zhamiltonian_elec_base_magnetic (this, mesh, der, std, ep, ispin, psib, vpsib)
 apply magnetic terms form the Hamiltonian to the wave functions More...
 

Variables

integer, parameter, public term_all = HUGE(1)
 
integer, parameter, public term_kinetic = 1
 
integer, parameter, public term_local_potential = 2
 
integer, parameter, public term_non_local_potential = 4
 
integer, parameter, public term_others = 8
 
integer, parameter, public term_local_external = 16
 
integer, parameter, public term_mgga = 32
 
integer, parameter, public term_dft_u = 64
 
integer, parameter, public term_rdmft_occ = 128
 
integer, parameter, public field_potential = 1
 
integer, parameter, public field_vector_potential = 2
 
integer, parameter, public field_uniform_vector_potential = 4
 
integer, parameter, public field_uniform_magnetic_field = 8
 
integer, parameter, public field_magnetic_field = 16
 

Function/Subroutine Documentation

◆ hamiltonian_elec_base_init()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_init ( class(hamiltonian_elec_base_t), intent(inout)  this,
integer, intent(in)  nspin,
real(real64), intent(in)  mass,
real(real64), intent(in)  rashba_coupling 
)
private

initialize the hamiltonian_elec_base_t object

Definition at line 232 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_end()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_end ( class(hamiltonian_elec_base_t), intent(inout)  this)
private

Finalizer for hamiltonian_elec_base_t.

Definition at line 250 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_clear()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_clear ( class(hamiltonian_elec_base_t), intent(inout)  this,
integer, intent(in)  np 
)
private

This functions sets to zero all fields that are currently allocated.

Definition at line 279 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_allocate()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_allocate ( class(hamiltonian_elec_base_t), intent(inout)  this,
class(mesh_t), intent(in)  mesh,
integer, intent(in)  field,
logical, intent(in)  complex_potential 
)
private

This function ensures that the corresponding field is allocated.

Definition at line 332 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_update_magnetic_terms()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_update_magnetic_terms ( class(hamiltonian_elec_base_t), intent(inout)  this,
class(mesh_t), intent(in)  mesh,
real(real64), intent(in)  gyromagnetic_ratio,
integer, intent(in)  ispin 
)
private

update the magnetic terms of the hamiltonian_elec_base_t.

If both a uniform and non-uniform vector potentials are allocated, this function copies the uniform in the non-uniform one. In the future it may perform other internal consistency operations.

Definition at line 413 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_accel_copy_pot()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_accel_copy_pot ( class(hamiltonian_elec_base_t), intent(inout)  this,
class(mesh_t), intent(in)  mesh,
real(real64), dimension(:,:), intent(in), optional  vtau 
)
private

copy the potential to the acceleration device buffer

Definition at line 489 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_has_magnetic()

logical pure function hamiltonian_elec_base_oct_m::hamiltonian_elec_base_has_magnetic ( class(hamiltonian_elec_base_t), intent(in)  this)
private

return .true. if the Hamiltonian contains any magnetic field

Definition at line 518 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_has_zeeman()

logical pure function hamiltonian_elec_base_oct_m::hamiltonian_elec_base_has_zeeman ( class(hamiltonian_elec_base_t), intent(in)  this)
private

return .true. of the Hamiltonian contains a zeeman term

Definition at line 529 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_has_vector_potential()

logical pure function hamiltonian_elec_base_oct_m::hamiltonian_elec_base_has_vector_potential ( class(hamiltonian_elec_base_t), intent(in)  this)
private

return .true. of the Hamiltonian contains any vector potential

Definition at line 539 of file hamiltonian_elec_base.F90.

◆ hamiltonian_elec_base_rashba()

subroutine hamiltonian_elec_base_oct_m::hamiltonian_elec_base_rashba ( class(hamiltonian_elec_base_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  std,
type(wfs_elec_t), intent(in), target  psib,
type(wfs_elec_t), intent(inout), target  vpsib 
)
private

Definition at line 548 of file hamiltonian_elec_base.F90.

◆ dhamiltonian_elec_base_local()

subroutine hamiltonian_elec_base_oct_m::dhamiltonian_elec_base_local ( class(hamiltonian_elec_base_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
integer, intent(in)  ispin,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  vpsib,
logical, intent(in), optional  async 
)
private

apply the local potential (stored in the hamiltonian) to the states

Parameters
[in]stddimensions of the states
[in]ispinspin channel
[in]psiboriginal states
[in,out]vpsibstates multiplied by local potential

Definition at line 677 of file hamiltonian_elec_base.F90.

◆ dhamiltonian_elec_base_local_sub()

subroutine, public hamiltonian_elec_base_oct_m::dhamiltonian_elec_base_local_sub ( real(real64), dimension(:,:), intent(in), contiguous  potential,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
integer, intent(in)  ispin,
class(batch_t), intent(in), target  psib,
class(batch_t), intent(inout), target  vpsib,
real(real64), dimension(:,:), intent(in), optional, contiguous  Impotential,
type(accel_mem_t), intent(in), optional, target  potential_accel,
type(accel_mem_t), intent(in), optional, target  impotential_accel,
logical, intent(in), optional  async 
)

apply a local potential to a set of states

This auxiliary routine multiples the wave functions in psib by a potential, provided as argument, and returns the new set of states in vpsib.

Parameters
[in]potentialreal potential v
[in]meshthe mesh
[in]stddimensions of the states
[in]ispinspin channel
[in]psiboriginal wave functions
[in,out]vpsibwave functions multiplied by v
[in]impotentialoptional imaginary potential
[in]potential_acceldevice buffer for Re(v)
[in]impotential_acceldevide buffer for Im(v)

Definition at line 716 of file hamiltonian_elec_base.F90.

◆ dhamiltonian_elec_base_magnetic()

subroutine hamiltonian_elec_base_oct_m::dhamiltonian_elec_base_magnetic ( class(hamiltonian_elec_base_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  std,
type(epot_t), intent(in)  ep,
integer, intent(in)  ispin,
type(wfs_elec_t), intent(inout), target  psib,
type(wfs_elec_t), intent(inout), target  vpsib 
)
private

apply magnetic terms form the Hamiltonian to the wave functions

Definition at line 952 of file hamiltonian_elec_base.F90.

◆ zhamiltonian_elec_base_local()

subroutine hamiltonian_elec_base_oct_m::zhamiltonian_elec_base_local ( class(hamiltonian_elec_base_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
integer, intent(in)  ispin,
type(wfs_elec_t), intent(in)  psib,
type(wfs_elec_t), intent(inout)  vpsib,
logical, intent(in), optional  async 
)
private

apply the local potential (stored in the hamiltonian) to the states

Parameters
[in]stddimensions of the states
[in]ispinspin channel
[in]psiboriginal states
[in,out]vpsibstates multiplied by local potential

Definition at line 1101 of file hamiltonian_elec_base.F90.

◆ zhamiltonian_elec_base_local_sub()

subroutine, public hamiltonian_elec_base_oct_m::zhamiltonian_elec_base_local_sub ( real(real64), dimension(:,:), intent(in), contiguous  potential,
class(mesh_t), intent(in)  mesh,
type(states_elec_dim_t), intent(in)  std,
integer, intent(in)  ispin,
class(batch_t), intent(in), target  psib,
class(batch_t), intent(inout), target  vpsib,
real(real64), dimension(:,:), intent(in), optional, contiguous  Impotential,
type(accel_mem_t), intent(in), optional, target  potential_accel,
type(accel_mem_t), intent(in), optional, target  impotential_accel,
logical, intent(in), optional  async 
)

apply a local potential to a set of states

This auxiliary routine multiples the wave functions in psib by a potential, provided as argument, and returns the new set of states in vpsib.

Parameters
[in]potentialreal potential v
[in]meshthe mesh
[in]stddimensions of the states
[in]ispinspin channel
[in]psiboriginal wave functions
[in,out]vpsibwave functions multiplied by v
[in]impotentialoptional imaginary potential
[in]potential_acceldevice buffer for Re(v)
[in]impotential_acceldevide buffer for Im(v)

Definition at line 1140 of file hamiltonian_elec_base.F90.

◆ zhamiltonian_elec_base_magnetic()

subroutine hamiltonian_elec_base_oct_m::zhamiltonian_elec_base_magnetic ( class(hamiltonian_elec_base_t), intent(in)  this,
class(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(states_elec_dim_t), intent(in)  std,
type(epot_t), intent(in)  ep,
integer, intent(in)  ispin,
type(wfs_elec_t), intent(inout), target  psib,
type(wfs_elec_t), intent(inout), target  vpsib 
)
private

apply magnetic terms form the Hamiltonian to the wave functions

Definition at line 1466 of file hamiltonian_elec_base.F90.

Variable Documentation

◆ term_all

integer, parameter, public hamiltonian_elec_base_oct_m::term_all = HUGE(1)

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_kinetic

integer, parameter, public hamiltonian_elec_base_oct_m::term_kinetic = 1

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_local_potential

integer, parameter, public hamiltonian_elec_base_oct_m::term_local_potential = 2

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_non_local_potential

integer, parameter, public hamiltonian_elec_base_oct_m::term_non_local_potential = 4

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_others

integer, parameter, public hamiltonian_elec_base_oct_m::term_others = 8

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_local_external

integer, parameter, public hamiltonian_elec_base_oct_m::term_local_external = 16

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_mgga

integer, parameter, public hamiltonian_elec_base_oct_m::term_mgga = 32

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_dft_u

integer, parameter, public hamiltonian_elec_base_oct_m::term_dft_u = 64

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ term_rdmft_occ

integer, parameter, public hamiltonian_elec_base_oct_m::term_rdmft_occ = 128

Definition at line 209 of file hamiltonian_elec_base.F90.

◆ field_potential

integer, parameter, public hamiltonian_elec_base_oct_m::field_potential = 1

Definition at line 220 of file hamiltonian_elec_base.F90.

◆ field_vector_potential

integer, parameter, public hamiltonian_elec_base_oct_m::field_vector_potential = 2

Definition at line 220 of file hamiltonian_elec_base.F90.

◆ field_uniform_vector_potential

integer, parameter, public hamiltonian_elec_base_oct_m::field_uniform_vector_potential = 4

Definition at line 220 of file hamiltonian_elec_base.F90.

◆ field_uniform_magnetic_field

integer, parameter, public hamiltonian_elec_base_oct_m::field_uniform_magnetic_field = 8

Definition at line 220 of file hamiltonian_elec_base.F90.

◆ field_magnetic_field

integer, parameter, public hamiltonian_elec_base_oct_m::field_magnetic_field = 16

Definition at line 220 of file hamiltonian_elec_base.F90.