Procedures

ProcedureLocationProcedure TypeDescription
add_trailing rotex__characters Subroutine

Add a trailing character trail to the character chr if it is not already the last character

adjoint rotex__arrays Interface
append rotex__arrays Interface
append_uniq rotex__arrays Interface
are_approx_eq rotex__functions Interface

Compare two a and b and see if the magnitude of their difference is smaller than a tolerance, taking machine epsilon*max(|a|,|b|) for their precision as the default value

arg rotex__functions Interface

Return the phase of a complex number in (-π,π]

assert rotex__utils Subroutine
assign_projections rotex__hamilton Subroutine

Using the eigenvectors and energies from a diagonalized rotational Hamiltonian, determine which projection is maximal. The eigenvectors can be in the Ka or Kc basis. This routine will return the array Kvals which indicats the absolute value of the projection that contributes the most to a particular eigenvector

assignment(=) rotex__types Interface
clebsch rotex__wigner Function

Returns the Clebsch-Gordan coefficient by using its relation to the Wigner 3j symbol

combine_cb_smat_xs rotex__drivers Subroutine

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)

convert_multipoles rotex__drivers Subroutine

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

delta rotex__functions Function

Return the Kronecker delta function

determine_system_properties rotex__system Subroutine

Detects the type of the operating system. As far as system calls and directory structure go, this basically resolved to Windows or not Windows.

diagonalize_rotational_hamiltonian rotex__drivers Subroutine

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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

die rotex__system Interface
dJ2char rotex__characters Function

Takes an integer dJ and results the character representing half of it. dJ2char(2) -> "1" dJ2char(3) -> "3/2"

do_coulomb_born_approx rotex__drivers Subroutine

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'τ'

do_kmat_xs rotex__drivers Subroutine

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.

downcast rotex__utils Interface
dsyev rotex__linalg Interface
error rotex__system Subroutine

Print error messages to the screen without the WARNING prompt. This will typically precede a call to DIE

expm1 rotex__functions Interface
eye rotex__arrays Function

Return an n x n identity matrix

f21 rotex__hypergeometric Function

Returns one of the following transforms 1. ₂F₁(a,b;c;x) = (1-x)^{-b} ₂F₁(b,c-a;c;x/(x-1)) 2. ₂F₁(a,b;c;x) = (1-x)^{-a} ₂F₁(a,c-b;c;x/(x-1)) 3. ₂F₁(a,b;c;x) = (1-x)^{-a} Γ(c)Γ(b-a)/(Γ(b)Γ(c-a)) ₂F₁(a,c-b;a-b+1;1/(1-x)) + (1-x)^{-b} Γ(c)Γ(a-b)/(Γ(a)Γ(c-b)) ₂F₁(b,c-a;b-a+1;1/(1-x)) 4. ₂F₁(a,b;c;x) = Γ(c)Γ(c-a-b)/Γ(c-a)Γ(c-b) ₂F₁(c-a, c-b, c-a-b+1, 1-x) + (1-x)^(c-a-b) Γ(c)Γ(a+b-c)/Γ(a)Γ(b) ₂F₁(c-a,c-b;c-a-b+1;1-x) Regions of validity: 1. |a| < |b|, -1 ≤ x < 0 2. |a| > |b|, -1 ≤ x < 0 3. -∞ < x < -1 4. ½ < x < 1

Read more…
f21_dispatch rotex__hypergeometric Function

Checks if x is indeed in (0,1/2), and then makes a choice of evaluating the ODE (large a,b,c) or defaulting to the usual Taylor series

f21_ts rotex__hypergeometric Function

Returns the Gauss hypergeometric function ₂F₁(a,b,;c;z) via a Taylor series method, with quad precision

factorial rotex__functions Interface

!n

findloc_transitions rotex__types Function

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

gamma rotex__polygamma Interface
get_CB_xs_asym rotex__CBXS Subroutine

Calculate the excitation and de-excitation cross sections (xs) for an asymmetric top up. The sum over partial waves is either truncated to or determined analytically. The summation over the angular momentum components, multipole terms, and partial waves are separable for each value of λ as summation = (sum over angular momentum and multipole moments) (sum overpartial waves).

get_CDMS_data rotex__drivers Subroutine

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

get_CDMS_einstA rotex__drivers Subroutine

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

get_cdms_state_energies rotex__drivers Subroutine

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

get_channel_index rotex__types Function

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

get_einsta_only rotex__CBXS Subroutine

Calculate only the Einstein A coefficeints for a transition

get_group_irreps rotex__symmetry Subroutine

Given the point group, output an array containing the names of the irreps in the supplied point_group. Only Abelian point groups are considered. Irreps in the code will be referred to by their indicies

get_smat_probs rotex__MQDTXS Subroutine

Given a rotationally resolved S-matrix, calculate rotational (de-)excitation cross section probabilities for the supplied transitions.

group_size rotex__symmetry Function

Return the number of elements in point_group

H_asym rotex__hamilton Subroutine

Construct the symmetric top rigid-rotor Hamiltonian

int2char rotex__characters Interface
interpolate_replace rotex__splines Subroutine

Interpolate f(xold) -> f(xnew). Only consider xnew values that are contained within xold for now. Xnew returns untouched, but fx is overwritten with interpolated values on the grid xnew(idxx)

inv rotex__functions Interface

Compute 1/z

irrep_name rotex__symmetry Function

Given an irrep index in point_group, return the name of the corresponding irrep

is_spin_allowed rotex__symmetry Interface
is_spin_forbidden rotex__symmetry Interface
is_symmetric rotex__arrays Function

