Octopus
global_oct_m Module Reference

Data Types

interface  assert_die
 This function is defined in messages.F90. More...
 
interface  bitand
 
type  conf_t
 Build configuration type. More...
 
interface  i4_to_i8
 
interface  i8_to_i4
 
interface  operator(+)
 
interface  optional_default
 

Functions/Subroutines

subroutine conf_init (this)
 Initialiser for conf_t. More...
 
subroutine, public global_init (communicator)
 Initialise Octopus. More...
 
subroutine, public init_octopus_globals (comm)
 Initialise Octopus-specific global constants and files. This routine performs no initialisation calls to the MPI library and is suitable as an entry point for serial Octopus utilities: call init_octopus_globals(SERIAL_DUMMY_COMM) More...
 
subroutine, public global_end ()
 Finalise parser varinfo file, and MPI. More...
 
real(real64) pure function doptional_default (opt, def)
 
complex(real64) pure function zoptional_default (opt, def)
 
integer pure function ioptional_default (opt, def)
 
integer(int64) pure function loptional_default (opt, def)
 
logical pure function looptional_default (opt, def)
 
character(len=80) pure function soptional_default (opt, def)
 
logical pure function, public not_in_openmp ()
 
character(len=len(str1)+len(str2)) function cat (str1, str2)
 
integer(int64) pure function bitand48 (val1, val2)
 
integer(int64) pure function bitand84 (val1, val2)
 
integer(int64) pure function bitand88 (val1, val2)
 
integer(int32) pure function bitand44 (val1, val2)
 
integer(int64) pure function i4_to_i8_0 (ii)
 
integer(int32) pure function i8_to_i4_0 (ii)
 
pure integer(int64) function, dimension(lbound(ii, 1, kind=int64):ubound(ii, 1, kind=int64)) i4_to_i8_1 (ii)
 
pure integer(int32) function, dimension(lbound(ii, 1, kind=int64):ubound(ii, 1, kind=int64)) i8_to_i4_1 (ii)
 

Variables

integer, parameter, public max_path_len =512
 Public types, variables and procedures. More...
 
integer, parameter, public max_output_types =44
 
type(conf_t), public conf
 Global instance of Octopus configuration. More...
 
real(real64), parameter, public r_small = 1e-8_real64
 
real(real64), parameter, public r_min_atom_dist = 1e-3_real64
 Minimal distance between two distinguishable atoms. More...
 
real(real64), parameter, public m_pi = 3.1415926535897932384626433832795029_real64
 some mathematical constants More...
 
real(real64), parameter, public m_e = 2.7182818284590452353602874713526625_real64
 
real(real64), parameter, public m_zero = 0.0_real64
 
real(real64), parameter, public m_one = 1.0_real64
 
real(real64), parameter, public m_two = 2.0_real64
 
real(real64), parameter, public m_three = 3.0_real64
 
real(real64), parameter, public m_four = 4.0_real64
 
real(real64), parameter, public m_five = 5.0_real64
 
real(real64), parameter, public m_half = 0.5_real64
 
real(real64), parameter, public m_third = M_ONE/M_THREE
 
real(real64), parameter, public m_twothird = M_TWO/M_THREE
 
real(real64), parameter, public m_fourth = M_ONE/M_FOUR
 
complex(real64), parameter, public m_z0 = (0.0_real64, 0.0_real64)
 
complex(real64), parameter, public m_z1 = (1.0_real64, 0.0_real64)
 
complex(real64), parameter, public m_z2 = (2.0_real64, 0.0_real64)
 
complex(real64), parameter, public m_z2i = (0.0_real64, 2.0_real64)
 
complex(real64), parameter, public m_zi = (0.0_real64, 1.0_real64)
 
real(real64), parameter, public m_epsilon = epsilon(M_ONE)
 
real(real64), parameter, public m_tiny = tiny(M_ONE)
 
real(real64), parameter, public m_huge = huge(M_ONE)
 
real(real64), parameter, public m_min_exp_arg = -650_real64
 
real(real64), parameter, public m_max_exp_arg = 700_real64
 
real(real64), parameter, public m_min_occ = 1.0e-10_real64
 Minimal occupation that is considered to be non-zero. More...
 
real(real64), parameter, public m_min_density = 1.0e-20_real64
 Minimal density that is considered to be non-zero. More...
 
