rotex__drivers Module

Driver used by the PROGRAM (helps me keep variables local and be sure I'm not accidentally using globals if I make typos or something)



Subroutines

public module subroutine do_coulomb_born_approx(cfg, n_states, egrid_elec_cb, transitions_cb, xs_xcite_pcb, xs_xcite_tcb, pcb_output_directory, tcb_output_directory)

Use the Coulomb-Born approximation to get scattering cross sections for e⁻ + target. Also determines Einstein A coefficients and excited state average lifetimes within !! the radiative dipole/multipole approximation. The target charge Z is supplied and used by the routine that are called here, so various target charges can be used, including Z = 0 (neutral targets). This routine loops over the different pairs Nτ —→ N'τ'

Arguments

Type IntentOptional Attributes Name
type(config_type), intent(in) :: cfg
type(N_states_type), intent(inout), allocatable :: n_states(:)
type(rvector_type), intent(out), allocatable :: egrid_elec_cb(:)

Array of arrays of electron/collision energies for each transition

type(asymtop_rot_transition_type), intent(out), allocatable :: transitions_cb(:)

Array containing transitions between rotational states for the long-range CB excitations

type(rvector_type), intent(out), allocatable :: xs_xcite_pcb(:)

Array of arrays of the Partial and Total Coulomb-Born cross sections for each transition

type(rvector_type), intent(out), allocatable :: xs_xcite_tcb(:)

Array of arrays of the Partial and Total Coulomb-Born cross sections for each transition

character(len=*), intent(in) :: pcb_output_directory
character(len=*), intent(in) :: tcb_output_directory

public module subroutine do_kmat_xs(cfg, n_states, egrid_tot_smat, smat_output_directory, transitions, xs_xcite_spinavg, xs_dxcite_spinavg)

Read K-matrices from an electron-molecule scattering calculation, get S-matrices, add the rotation via the rotational frame transformation for asymmetric tops, then use the MQDT channel elimination to get electron-impact excitation cross sections entirely from the K-matrix scattering data.

Arguments

Type IntentOptional Attributes Name
type(config_type), intent(in) :: cfg
type(N_states_type), intent(in) :: n_states(:)
real(kind=dp), intent(in) :: egrid_tot_smat(:)

Total energy grid for the S-matrix cross sections

character(len=*), intent(in) :: smat_output_directory
type(asymtop_rot_transition_type), intent(out), allocatable :: transitions(:)
type(rvector_type), intent(out), allocatable :: xs_xcite_spinavg(:)

Array of arrays of excitation cross sections for all spin multiplicities

type(rvector_type), intent(out), allocatable :: xs_dxcite_spinavg(:)

Array of arrays of de-excitation cross sections for all spin multiplicities

public module subroutine convert_multipoles(cartesian_moments_array, spherical_moments_array)

Convert the supplied array of multipole moments from cartesian, obtained as typical output from quantum chemistry codes, to spherical multipole moments

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: cartesian_moments_array(:)

Array containing cartesian multipole moments.

complex(kind=dp), intent(out) :: spherical_moments_array(:)

Array containing spherical multipole moments.

public module subroutine make_grid(grid, E0, num_segments, grid_segments, nelemnts_per_seg, spacing)

Make a segmented grid starting at E0 Example with num_segments = 3, grid_segments = [1e-3, 1e-2, 1e-1, 1], nelemnts_per_seg = [1000,1000, 100] E0+1e-3 E0+1e-2 E0+1e-1 E0+1.0 !------------------!-------------------!- - - - - - - - -! 1000 energies 1000 energies 100 energies

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), allocatable :: grid(:)

The energy grid

real(kind=dp), intent(in) :: E0

The lowest energy

integer, intent(in) :: num_segments

The number of segments in the energy grid

real(kind=dp), intent(in) :: grid_segments(:)

The boundaries of the grid segments

integer, intent(in) :: nelemnts_per_seg(:)

The number of elements in each grid segment

character(len=3), intent(in) :: spacing

The spacing type in each segment. "LIN" for linear or "LOG" for logarithmic

