Octopus
spectrum_oct_m Module Reference

Data Types

type  spectrum_t
 

Functions/Subroutines

subroutine, public spectrum_init (spectrum, namespace, default_energy_step, default_max_energy)
 
subroutine, public spectrum_cross_section_tensor (spectrum, namespace, out_file, in_file)
 
subroutine spectrum_cross_section_tensor_write (out_file, sigma, nspin, energy_step, min_energy, energy_steps, kick)
 
subroutine, public spectrum_cross_section (spectrum, namespace, in_file, out_file, ref_file)
 
subroutine spectrum_read_dipole (namespace, in_file, dipole)
 
subroutine spectrum_add_pcm_dipole (namespace, dipole, time_steps, nspin)
 
subroutine spectrum_times_pcm_epsilon (spectrum, pcm, dipole, sigma, nspin, istart, iend, kick_time, dt, no_e)
 
subroutine spectrum_over_pcm_refraction_index (spectrum, pcm, sigma, nspin, no_e)
 
subroutine, public spectrum_dipole_power (spectrum, namespace, in_file, out_file)
 
subroutine, public spectrum_dyn_structure_factor (spectrum, namespace, in_file_sin, in_file_cos, out_file)
 
subroutine, public spectrum_rotatory_strength (spectrum, namespace, in_file, out_file)
 
subroutine, public spectrum_hsfunction_init (dt, is, ie, niter, acc)
 
subroutine, public spectrum_hsfunction_end
 
subroutine, public spectrum_hsfunction_min (namespace, aa, bb, omega_min, func_min)
 
subroutine hsfunction (omega, power)
 
subroutine spectrum_hsfunction_ar_init (dt, is, ie, niter, acc, pos, tret)
 
subroutine spectrum_hsfunction_ar_end
 
subroutine, public spectrum_hs_ar_from_acc (spectrum, namespace, out_file, vec, w0)
 
subroutine, public spectrum_hs_ar_from_mult (spectrum, namespace, out_file, vec, w0)
 
subroutine, public spectrum_hs_from_mult (spectrum, namespace, out_file, pol, vec, w0)
 
subroutine, public spectrum_hs_from_acc (spectrum, namespace, out_file, pol, vec, w0)
 
subroutine, public spectrum_hs_from_current (spectrum, namespace, out_file, pol, vec, w0)
 
subroutine spectrum_hs (spectrum, namespace, out_file, pol, w0)
 
subroutine spectrum_hs_output (spectrum, namespace, out_file, pol, no_e, sp)
 
subroutine, public spectrum_mult_info (namespace, iunit, nspin, kick, time_steps, dt, file_units, lmax)
 
subroutine, public spectrum_count_time_steps (namespace, iunit, time_steps, dt)
 
subroutine spectrum_cross_section_info (namespace, iunit, nspin, kick, energy_steps, dw)
 
subroutine spectrum_tdfile_info (namespace, fname, iunit, time_steps, dt)
 
subroutine, public spectrum_fix_time_limits (spectrum, time_steps, dt, istart, iend, ntiter)
 
subroutine, public spectrum_signal_damp (damp_type, damp_factor, time_start, time_end, t0, time_step, time_function)
 
subroutine, public spectrum_fourier_transform (method, transform, noise, time_start, time_end, t0, time_step, time_function, energy_start, energy_end, energy_step, energy_function)
 Computes the sine, cosine, (or "exponential") Fourier transform of the real function given in the time_function batch. More...
 
subroutine spectrum_sigma_diagonalize (namespace, sigma, nspin, energy_step, min_energy, energy_steps, kick)
 
pure integer function, public spectrum_nenergy_steps (spectrum)
 
subroutine spectrum_write_info (spectrum, out_file)
 

Variables

integer, parameter, public spectrum_damp_none = 0
 
integer, parameter, public spectrum_damp_lorentzian = 1
 
integer, parameter, public spectrum_damp_polynomial = 2
 
integer, parameter, public spectrum_damp_gaussian = 3
 
integer, parameter, public spectrum_damp_sin = 4
 
integer, parameter, public spectrum_transform_laplace = 1
 
integer, parameter, public spectrum_transform_sin = 2
 
integer, parameter, public spectrum_transform_cos = 3
 
integer, parameter, public spectrum_absorption = 1
 
