rotex__types Module

Contains type definitions and procedures for those types used throughout the program



Interfaces

public interface sort_channels

  • private impure module subroutine sort_elec_channels(elec_channels)

    Sorts the inout array based on the quantum numbers of the channels

    Arguments

    Type IntentOptional Attributes Name
    type(elec_channel_type), intent(inout) :: elec_channels(:)

public interface permsort_channels

  • private impure module subroutine permsort_elec_channels(elec_channels, idx)

    Sorts the inout array based on the quantum numbers of the channels, and returns the permutation array that would produce the same output

    Arguments

    Type IntentOptional Attributes Name
    type(elec_channel_type), intent(inout) :: elec_channels(:)
    integer, allocatable :: idx(:)

public interface operator(.eq.)

  • private pure elemental module function channel_iseq(channel1, channel2) result(res)

    Test for channel equality on the basis of their quantum numbers only

    Arguments

    Type IntentOptional Attributes Name
    class(channel_type), intent(in) :: channel1
    class(channel_type), intent(in) :: channel2

    Return Value logical

  • private pure elemental module function transition_iseq(transition1, transition2) result(res)

    Test if two transitions are equal

    Arguments

    Type IntentOptional Attributes Name
    type(asymtop_rot_transition_type), intent(in) :: transition1
    type(asymtop_rot_transition_type), intent(in) :: transition2

    Return Value logical

public interface operator(.ne.)

  • private pure elemental module function channel_isne(channel1, channel2) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(channel_type), intent(in) :: channel1
    class(channel_type), intent(in) :: channel2

    Return Value logical

public interface operator(.isin.)

  • private pure module function channel_isin(channel, channels) result(res)

    Check if a channel is in the array channels

    Arguments

    Type IntentOptional Attributes Name
    class(channel_type), intent(in) :: channel
    class(channel_type), intent(in) :: channels(:)

    Return Value logical

  • private pure module function transition_isin(transition, transitions) result(res)

    Check if a transition is in the array transitions

    Arguments

    Type IntentOptional Attributes Name
    type(asymtop_rot_transition_type), intent(in) :: transition
    type(asymtop_rot_transition_type), intent(in) :: transitions(:)

    Return Value logical

public interface assignment(=)

  • private impure elemental module subroutine channel_set_eq(channel_out, channel_in)

    Sets the channel left equal to the channel right

    Arguments

    Type IntentOptional Attributes Name
    class(channel_type), intent(out) :: channel_out
    class(channel_type), intent(in) :: channel_in

Derived Types

type, public ::  eigenH_type

Contains the eigenvectors and eigenvalues of a hamiltonian

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable :: eigvals(:)
complex(kind=dp), public, allocatable :: eigvecs(:,:)

type, public ::  N_states_type

The rotational state of the system described by its eigenvectors, eigenvalues, and state labels

Components

Type Visibility Attributes Name Initial
type(eigenH_type), public :: eigenH

The decomposed Hamiltonian for this rotational level

real(kind=dp), public, allocatable :: EinstA(:)

The Einstein coefficients for transitions to all lower states (0 if none)

integer, public, allocatable :: Ka(:)

The projections Ka

integer, public, allocatable :: Kc(:)

The projections Kc

integer, public :: N

Rotational quantum number

type, public, abstract ::  channel_type

|nelec> (E)

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: E

The channel energy

integer, public :: nelec

Electronic state

type, public, extends(channel_type) ::  elec_channel_type

Describes the electronic channel basis of the (optional) K and S-matrices by adding l and its projection ml |nelec,l,ml> (iq, E)

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: E

The channel energy

integer, public :: nelec

Electronic state

integer, public :: l

Partial wave degree

integer, public :: ml

Partial wave order (projection on body-frame ẑ-axis)

integer, public :: iq = IQ_DEFAULT

The kind of normalization for the Coulomb f/g functions: 4: usual normalization 0: f₀/g₀ normalization

type, public, extends(channel_type) ::  asymtop_rot_channel_type

Describes the rotational and electronic channel basis of the (optional) S-matrix after the rotational frame transformation by adding the and rotational quantum numbers to the channel type |nelec,N,Ka,Kc> (E)

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: E