real(real64), parameter, public lmm_r_single_atom = 100.0_real64
 Default local magnetic moments sphere radius for an isolated system. More...
 
real(real64), parameter, public p_a_b = 0.52917720859_real64
 some physical constants More...
 
real(real64), parameter, public p_ang = M_ONE / P_a_B
 
real(real64), parameter, public p_ry = 13.60569193_real64
 
real(real64), parameter, public p_ev = M_ONE / P_Ry
 
real(real64), parameter, public p_kb = 8.617343e-5_real64/(M_TWO*P_Ry)
 Boltzmann constant in Ha/K. More...
 
real(real64), parameter, public p_c = 137.035999679_real64
 Electron gyromagnetic ratio, see Phys. Rev. Lett. 130, 071801 (2023) More...
 
real(real64), parameter, public p_g = 2.00231930436118_real64
 
real(real64), parameter, public p_proton_charge = -1.0_real64
 
real(real64), parameter, public p_ep = M_ONE/(M_FOUR*M_Pi)
 
real(real64), parameter, public p_mu = M_FOUR*M_PI/(P_c**2)
 
integer, public stderr
 the standard input and output More...
 
integer, public stdin
 
integer, public stdout
 
integer, public s_epoch_sec
 global epoch time (time at startup) More...
 
integer, public s_epoch_usec
 
character(len=80), dimension(50), public sub_stack
 The stack. More...
 
real(real64), dimension(50), public time_stack
 
integer, public no_sub_stack = 0
 
logical, public in_profiling_mode = .false.
 Same for profiling mode. More...
 
integer, public global_alloc_err
 
integer(int64), public global_sizeof
 
character(len=100), public global_alloc_errmsg
 
character(len= *), parameter, public gs_dir = "gs/"
 
character(len= *), parameter, public td_dir = "td/"
 
character(len= *), parameter, public static_dir = "static/"
 
character(len= *), parameter, public em_resp_dir = "em_resp/"
 
character(len= *), parameter, public em_resp_fd_dir = "em_resp_fd/"
 
character(len= *), parameter, public kdotp_dir = "kdotp/"
 
character(len= *), parameter, public vib_modes_dir = "vib_modes/"
 
character(len= *), parameter, public vdw_dir = "vdw/"
 
character(len= *), parameter, public casida_dir = "casida/"
 
character(len= *), parameter, public oct_dir = "opt-control/"
 
character(len= *), parameter, public pcm_dir = "pcm/"
 
character(len= *), parameter, public partition_dir = "partition/"
 
type(mpi_comm), parameter, public serial_dummy_comm = MPI_COMM_UNDEFINED
 Alias MPI_COMM_UNDEFINED for the specific use case of initialising Octopus utilities with no MPI support. More...
 

Function/Subroutine Documentation

◆ conf_init()

subroutine global_oct_m::conf_init ( class(conf_t), intent(inout)  this)
private

Initialiser for conf_t.

Definition at line 306 of file global.F90.

◆ global_init()

subroutine, public global_oct_m::global_init ( type(mpi_comm), intent(in), optional  communicator)

Initialise Octopus.

Main entry point for callers initialising Octopus. If a communicator is passed, no call is made to initialise MPI_COMM_WORLD. Else, Octopus initialises MPI_COMM_WORLD

Parameters
[in]communicatorOptional MPI communicator from caller

Definition at line 323 of file global.F90.

◆ init_octopus_globals()

subroutine, public global_oct_m::init_octopus_globals ( type(mpi_comm), intent(in)  comm)

Initialise Octopus-specific global constants and files. This routine performs no initialisation calls to the MPI library and is suitable as an entry point for serial Octopus utilities: call init_octopus_globals(SERIAL_DUMMY_COMM)

This routine initialises:

  • MPI world env container
  • Default CPU cache sizes
  • varinfo file, required for the parser
  • Configuration instance.
    Parameters
    [in]commMPI communicator. Can be a dummy value for serial apps.
    [in]comm32 kB cache, 64 B line size
    [in]comm4.096 MB cache, 64 B line size

Definition at line 352 of file global.F90.

◆ global_end()

subroutine, public global_oct_m::global_end

Finalise parser varinfo file, and MPI.

Definition at line 380 of file global.F90.

◆ doptional_default()

real(real64) pure function global_oct_m::doptional_default ( real(real64), intent(in), optional  opt,
real(real64), intent(in)  def 
)
private

Definition at line 388 of file global.F90.