integer, parameter, public spectrum_energyloss = 2
 
integer, parameter, public spectrum_p_power = 3
 
integer, parameter, public spectrum_rotatory = 4
 
integer, parameter, public spectrum_fourier = 1
 
integer, parameter, public spectrum_compressed_sensing = 2
 
integer niter_
 Module variables, necessary to compute the function hsfunction, called by the C function loct_1dminimize. More...
 
real(real64) time_step_
 
real(real64) energy_step_
 
complex(real64), dimension(:), allocatable func_
 
complex(real64), dimension(:,:), allocatable func_ar_
 
complex(real64), dimension(:,:), allocatable pos_
 
complex(real64), dimension(:), allocatable tret_
 
complex(real64), dimension(:), allocatable funcw_
 
type(fft_t), save fft_handler
 
integer is_
 
integer ie_
 
integer default
 

Function/Subroutine Documentation

◆ spectrum_init()

subroutine, public spectrum_oct_m::spectrum_init ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
real(real64), intent(in), optional  default_energy_step,
real(real64), intent(in), optional  default_max_energy 
)

Definition at line 212 of file spectrum.F90.

◆ spectrum_cross_section_tensor()

subroutine, public spectrum_oct_m::spectrum_cross_section_tensor ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  out_file,
integer, dimension(:), intent(in)  in_file 
)

Definition at line 429 of file spectrum.F90.

◆ spectrum_cross_section_tensor_write()

subroutine spectrum_oct_m::spectrum_cross_section_tensor_write ( integer, intent(in)  out_file,
real(real64), dimension(:, :, :, :), intent(in)  sigma,
integer, intent(in)  nspin,
real(real64), intent(in)  energy_step,
real(real64), intent(in)  min_energy,
integer, intent(in)  energy_steps,
type(kick_t), intent(in), optional  kick 
)
private
Parameters
[in]sigma(3, 3, energy_steps, nspin) already converted to units
[in]kickif present, will write itself and nspin

Definition at line 592 of file spectrum.F90.

◆ spectrum_cross_section()

subroutine, public spectrum_oct_m::spectrum_cross_section ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  in_file,
integer, intent(in)  out_file,
integer, intent(in), optional  ref_file 
)

Definition at line 709 of file spectrum.F90.

◆ spectrum_read_dipole()

subroutine spectrum_oct_m::spectrum_read_dipole ( type(namespace_t), intent(in)  namespace,
integer, intent(in)  in_file,
real(real64), dimension(0:, :, :), intent(out)  dipole 
)
private

Definition at line 910 of file spectrum.F90.

◆ spectrum_add_pcm_dipole()

subroutine spectrum_oct_m::spectrum_add_pcm_dipole ( type(namespace_t), intent(in)  namespace,
real(real64), dimension(0:, :, :), intent(inout)  dipole,
integer, intent(in)  time_steps,
integer, intent(in)  nspin 
)
private

Definition at line 941 of file spectrum.F90.

◆ spectrum_times_pcm_epsilon()

subroutine spectrum_oct_m::spectrum_times_pcm_epsilon ( type(spectrum_t), intent(in)  spectrum,
type(pcm_min_t), intent(in)  pcm,
real(real64), dimension(:, :, :), intent(in), allocatable  dipole,
real(real64), dimension(:, :, :), intent(inout), allocatable  sigma,
integer, intent(in)  nspin,
integer, intent(in)  istart,
integer, intent(in)  iend,
real(real64), intent(in)  kick_time,
real(real64), intent(in)  dt,
integer, intent(in)  no_e 
)
private

Definition at line 1060 of file spectrum.F90.

◆ spectrum_over_pcm_refraction_index()

subroutine spectrum_oct_m::spectrum_over_pcm_refraction_index ( type(spectrum_t), intent(in)  spectrum,
type(pcm_min_t), intent(in)  pcm,
real(real64), dimension(:, :, :), intent(inout), allocatable  sigma,
integer, intent(in)  nspin,
integer, intent(in)  no_e 
)
private

Definition at line 1124 of file spectrum.F90.

◆ spectrum_dipole_power()

subroutine, public spectrum_oct_m::spectrum_dipole_power ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  in_file,
integer, intent(in)  out_file 
)

Definition at line 1153 of file spectrum.F90.

◆ spectrum_dyn_structure_factor()