The channel energy

integer, public :: nelec

Electronic state

integer, public :: N

The rotatinal quantum number of the target

integer, public :: Ka

The projection Ka of N

integer, public :: Kc

The projection Kc of N

integer, public :: sym

The nuclear spin symmetry

Describes the rotational and electronic channel basis of the (optional) S-matrix after the rotational frame transformation by adding the partial wave degree to the rotational quantum numbers |nelec,l,N,Ka,Kc> (iq, E)

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: E

The channel energy

integer, public :: nelec

Electronic state

integer, public :: N

The rotatinal quantum number of the target

integer, public :: Ka

The projection Ka of N

integer, public :: Kc

The projection Kc of N

integer, public :: sym

The nuclear spin symmetry

integer, public :: l

Partial wave degree

integer, public :: iq

The kind of normalization for the Coulomb f/g functions: 4: usual normalization 0: f₀/g₀ normalization

Contains a vector of channels. The idea is that this type is indexed at each value of the angular momentum quantum number J, for which a different combination of channels exists than for other Js

Components

Type Visibility Attributes Name Initial
type(asymtop_rot_channel_l_type), public, allocatable :: channels(:)

type, public ::  asymtop_rot_transition_type

The a type containing the indices for a pair of initial and final rotational states

Components

Type Visibility Attributes Name Initial
type(asymtop_rot_channel_type), public :: lo
type(asymtop_rot_channel_type), public :: up

type, public ::  ivector_type

The type of an integer vector

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: vec(:)

type, public ::  rvector_type

The type of a real vector

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable :: vec(:)

type, public ::  rmatrix_type

The type of a real matrix

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable :: mtrx(:,:)

type, public ::  cmatrix_type

The type of a complex matrix

Components

Type Visibility Attributes Name Initial
complex(kind=dp), public, allocatable :: mtrx(:,:)

type, public ::  cd4_type

Centrifugal Distortion parameters for quartric (4) order

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: dn

ΔN (AKA ΔJ)

real(kind=dp), public :: dnk

ΔNK (AKA ΔJK)

real(kind=dp), public :: dk

ΔK

real(kind=dp), public :: deltan

δn (AKA δJ)

real(kind=dp), public :: deltak

δK

type, public ::  cd6_type

Centrifugal Distortion parameters for sextic (6) order

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: hn

HN (N²)³

real(kind=dp), public :: hnk

HNK [(N²)² Nz²]

real(kind=dp), public :: hkn

HKN [ N² Nz⁴]

real(kind=dp), public :: hk

HK Nz⁶

real(kind=dp), public :: etan

ηN [N⁴, (J₊)²+(J₋)²]₊ / 2

real(kind=dp), public :: etank

ηNK [N²Nz², (J₊)²+(J₋)²]₊ / 2

real(kind=dp), public :: etak

ηK [Nz⁴, (J₊)²+(J₋)²]₊ / 2

type, public ::  config_type

Derived type containing data from the namelist variables

Components

Type Visibility Attributes Name Initial
logical, public :: add_cd4 = .true.

Add centrifugal distortion for fourth order ?

logical, public :: add_cd6 = .true.

Add centrifugal distortion for sixth order ?

logical, public :: only_einsta

Whether to only calculate the Einstein A coefficients in the Coulomb-Born cross section routine

logical, public :: use_CDMS_einstA

Whether to use Einstein A coefficients obtained from the CDMS or calculate them ourselves Path for the file containing the CDMS data to be read (if use_CDMS_einstA is .true.)

logical, public :: analytic_total_cb(2)

Array of logicals that has the size 2. Choose whether to use the analytic equation describing the multipole expansions for the dipole (element 1) and the quadrupole (element 2, not yet available)

logical, public :: do_xtrap

Do the extrapolation of (de-)excitation cross sections as 1/E to the excitation threshold ?

logical, public :: do_dipole

Choose whether to use the dipole term of the potential expansion

logical, public :: do_quadrupole

Choose whether to use the quadrupole term of the potential expansion

logical, public :: use_kmat

Calculate (de-)excitation cross sections using precomputed K-matrices ?