◆ zoptional_default()

complex(real64) pure function global_oct_m::zoptional_default ( complex(real64), intent(in), optional  opt,
complex(real64), intent(in)  def 
)
private

Definition at line 398 of file global.F90.

◆ ioptional_default()

integer pure function global_oct_m::ioptional_default ( integer, intent(in), optional  opt,
integer, intent(in)  def 
)
private

Definition at line 408 of file global.F90.

◆ loptional_default()

integer(int64) pure function global_oct_m::loptional_default ( integer(int64), intent(in), optional  opt,
integer(int64), intent(in)  def 
)
private

Definition at line 418 of file global.F90.

◆ looptional_default()

logical pure function global_oct_m::looptional_default ( logical, intent(in), optional  opt,
logical, intent(in)  def 
)
private

Definition at line 428 of file global.F90.

◆ soptional_default()

character(len=80) pure function global_oct_m::soptional_default ( character(len=*), intent(in), optional  opt,
character(len=*), intent(in)  def 
)
private

Definition at line 438 of file global.F90.

◆ not_in_openmp()

logical pure function, public global_oct_m::not_in_openmp

Definition at line 448 of file global.F90.

◆ cat()

character(len=len(str1) + len(str2)) function global_oct_m::cat ( character(len=*), intent(in)  str1,
character(len=*), intent(in)  str2 
)
private

Definition at line 464 of file global.F90.

◆ bitand48()

integer(int64) pure function global_oct_m::bitand48 ( integer(int32), intent(in)  val1,
integer(int64), intent(in)  val2 
)
private

Definition at line 475 of file global.F90.

◆ bitand84()

integer(int64) pure function global_oct_m::bitand84 ( integer(int64), intent(in)  val1,
integer(int32), intent(in)  val2 
)
private

Definition at line 485 of file global.F90.

◆ bitand88()

integer(int64) pure function global_oct_m::bitand88 ( integer(int64), intent(in)  val1,
integer(int64), intent(in)  val2 
)
private

Definition at line 495 of file global.F90.

◆ bitand44()

integer(int32) pure function global_oct_m::bitand44 ( integer(int32), intent(in)  val1,
integer(int32), intent(in)  val2 
)
private

Definition at line 505 of file global.F90.

◆ i4_to_i8_0()

integer(int64) pure function global_oct_m::i4_to_i8_0 ( integer(int32), intent(in)  ii)
private

Definition at line 515 of file global.F90.

◆ i8_to_i4_0()

integer(int32) pure function global_oct_m::i8_to_i4_0 ( integer(int64), intent(in)  ii)
private

Definition at line 523 of file global.F90.

◆ i4_to_i8_1()

pure integer(int64) function, dimension(lbound(ii, 1, kind=int64):ubound(ii, 1, kind=int64)) global_oct_m::i4_to_i8_1 ( integer(int32), dimension(:), intent(in)  ii)
private

Definition at line 531 of file global.F90.

◆ i8_to_i4_1()

pure integer(int32) function, dimension(lbound(ii, 1, kind=int64):ubound(ii, 1, kind=int64)) global_oct_m::i8_to_i4_1 ( integer(int64), dimension(:), intent(in)  ii)
private

Definition at line 540 of file global.F90.

Variable Documentation

◆ max_path_len

integer, parameter, public global_oct_m::max_path_len =512

Public types, variables and procedures.

Definition at line 147 of file global.F90.

◆ max_output_types

integer, parameter, public global_oct_m::max_output_types =44

Definition at line 148 of file global.F90.

◆ conf

type(conf_t), public global_oct_m::conf

Global instance of Octopus configuration.

Definition at line 177 of file global.F90.

◆ r_small

real(real64), parameter, public global_oct_m::r_small = 1e-8_real64

Definition at line 179 of file global.F90.

◆ r_min_atom_dist

real(real64), parameter, public global_oct_m::r_min_atom_dist = 1e-3_real64

Minimal distance between two distinguishable atoms.

Definition at line 182 of file global.F90.

◆ m_pi

real(real64), parameter, public global_oct_m::m_pi = 3.1415926535897932384626433832795029_real64

some mathematical constants

Definition at line 185 of file global.F90.

◆ m_e

real(real64), parameter, public global_oct_m::m_e = 2.7182818284590452353602874713526625_real64

Definition at line 186 of file global.F90.

◆ m_zero