subroutine, public spectrum_oct_m::spectrum_dyn_structure_factor ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  in_file_sin,
integer, intent(in)  in_file_cos,
integer, intent(in)  out_file 
)

Definition at line 1261 of file spectrum.F90.

◆ spectrum_rotatory_strength()

subroutine, public spectrum_oct_m::spectrum_rotatory_strength ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  in_file,
integer, intent(in)  out_file 
)

Definition at line 1414 of file spectrum.F90.

◆ spectrum_hsfunction_init()

subroutine, public spectrum_oct_m::spectrum_hsfunction_init ( real(real64), intent(in)  dt,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  niter,
complex(real64), dimension(:), intent(in)  acc 
)

Definition at line 1533 of file spectrum.F90.

◆ spectrum_hsfunction_end()

subroutine, public spectrum_oct_m::spectrum_hsfunction_end

Definition at line 1568 of file spectrum.F90.

◆ spectrum_hsfunction_min()

subroutine, public spectrum_oct_m::spectrum_hsfunction_min ( type(namespace_t), intent(in)  namespace,
real(real64), intent(in)  aa,
real(real64), intent(in)  bb,
real(real64), intent(out)  omega_min,
real(real64), intent(out)  func_min 
)

Definition at line 1582 of file spectrum.F90.

◆ hsfunction()

subroutine spectrum_oct_m::hsfunction ( real(real64), intent(in)  omega,
real(real64), intent(out)  power 
)
private

Definition at line 1649 of file spectrum.F90.

◆ spectrum_hsfunction_ar_init()

subroutine spectrum_oct_m::spectrum_hsfunction_ar_init ( real(real64), intent(in)  dt,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  niter,
complex(real64), dimension(:,:), intent(in)  acc,
complex(real64), dimension(:,:), intent(in)  pos,
complex(real64), dimension(:), intent(in)  tret 
)
private

Definition at line 1693 of file spectrum.F90.

◆ spectrum_hsfunction_ar_end()

subroutine spectrum_oct_m::spectrum_hsfunction_ar_end
private

Definition at line 1718 of file spectrum.F90.

◆ spectrum_hs_ar_from_acc()

subroutine, public spectrum_oct_m::spectrum_hs_ar_from_acc ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
real(real64), dimension(:), intent(in)  vec,
real(real64), intent(in), optional  w0 
)

Definition at line 1731 of file spectrum.F90.

◆ spectrum_hs_ar_from_mult()

subroutine, public spectrum_oct_m::spectrum_hs_ar_from_mult ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
real(real64), dimension(:), intent(in)  vec,
real(real64), intent(in), optional  w0 
)

Definition at line 1838 of file spectrum.F90.

◆ spectrum_hs_from_mult()

subroutine, public spectrum_oct_m::spectrum_hs_from_mult ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
character, intent(in)  pol,
real(real64), dimension(:), intent(in)  vec,
real(real64), intent(in), optional  w0 
)

Definition at line 1931 of file spectrum.F90.

◆ spectrum_hs_from_acc()

subroutine, public spectrum_oct_m::spectrum_hs_from_acc ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
character, intent(in)  pol,
real(real64), dimension(:), intent(in)  vec,
real(real64), intent(in), optional  w0 
)

Definition at line 2050 of file spectrum.F90.

◆ spectrum_hs_from_current()

subroutine, public spectrum_oct_m::spectrum_hs_from_current ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
character, intent(in)  pol,
real(real64), dimension(:), intent(in)  vec,
real(real64), intent(in), optional  w0 
)

Definition at line 2151 of file spectrum.F90.

◆ spectrum_hs()

subroutine spectrum_oct_m::spectrum_hs ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
character, intent(in)  pol,
real(real64), intent(in), optional  w0 
)
private

Definition at line 2250 of file spectrum.F90.

◆ spectrum_hs_output()

subroutine spectrum_oct_m::spectrum_hs_output ( type(spectrum_t), intent(inout)  spectrum,
type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  out_file,
character, intent(in)  pol,
integer, intent(in)  no_e,
real(real64), dimension(:), intent(in)  sp 
)
private

Definition at line 2306 of file spectrum.F90.

◆ spectrum_mult_info()