logical, public :: use_cb

Calculate (de-)excitation cross sections using the Coulomb-Born approxiation ?

logical, public :: real_spherical_harmonics

Whether the input K-matrices are evaluated in a basis of real spherical harmonics for the scattering electron. If .true., it will be transformed to a basis of complex-valued spherical harmonics

integer, public :: spin_isomer_kind

Whether and how to enforce ortho/para symmetry for molecules with identical nuclei. 0: don't 1: Dsh linear rotor; basically, homonuclear diatomics 2: C2v rotor (H₂X-like): preserve Ka+Kc parity Note that this just disables certain transitions from bein calculated in the CB approx as well as from the S-matrix. This does not affect the RFT because higher J-blocks of the S-matrix are more affected by K-mixing (Ka and Kc are not exact quantum numbers)

integer, public :: nE

The number of scattering energies to consider. This does not need to be very high; the CB cross sections are very smooth and can easily be interpolated.

integer, public :: nE_xtrap

Number of extrapolation energies. Excitation cross sections are extrapolated as 1/E to the excitation threshold, de-excitation cross sections are extrapolated as 1/E to Ei_xtrap. If this is 0, no exptrapolation will be performed.

integer, public :: lmax_partial

The maximum value of l to consider in the contribution of the partial CB cross section from the dipole and the quadrupole. If you're replacing the low-l CB cross sections with other cross sections, set this to the max l that you have available.

integer, public :: lmax_total

The maximum value of l to consider in the contribution of the total CB cross section in the even that you're not using the analytic expression, from the dipole and the quadrupole

integer, public :: Nmin

The minimum value of the rotational quantum number (N) to consider

integer, public :: Nmax

The maximum value of the rotational quantum number (N) to consider

integer, public :: target_charge

The electric charge of the target

integer, public :: lmax_kmat

The max partial wave to be included in the K-matrix basis. Cannot exceed the available basis in the calculation, but can be smaller than the largest available partial wave

integer, public :: num_egrid_segs

Number of energy grid segments (evaluation energy for the cross sections)

integer, public, allocatable :: num_egrid(:)

Array of number of energies per grid segment (length num_egrid_segs)

integer, public, allocatable :: spinmults(:)

Array of spin multiplicities (2S+1) for which the system's (target + e⁻) K-matrices were calculated

real(kind=dp), public :: xs_zero_threshold

Any cross section with value only smaller than this (cm²) will be ignore and will not be printed

real(kind=dp), public :: eta_thresh

The largest value of η' allowed for evaluating the hypergeometric functions ₂F₁(a,b;c;z)

real(kind=dp), public :: Ef

The last electron energy for excitation to consider relative to the initial state's energy

real(kind=dp), public :: Ei_xtrap

The lowest electron energy for de-excitation relative to the initial state's energy. The results will be extrapolated from Ei down to this assuming a 1/E dependence for the cross section, i.e., constant excitation probablility. If this .le. 0, no extrapolation will not be performed. Units: (eV)

real(kind=dp), public :: kmat_energy_closest

Input K-matrices are evaluated at a specific energy. If this code is run energy-independently (most likely the case unless I add energy dependence in the future) The K-matrix that is selected will be the FIRST ONE whose evaluation energy is CLOSEST to this energy in (eV). NOTE: UKRMOL+ outputs K-matrix energies in the .kmat files in Rydberg.

real(kind=dp), public :: abc(3)

Array of reals of length 3 The rotational constants A, B, and C of the target molecule (cm⁻¹).

real(kind=dp), public :: B_rot

Only for linear rotors; the rotational constant B in the expansion of the rotational energy : E(N) = B N(N+1) - D[N(N+1)]² + H[N(N+1)]³ ... Cannot be 0 for a linear molecule

real(kind=dp), public :: D_rot

Only for linear rotors; the centrifugal distortion coefficient D in the expansion of the rotational energy : E(N) = B N(N+1) - D[N(N+1)]² + H[N(N+1)]³ ... 0 by default

real(kind=dp), public :: H_rot

Only for linear rotors; the centrifugal distortion coefficient D in the expansion of the rotational energy : E(N) = B N(N+1) - D[N(N+1)]² + H[N(N+1)]³ ... 0 by default