real(real64), parameter, public global_oct_m::m_zero = 0.0_real64

Definition at line 187 of file global.F90.

◆ m_one

real(real64), parameter, public global_oct_m::m_one = 1.0_real64

Definition at line 188 of file global.F90.

◆ m_two

real(real64), parameter, public global_oct_m::m_two = 2.0_real64

Definition at line 189 of file global.F90.

◆ m_three

real(real64), parameter, public global_oct_m::m_three = 3.0_real64

Definition at line 190 of file global.F90.

◆ m_four

real(real64), parameter, public global_oct_m::m_four = 4.0_real64

Definition at line 191 of file global.F90.

◆ m_five

real(real64), parameter, public global_oct_m::m_five = 5.0_real64

Definition at line 192 of file global.F90.

◆ m_half

real(real64), parameter, public global_oct_m::m_half = 0.5_real64

Definition at line 193 of file global.F90.

◆ m_third

real(real64), parameter, public global_oct_m::m_third = M_ONE/M_THREE

Definition at line 194 of file global.F90.

◆ m_twothird

real(real64), parameter, public global_oct_m::m_twothird = M_TWO/M_THREE

Definition at line 195 of file global.F90.

◆ m_fourth

real(real64), parameter, public global_oct_m::m_fourth = M_ONE/M_FOUR

Definition at line 196 of file global.F90.

◆ m_z0

complex(real64), parameter, public global_oct_m::m_z0 = (0.0_real64, 0.0_real64)

Definition at line 197 of file global.F90.

◆ m_z1

complex(real64), parameter, public global_oct_m::m_z1 = (1.0_real64, 0.0_real64)

Definition at line 198 of file global.F90.

◆ m_z2

complex(real64), parameter, public global_oct_m::m_z2 = (2.0_real64, 0.0_real64)

Definition at line 199 of file global.F90.

◆ m_z2i

complex(real64), parameter, public global_oct_m::m_z2i = (0.0_real64, 2.0_real64)

Definition at line 200 of file global.F90.

◆ m_zi

complex(real64), parameter, public global_oct_m::m_zi = (0.0_real64, 1.0_real64)

Definition at line 201 of file global.F90.

◆ m_epsilon

real(real64), parameter, public global_oct_m::m_epsilon = epsilon(M_ONE)

Definition at line 203 of file global.F90.

◆ m_tiny

real(real64), parameter, public global_oct_m::m_tiny = tiny(M_ONE)

Definition at line 204 of file global.F90.

◆ m_huge

real(real64), parameter, public global_oct_m::m_huge = huge(M_ONE)

Definition at line 205 of file global.F90.

◆ m_min_exp_arg

real(real64), parameter, public global_oct_m::m_min_exp_arg = -650_real64

Definition at line 206 of file global.F90.

◆ m_max_exp_arg

real(real64), parameter, public global_oct_m::m_max_exp_arg = 700_real64

Definition at line 207 of file global.F90.

◆ m_min_occ

real(real64), parameter, public global_oct_m::m_min_occ = 1.0e-10_real64

Minimal occupation that is considered to be non-zero.

Definition at line 210 of file global.F90.

◆ m_min_density

real(real64), parameter, public global_oct_m::m_min_density = 1.0e-20_real64

Minimal density that is considered to be non-zero.

Definition at line 212 of file global.F90.

◆ lmm_r_single_atom

real(real64), parameter, public global_oct_m::lmm_r_single_atom = 100.0_real64

Default local magnetic moments sphere radius for an isolated system.

Definition at line 215 of file global.F90.

◆ p_a_b

real(real64), parameter, public global_oct_m::p_a_b = 0.52917720859_real64

some physical constants

Definition at line 218 of file global.F90.

◆ p_ang

real(real64), parameter, public global_oct_m::p_ang = M_ONE / P_a_B

Definition at line 219 of file global.F90.

◆ p_ry

real(real64), parameter, public global_oct_m::p_ry = 13.60569193_real64

Definition at line 220 of file global.F90.

◆ p_ev

real(real64), parameter, public global_oct_m::p_ev = M_ONE / P_Ry

Definition at line 221 of file global.F90.

◆ p_kb

real(real64), parameter, public global_oct_m::p_kb = 8.617343e-5_real64/(M_TWO*P_Ry)

Boltzmann constant in Ha/K.

Definition at line 222 of file global.F90.

◆ p_c