Determine whether a matrix is symmetric

is_unitary rotex__arrays Function

Determine whether a matrix is unitary w.r.t the Frobenius norm

iseven rotex__functions Function
isin rotex__utils Function

Test whether x is in the interval spanned by x1,x2 l/rclosed if true include xl and xr, respectively. They are true by default

isint rotex__utils Interface
isinteger rotex__functions Interface

Check if a real/complex number is an integer

isnatural rotex__functions Interface

Check if a real/complex number is a natrual number

isodd rotex__functions Function
istriangle rotex__functions Function

returns whether the arguments satisfy the triangle inequality, assuming that they're positive quantities

kbn_sum rotex__utils Interface
log_factorial rotex__functions Interface

ln(!n)

log_gamma rotex__polygamma Interface
logb rotex__functions Interface
logrange rotex__functions Interface
lower rotex__characters Function

returns a lower case character

M rotex__CBXS Function

Calculates the integral via the expression given in "Electromagnetic Excitation: Theory of Coulomb Excitation with Heavy Ions " by Kurt Alder and Aage Winther, Chapter IX, section 2, page 244, equation 14. for λ = 1, where . There is an expression for λ = 2 in "Study of Nuclear Structure by Electromagnetic Excitation with Accelerated Ions" by K. Alder, A. Bohr, T. Huus, B. Mottelson, and A. Winther, but only the dipole is used (at least for now).

make_grid rotex__drivers Subroutine

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

make_output_directories rotex__drivers Subroutine
mkdir rotex__system Subroutine

Makes the directory "directory" and checks that it exists and is writeable

ndigits rotex__characters Function

Returns number of characters an integer will occupy

neg rotex__functions Function

Returns the integer }

norm_frob rotex__arrays Interface
operator(.eq.) rotex__types Interface
operator(.isin.) rotex__types Interface
operator(.ne.) rotex__types Interface
OS_NAME rotex__system Function
permsort_channels rotex__types Interface
possible_spin_symmetries rotex__symmetry Function

Returns an array of possible spin symmetry values

print_dipole rotex Subroutine

Print the dipole components in the determined ABC frame

print_dipoles rotex Subroutine

Print the dipole components in the determined ABC frame

print_footer rotex Subroutine
print_header rotex Subroutine
print_rot_targ_states rotex Subroutine
printmat rotex__utils Interface
read_blank rotex__utils Subroutine

Reads num_read lines from unit read_unit, not storing any information. If num_read is not supplied, read one line.

read_kmats rotex__reading Subroutine

Reads in a K-matrix from a file with a very particular file format given by kmat_output_type

read_namelists rotex__reading Subroutine

Reads user parameters and puts them into the config derived type Contains parameters and values that are necessary to run the program

Read more…
realloc rotex__arrays Interface
remove_value rotex__arrays Subroutine

Remove all instances of the value val from the array arr

RFT_nonlinear rotex__RFT Subroutine

Build the electronic S-matrix from the electronic K-matrix, then perform the rotational frame transformation on the S-matrix

right_divide rotex__linalg Function

Returns X = AB⁻¹ without evaluating B⁻¹

rotate_eigvecs rotex__hamilton Subroutine

Rotate the rigid rotor eigenvectors from one of the principal axes A,B,C to another principal axis A,B,C using the Wigner D-matrix

s2hms rotex__characters Interface

convert seconds to hours, minutes, seconds

size_check rotex__arrays Interface
sort_channels rotex__types Interface
sort_channels_by_energy rotex__types Subroutine

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

sort_index rotex__arrays Subroutine

Sort the array vals and return the permutation indices

spin_symmetry rotex__symmetry Function

Returns the spin symmetry of the current N, Ka, Kc state

sub rotex__characters Function

Returns the subscript version of the integer x

sup rotex__characters Function

Returns the superscript version of the integer x

to_lower rotex__characters Subroutine

converts a character to lower case

to_upper rotex__characters Subroutine

converts a character to upper case

trim_channel_l rotex__types Function

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

uniq rotex__arrays Function

Returns the unique elements of arr

unitary_defect rotex__arrays Function

Return the unitary defect with respect to the Frobenius norm

upcast rotex__utils Interface
upper rotex__characters Function

returns an upper case character

warn rotex__system Interface
wigner3j rotex__wigner Function

returns the Wigner 3j symbol via explicit calculation. These should probably be precomputed, but this works for now. The WignerSymbol-f repo seems like a good implementation. The wigner repo by ogorton takes up way too much memory for the high partial waves because it tries to allocate (2N+1)^6 doubles. NOTE: for the high partial wave, we know that we'll only need values with m1 = m2 = m3 = 0, so take advantage of this ?

write_CB_xs_to_file rotex__writing Subroutine

Writes a Coulomb-Born cross section to a file whos name and file header carry information about the state symmetry

write_channels_to_file rotex__writing Subroutine

Write rotational channel info to file

write_lifetimes_to_file rotex__writing Subroutine

Writes the states involved in the excitation and their lifetimes

write_smat_xs_to_file rotex__writing Subroutine

Writes an S-matrix (+CB) cross section to a file whos name and file header carry information about the state symmetry

write_total_xs_to_file rotex__writing Subroutine

Write the total cross-sections (S-matrix + CB correction) to disk for a single transition

xtrapolate_cb_xs rotex__CBXS Subroutine

Extrapolate an excitation/de-excitation cross section to its excitation threshold. Use a power law scaling by fitting the first 2 points. Re-allocates Eel and xs to contain the extrapolated values

zgesv rotex__linalg Interface