real(kind=dp), public :: cartesian_dipole_moments(3)

Array of cartesian dipole moments (Debye) in the order dx, dy, dz

real(kind=dp), public :: cartesian_quadrupole_moments(6)

Array of cartesian quadrupole moments (Debye) in the order Qxx, Qxy, Qxz, Qyy, Qyz, Qzz

real(kind=dp), public, allocatable :: egrid_segs(:)

Array of the bounds (non-degenerate) of the energy grid segments (length num_egrid_segs + 1)

character(len=1), public :: rotor_kind

The kind of rotor that describes the targer. Character(1). Choice of : "l"inear "a"symmetric top "s"ymmetric top

character(len=1), public :: zaxis

The molecular axis (a, b, or c) along which the z-axis is oriented This should also be the symmetry axis

character(len=1), public :: channel_energy_units_override

The units of the channel energies in the file that holds channels. Options are : - "r" for Rydberg, "h" for hartree, "e" for eV By default, this is not set and will allow the code to determine channel energies on its own based on KMAT_OUTPUT_TYPE, but can be forcibly overridden with this

character(len=1), public :: kmat_energy_units_override

The units of the K-matrix evaluation energies in the kmat file. Options are : - "r" for Rydberg, "h" for hartree, "e" for eV By default, this is not set and will allow the code to determine channel energies on its own based on KMAT_OUTPUT_TYPE, but can be forcibly overridden with this

character(len=3), public :: egrid_spacing

The kind of spacing for the energy grid segments. "lin" for linear and "log" for logarithmic

character(len=:), public, allocatable :: point_group

The point group in which the K-matrices were calculated

character(len=:), public, allocatable :: kmat_dir

Path for the file containing the K-matrix to be read. Absolute or relative

character(len=:), public, allocatable :: channels_dir

Path for the file containing the channels for the K-matrix to be read. Absolute or relative This is only used if kmat_output_type is ukrmol+ because the channel and K-matrix files are separate

character(len=:), public, allocatable :: output_directory

The directory in which to write the output data This directory must already exist

character(len=:), public, allocatable :: CDMS_file

The file containing CDMS transitions

character(len=7), public :: kmat_output_type

Determines what kind of K-matrices we're reading. Two possible values: 'UKRMOL+': default UKRmol+ .kmat file 'MQDTR2K': a specific format given in the writeup. K-matrices are generated directly from the R-matrix, possibly with channel elimination and differently normalized Coulomb wavefunctions

type(cd4_type), public :: cd4

Centrifugal distortion parameters (4th order) for the rigid rotor Hamiltonian correction

type(cd6_type), public :: cd6

Centrifugal distortion parameters (6th order) for the rigid rotor Hamiltonian correction


Functions

public pure module function get_channel_index(channels, channel, reverse) result(i)

Return the first index i where channel .eq. channels(i) is .true., or the last index is reverse is .true.

Arguments

Type IntentOptional Attributes Name
class(channel_type), intent(in) :: channels(:)
class(channel_type), intent(in) :: channel
logical, intent(in), optional :: reverse

Return Value integer

public impure elemental module function trim_channel_l(channel_with_l) result(channel_without_l)

Given a rotational channel with the l quantum number, return the equvalent channel without the l quantum number

Arguments

Type IntentOptional Attributes Name
type(asymtop_rot_channel_l_type), intent(in) :: channel_with_l

Return Value type(asymtop_rot_channel_type)

public pure module function findloc_transitions(targs, search) result(idxtarg)

Find the indices for each element in targs that map to the elements in search. Return 0 if there is no such mapping.

Arguments

Type IntentOptional Attributes Name
type(asymtop_rot_transition_type), intent(in) :: targs(:)
type(asymtop_rot_transition_type), intent(in) :: search(:)

Return Value integer, allocatable, (:)

TARGS -> SEARCH mapping


Subroutines

public impure module subroutine sort_channels_by_energy(channels)

Bubble sort the array of channels such that the channel energies are in ascending order

Arguments

Type IntentOptional Attributes Name
class(channel_type), intent(inout) :: channels(:)