public module subroutine make_output_directories(output_directory, use_cb, spinmults, use_kmat, pcb_output_directory, tcb_output_directory, smat_output_directory)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: output_directory
logical, intent(in) :: use_cb
integer, intent(in) :: spinmults(:)
logical, intent(in) :: use_kmat
character(len=:), intent(inout), allocatable :: pcb_output_directory
character(len=:), intent(inout), allocatable :: tcb_output_directory
character(len=:), intent(inout), allocatable :: smat_output_directory

public module subroutine get_CDMS_data(filename, output_directory, CDMS_states, CDMS_transitions)

Read a file from the CDMS search to get Einstein A coefficients that will be used in determining Coulomb-Born cross sections.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
character(len=*), intent(in) :: output_directory
type(asymtop_state_type), intent(out), allocatable :: CDMS_states(:)
type(asymtop_transition_type), intent(out), allocatable :: CDMS_transitions(:)

public module subroutine get_cdms_state_energies(n_states, cdms_states)

Update the energy of our rotational states with those from the CDMS

Arguments

Type IntentOptional Attributes Name
type(N_states_type), intent(inout) :: n_states(:)
class(asymtop_state_type), intent(in) :: cdms_states(:)

public module subroutine get_CDMS_einstA(Nlo, Kalo, Kclo, Nup, Kaup, Kcup, CDMS_transitions, EinstA)

Given the quantum numbers of a rotational transition, find the matching CDMS transition and get the corresponding Einstein A coefficient

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: Nlo
integer, intent(in) :: Kalo
integer, intent(in) :: Kclo
integer, intent(in) :: Nup
integer, intent(in) :: Kaup
integer, intent(in) :: Kcup
class(asymtop_transition_type), intent(in) :: CDMS_transitions(:)
real(kind=dp), intent(out) :: EinstA

public module subroutine diagonalize_rotational_hamiltonian(cfg, num_n, n_values, n_states)

Build the rigid-rotor hamiltonian for each N and diagonalize it. Keep eigenenergies and eigenvectors, stored in the eigenH type of n_states !!!!!!!!!!!!!!!!!!!!!!! nonlinear rotors !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!! linear rotors !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Arguments

Type IntentOptional Attributes Name
type(config_type), intent(in) :: cfg
integer, intent(in) :: num_n
integer, intent(in) :: n_values(:)
type(N_states_type), intent(out) :: n_states(:)

public module subroutine combine_cb_smat_xs(cfg, egrid_cb, egrid_tot_smat, transitions_cb, xs_xcite_pcb, xs_xcite_tcb, transitions_smat, xs_xcite_smat, xs_dxcite_smat)

Combine Coulomb-Born and S-matrix cross sections to be on the same electron energy grid. In general, a different number of transitions will exist for the Coulomb-Born cross sections and for the S-matrix cross sections. This routine matches the transitions, interpolates the CB cross sections to the total energy grid used by the S-matrix routines, and adds them together: σ(tot) = σ(S-mat) + σ(TCB) - σ(PCB)

Arguments

Type IntentOptional Attributes Name
type(config_type), intent(in) :: cfg

Program config variables

type(rvector_type), intent(in) :: egrid_cb(:)

Array of arrays of electron energy grids for the CB cross sections for each transition

real(kind=dp), intent(in) :: egrid_tot_smat(:)

The total energy grid on which the S-matrix cross sections were evaluated

type(asymtop_rot_transition_type), intent(in) :: transitions_cb(:)

Array of arrays of transition between two rotational states lo and up in the CB approx

type(rvector_type), intent(inout) :: xs_xcite_pcb(:)

Array of arrays of partial CB cross sections for each transition (excitation only, de-excitation handled by detailed balance)

type(rvector_type), intent(inout) :: xs_xcite_tcb(:)

Array of arrays of total CB cross sections for each transition (excitation only, de-excitation handled by detailed balance)

type(asymtop_rot_transition_type), intent(in) :: transitions_smat(:)

Array of arrays of transition between two rotational states lo and up using the S-matrix

type(rvector_type), intent(inout) :: xs_xcite_smat(:)

Array of arrays of S-matrix cross sections for each transition; excitation

type(rvector_type), intent(inout) :: xs_dxcite_smat(:)

Array of arrays of S-matrix cross sections for each transition; de-excitation