real(real64), parameter, public global_oct_m::p_c = 137.035999679_real64

Electron gyromagnetic ratio, see Phys. Rev. Lett. 130, 071801 (2023)

Definition at line 223 of file global.F90.

◆ p_g

real(real64), parameter, public global_oct_m::p_g = 2.00231930436118_real64

Definition at line 225 of file global.F90.

◆ p_proton_charge

real(real64), parameter, public global_oct_m::p_proton_charge = -1.0_real64

Definition at line 226 of file global.F90.

◆ p_ep

real(real64), parameter, public global_oct_m::p_ep = M_ONE/(M_FOUR*M_Pi)

Definition at line 227 of file global.F90.

◆ p_mu

real(real64), parameter, public global_oct_m::p_mu = M_FOUR*M_PI/(P_c**2)

Definition at line 228 of file global.F90.

◆ stderr

integer, public global_oct_m::stderr

the standard input and output

Definition at line 231 of file global.F90.

◆ stdin

integer, public global_oct_m::stdin

Definition at line 231 of file global.F90.

◆ stdout

integer, public global_oct_m::stdout

Definition at line 231 of file global.F90.

◆ s_epoch_sec

integer, public global_oct_m::s_epoch_sec

global epoch time (time at startup)

Definition at line 234 of file global.F90.

◆ s_epoch_usec

integer, public global_oct_m::s_epoch_usec

Definition at line 234 of file global.F90.

◆ sub_stack

character(len=80), dimension(50), public global_oct_m::sub_stack

The stack.

Definition at line 237 of file global.F90.

◆ time_stack

real(real64), dimension(50), public global_oct_m::time_stack

Definition at line 238 of file global.F90.

◆ no_sub_stack

integer, public global_oct_m::no_sub_stack = 0

Definition at line 239 of file global.F90.

◆ in_profiling_mode

logical, public global_oct_m::in_profiling_mode = .false.

Same for profiling mode.

Definition at line 242 of file global.F90.

◆ global_alloc_err

integer, public global_oct_m::global_alloc_err

Definition at line 244 of file global.F90.

◆ global_sizeof

integer(int64), public global_oct_m::global_sizeof

Definition at line 245 of file global.F90.

◆ global_alloc_errmsg

character(len=100), public global_oct_m::global_alloc_errmsg

Definition at line 246 of file global.F90.

◆ gs_dir

character(len=*), parameter, public global_oct_m::gs_dir = "gs/"

Definition at line 249 of file global.F90.

◆ td_dir

character(len=*), parameter, public global_oct_m::td_dir = "td/"

Definition at line 250 of file global.F90.

◆ static_dir

character(len=*), parameter, public global_oct_m::static_dir = "static/"

Definition at line 251 of file global.F90.

◆ em_resp_dir

character(len=*), parameter, public global_oct_m::em_resp_dir = "em_resp/"

Definition at line 252 of file global.F90.

◆ em_resp_fd_dir

character(len=*), parameter, public global_oct_m::em_resp_fd_dir = "em_resp_fd/"

Definition at line 253 of file global.F90.

◆ kdotp_dir

character(len=*), parameter, public global_oct_m::kdotp_dir = "kdotp/"

Definition at line 254 of file global.F90.

◆ vib_modes_dir

character(len=*), parameter, public global_oct_m::vib_modes_dir = "vib_modes/"

Definition at line 255 of file global.F90.

◆ vdw_dir

character(len=*), parameter, public global_oct_m::vdw_dir = "vdw/"

Definition at line 256 of file global.F90.

◆ casida_dir

character(len=*), parameter, public global_oct_m::casida_dir = "casida/"

Definition at line 257 of file global.F90.

◆ oct_dir

character(len=*), parameter, public global_oct_m::oct_dir = "opt-control/"

Definition at line 258 of file global.F90.

◆ pcm_dir

character(len=*), parameter, public global_oct_m::pcm_dir = "pcm/"

Definition at line 259 of file global.F90.

◆ partition_dir

character(len=*), parameter, public global_oct_m::partition_dir = "partition/"

Definition at line 260 of file global.F90.

◆ serial_dummy_comm

type(mpi_comm), parameter, public global_oct_m::serial_dummy_comm = MPI_COMM_UNDEFINED

Alias MPI_COMM_UNDEFINED for the specific use case of initialising Octopus utilities with no MPI support.

Definition at line 264 of file global.F90.