subroutine, public spectrum_oct_m::spectrum_mult_info ( type(namespace_t), intent(in)  namespace,
integer, intent(in)  iunit,
integer, intent(out)  nspin,
type(kick_t), intent(out)  kick,
integer, intent(out)  time_steps,
real(real64), intent(out)  dt,
type(unit_system_t), intent(out)  file_units,
integer, intent(out), optional  lmax 
)

Definition at line 2341 of file spectrum.F90.

◆ spectrum_count_time_steps()

subroutine, public spectrum_oct_m::spectrum_count_time_steps ( type(namespace_t), intent(in)  namespace,
integer, intent(in)  iunit,
integer, intent(out)  time_steps,
real(real64), intent(out)  dt 
)

Definition at line 2385 of file spectrum.F90.

◆ spectrum_cross_section_info()

subroutine spectrum_oct_m::spectrum_cross_section_info ( type(namespace_t), intent(in)  namespace,
integer, intent(in)  iunit,
integer, intent(out)  nspin,
type(kick_t), intent(out)  kick,
integer, intent(out)  energy_steps,
real(real64), intent(out)  dw 
)
private
Parameters
[out]dwenergy step

Definition at line 2421 of file spectrum.F90.

◆ spectrum_tdfile_info()

subroutine spectrum_oct_m::spectrum_tdfile_info ( type(namespace_t), intent(in)  namespace,
character(len=*), intent(in)  fname,
integer, intent(out)  iunit,
integer, intent(out)  time_steps,
real(real64), intent(out)  dt 
)
private

Definition at line 2459 of file spectrum.F90.

◆ spectrum_fix_time_limits()

subroutine, public spectrum_oct_m::spectrum_fix_time_limits ( type(spectrum_t), intent(inout)  spectrum,
integer, intent(in)  time_steps,
real(real64), intent(in)  dt,
integer, intent(out)  istart,
integer, intent(out)  iend,
integer, intent(out)  ntiter 
)

Definition at line 2507 of file spectrum.F90.

◆ spectrum_signal_damp()

subroutine, public spectrum_oct_m::spectrum_signal_damp ( integer, intent(in)  damp_type,
real(real64), intent(in)  damp_factor,
integer, intent(in)  time_start,
integer, intent(in)  time_end,
real(real64), intent(in)  t0,
real(real64), intent(in)  time_step,
type(batch_t), intent(inout)  time_function 
)

Definition at line 2551 of file spectrum.F90.

◆ spectrum_fourier_transform()

subroutine, public spectrum_oct_m::spectrum_fourier_transform ( integer, intent(in)  method,
integer, intent(in)  transform,
real(real64), intent(in)  noise,
integer, intent(in)  time_start,
integer, intent(in)  time_end,
real(real64), intent(in)  t0,
real(real64), intent(in)  time_step,
type(batch_t), intent(in)  time_function,
real(real64), intent(in)  energy_start,
real(real64), intent(in)  energy_end,
real(real64), intent(in)  energy_step,
type(batch_t), intent(inout)  energy_function 
)

Computes the sine, cosine, (or "exponential") Fourier transform of the real function given in the time_function batch.

The initial and final integration times are given by time_start and time_end, whereas the initial and final computed energies are given by energy_start and energy_end. The result is placed in the energy_function batch. The cosine Fourier function is computed by multiplying the real function by \( \cos(w*(t-t0)) \), the sine Fourier transform is computed by multiplying the real function by \( \sin(w*(t-t0)) \), and the "exponential" transform is computed by multiplying the real function by \( e(-I*w*t0)*e(-w*t) \).

Definition at line 2636 of file spectrum.F90.

◆ spectrum_sigma_diagonalize()

subroutine spectrum_oct_m::spectrum_sigma_diagonalize ( type(namespace_t), intent(in)  namespace,
real(real64), dimension(:, :, :, :), intent(in)  sigma,
integer, intent(in)  nspin,
real(real64), intent(in)  energy_step,
real(real64), intent(in)  min_energy,
integer, intent(in)  energy_steps,
type(kick_t), intent(in), optional  kick 
)
private
Parameters
[in]sigma(3, 3, energy_steps, nspin) already converted to units
[in]kickif present, will write itself and nspin

Definition at line 2756 of file spectrum.F90.

◆ spectrum_nenergy_steps()

pure integer function, public spectrum_oct_m::spectrum_nenergy_steps ( type(spectrum_t), intent(in)  spectrum)

Definition at line 2946 of file spectrum.F90.

◆ spectrum_write_info()

subroutine spectrum_oct_m::spectrum_write_info ( type(spectrum_t), intent(in)  spectrum,
integer, intent(in)  out_file 
)
private

Definition at line 2952 of file spectrum.F90.

Variable Documentation

◆ spectrum_damp_none

integer, parameter, public spectrum_oct_m::spectrum_damp_none = 0

Definition at line 164 of file spectrum.F90.

◆ spectrum_damp_lorentzian

integer, parameter, public spectrum_oct_m::spectrum_damp_lorentzian = 1

Definition at line 164 of file spectrum.F90.

◆ spectrum_damp_polynomial

integer, parameter, public spectrum_oct_m::spectrum_damp_polynomial = 2

Definition at line 164 of file spectrum.F90.

◆ spectrum_damp_gaussian

integer, parameter, public spectrum_oct_m::spectrum_damp_gaussian = 3

Definition at line 164 of file spectrum.F90.

◆ spectrum_damp_sin

integer, parameter, public spectrum_oct_m::spectrum_damp_sin = 4

Definition at line 164 of file spectrum.F90.

◆ spectrum_transform_laplace

integer, parameter, public spectrum_oct_m::spectrum_transform_laplace = 1

Definition at line 171 of file spectrum.F90.

◆ spectrum_transform_sin

integer, parameter, public spectrum_oct_m::spectrum_transform_sin = 2

Definition at line 171 of file spectrum.F90.

◆ spectrum_transform_cos

integer, parameter, public spectrum_oct_m::spectrum_transform_cos = 3

Definition at line 171 of file spectrum.F90.

◆ spectrum_absorption

integer, parameter, public spectrum_oct_m::spectrum_absorption = 1

Definition at line 176 of file spectrum.F90.

◆ spectrum_energyloss

integer, parameter, public spectrum_oct_m::spectrum_energyloss = 2

Definition at line 176 of file spectrum.F90.

◆ spectrum_p_power

integer, parameter, public spectrum_oct_m::spectrum_p_power = 3

Definition at line 176 of file spectrum.F90.

◆ spectrum_rotatory

integer, parameter, public spectrum_oct_m::spectrum_rotatory = 4

Definition at line 176 of file spectrum.F90.

◆ spectrum_fourier

integer, parameter, public spectrum_oct_m::spectrum_fourier = 1

Definition at line 182 of file spectrum.F90.

◆ spectrum_compressed_sensing

integer, parameter, public spectrum_oct_m::spectrum_compressed_sensing = 2

Definition at line 182 of file spectrum.F90.

◆ niter_

integer spectrum_oct_m::niter_
private

Module variables, necessary to compute the function hsfunction, called by the C function loct_1dminimize.

Definition at line 203 of file spectrum.F90.

◆ time_step_

real(real64) spectrum_oct_m::time_step_
private

Definition at line 204 of file spectrum.F90.

◆ energy_step_

real(real64) spectrum_oct_m::energy_step_
private

Definition at line 204 of file spectrum.F90.

◆ func_

complex(real64), dimension(:), allocatable spectrum_oct_m::func_
private

Definition at line 205 of file spectrum.F90.

◆ func_ar_

complex(real64), dimension(:,:), allocatable spectrum_oct_m::func_ar_
private

Definition at line 205 of file spectrum.F90.

◆ pos_

complex(real64), dimension(:,:), allocatable spectrum_oct_m::pos_
private

Definition at line 205 of file spectrum.F90.

◆ tret_

complex(real64), dimension(:), allocatable spectrum_oct_m::tret_
private

Definition at line 205 of file spectrum.F90.

◆ funcw_

complex(real64), dimension(:), allocatable spectrum_oct_m::funcw_
private

Definition at line 205 of file spectrum.F90.

◆ fft_handler

type(fft_t), save spectrum_oct_m::fft_handler
private

Definition at line 206 of file spectrum.F90.

◆ is_

integer spectrum_oct_m::is_
private

Definition at line 207 of file spectrum.F90.

◆ ie_

integer spectrum_oct_m::ie_
private

Definition at line 207 of file spectrum.F90.

◆ default

integer spectrum_oct_m::default
private

Definition at line 207 of file spectrum.F90.