Hawaii Hybrid
Loading...
Searching...
No Matches
Input File Description

This section provides an overview of the input file format, including its structures, features, and supported data types. The format uses &SECTION_NAME and &END delimiters to define sections containing case-insensitive key-value pairs (assigned with =) or function calls. Comments are indicated with exclamation marks ! throughout the input file. The input file parser enforces type safety, requiring each key to have a value of the expected type; any type mismatch triggers an error message and terminates program execution.

Supported data types include integers, floating-point values, boolean values, strings and arrays. Underscores may be used in integers for readability (e.g., 1\_000\_000). For floating point values the scientific notation may be used (e.g., 1e2 instead of 100). The arrays are denoted with curly braces {<array members>}. Examples:

HEP_M0_NPOINTS = 1_000_000 ! integer with optional underscores
PAIR_REDUCED_MASS = 3.00092e+04 ! floating-point number using scientific notation
USE_ZIMMERMANN_TRICK = true ! boolean value
CALCULATION_TYPE = CORRELATION_SINGLE ! plain string (no quotation marks)
CF_FILENAME = "example.txt" ! double-quoted string
TEMPERATURES = {100.0, 200.0, 300.0} ! an array of floating-point values
CF_FILENAMES = {"example1.txt", "example2.txt"} ! an array of double-quoted strings

&INPUT section provides overall control of the calculation, for example, calculation type, pair state, reduced mass, paths to dynamic libraries containing potential energy and induced dipole functions, and output files. The available input parameters are described in Section Input Block.

&MONOMER section specifies the types of interacting monomers through the MONOMER_TYPE field along with their molecular constants such as inertia tensor values and centrifugal constant. The available paramters are listed in Section Monomer Block.

&PROCESSING section configures the data pipeline using a stack machine model, where each command manipulates the implicit data stack. Unlike the &INPUT and &MONOMER sections, the &PROCESSING section also contains an order-sensitive sequence of commands that execute sequentially, consuming inputs from the top of the stack and pushing the results back for subsequent commands. A typical pipeline begins with loading data using READ_CF, which pushes a correlation function onto the stack. Then CF_TO_SF consumes the correlation function and pushes corresponding spectral function. Commands like COMPUTE_Mn_CLASSICAL_DETAILED_BALANCE and COMPUTE_Mn_QUANTUM_DETAILED_BALANCE consume the spectral function, requiring the user to first call DUP() to preserve the original spectral function if further commands will be operating on it. By the end of the processing script, the stack must be empty, ensuring all data has been processed or saved. The detailed description for each function is provided in Section Processing Block.

List of available variables and functions in the input file:

  1. #. CALCULATION_TYPE
  2. #. PAIR_STATE
  3. #. PAIR_REDUCED_MASS
  4. #. SO_POTENTIAL
  5. #. SO_DIPOLE
  6. #. SO_DIPOLE.1
  7. #. SO_DIPOLE.2
  8. #. TEMPERATURE
  9. #. TEMPERATURES
  10. #. SATELLITE_TEMPERATURES
  11. #. TOTAL_TRAJECTORIES
  12. #. CVODE_TOLERANCE
  13. #. SAMPLING_TIME
  14. #. MaxTrajectoryLength
  15. #. SAMPLER_RMIN
  16. #. SAMPLER_RMAX
  17. #. PESMIN
  18. #. INITIALM0_NPOINTS
  19. #. INITIALM2_NPOINTS
  20. #. HEP_M0_NPOINTS
  21. #. HEP_M0_NITERATIONS
  22. #. HEP_M2_NPOINTS
  23. #. HEP_M2_NITERATIONS
  24. #. HEP_PPF_NITERATIONS
  25. #. HEP_PPF_NPOINTS
  26. #. SF_FILENAME
  27. #. CF_FILENAME
  28. #. CF_FILENAMES
  29. #. R0
  30. #. RCUT
  31. #. PARTIAL_PARTITION_FUNCTION_RATIO
  32. #. PARTIAL_PARTITION_FUNCTION_RATIOS
  33. #. ApproximateFrequencyMax
  34. #. ODD_J_SPIN_WEIGHT
  35. #. EVEN_J_SPIN_WEIGHT
  36. #. USE_ZIMMERMANN_TRICK
  37. #. AVERAGE_TIME_BETWEEN_COLLISIONS
  38. #. MONOMER_TYPE
  39. #. DJ
  40. #. II
  41. #. INITIAL_J
  42. #. TORQUE_CACHE_LEN
  43. #. TORQUE_LIMIT
  44. #. NSWITCH_HISTOGRAM_BINS
  45. #. NSWITCH_HISTOGRAM_MAX
  46. #. NSWITCH_HISTOGRAM_FILENAME
  47. #. JINI_HISTOGRAM_BINS
  48. #. JINI_HISTOGRAM_MAX
  49. #. JINI_HISTOGRAM_FILENAME
  50. #. JFIN_HISTOGRAM_BINS
  51. #. JFIN_HISTOGRAM_MAX
  52. #. JFIN_HISTOGRAM_FILENAME
  53. #. SPECTRUM_FREQUENCY_MAX
  54. #. READ_CF
  55. #. READ_SF
  56. #. READ_SPECTRUM
  57. #. CF_TO_SF
  58. #. CMP
  59. #. DUP
  60. #. DUP2
  61. #. SWAP
  62. #. ROT
  63. #. DROP
  64. #. DROP2
  65. #. FIT_BASELINE
  66. #. AVERAGE_CFS
  67. #. COMPUTE_Mn_CLASSICAL_DETAILED_BALANCE
  68. #. COMPUTE_Mn_QUANTUM_DETAILED_BALANCE
  69. #. COMPUTE_Mn_QUANTUM_DETAILED_BALANCE
  70. #. INT3
  71. #. ALPHA
  72. #. D1
  73. #. D2
  74. #. D3
  75. #. D4
  76. #. D4a
  77. #. INV_D2
  78. #. INV_D3
  79. #. ADD_SPECTRA
  80. #. SMOOTH
  81. #. WRITE_CF
  82. #. WRITE_SF
  83. #. WRITE_SPECTRUM

Input Block

CALCULATION_TYPE

The program performs calculations based on the specified CALCULATION_TYPE. This field is required and expected to be a plain string (no quotation marks). Note that there is no default value - the field must be explicitly provided. Supported calculation types:

  • PR_MU
  • CORRELATION_SINGLE
  • CORRELATION_ARRAY
  • PROCESSING
  • CALCULATE_PHASE_SPACE_M0
  • CALCULATE_PHASE_SPACE_M2

PAIR_STATE

The pair state is specified using the keyword PAIR_STATE as a plain string (no quotation marks). This field is required, no default value is implied. This parameter is applicable for all calculation types except for CALCULATION_PROCESSING, where it's ignored. Available pair states:

  • FREE_AND_METASTABLE
  • BOUND
  • ALL

PAIR_REDUCED_MASS

The reduced mass for a pair is specified as a floating-point number. This parameter is applicable for all calculation types except for CALCULATION_PROCESSING.

SO_POTENTIAL

SO_POTENTIAL specifies a double-quoted string path to a dynamic library containing the required symbols double pes_lab(double* ) and void dpes_lab(double*, double*). Missing symbols trigger immediate termination. Functions pes_lab and dpes_lab operate on laboratory-frame coordinates and compute the potential energy and its derivative (outputted through the second pointer), respectively. If present, a symbol void pes_init(void) will be executed before any calls pes_lab and dpes_lab will be issued, enabling library initialization (e.g., loading the parameters from file).

SO_DIPOLE

SO_DIPOLE specifies a double-quoted string path to a dynamic library implementing the required symbol void dipole_lab(double *, double [3]), which computes laboratory-frame dipole moment components from input coordinates in the laboratory frame of reference. Missing symbol trigger immediate termination. The loaded function is assigned to dipole_1 and dipole_2, enabling calculation of autocorrelation functions. if present, a symbol void dipole_init(void) will be executed before any calls dipole_lab will be issued, enabling library initialization. This setting is equivalent to assigning the same path to both SO_DIPOLE.1 and SO_DIPOLE.2.

SO_DIPOLE.1

SO_DIPOLE.1, SO_DIPOLE.2 specify independent paths to dipole function implementations as dynamic libraries. The required and optional symbols match those mentioned in SO_DIPOLE. Setting these paths to different dynamic libraries enables the calculation of mixed correlation correlation.

SO_DIPOLE.2

TEMPERATURE

TEMPERATURES

SATELLITE_TEMPERATURES

Monomer Block

Processing Block

READ_CF

(See execute_read_cf) READ_CF reads a correlation function from a file specified by a string argument. Expects exactly one string argument (the file path). The correlation function is read into a CFnc structure and pushed onto the processing stack. The file may optionally contain a header with:

  • a line "# TEMPERATURE: <value>" (floating-point value, K)
  • a line "# AVERAGE OVER <value> TRAJECTORIES" (floating-point value).

The time values are expected to be in atomic time units, and correlation function values are expected in (m^3*atomic unit of dipole^2) units.

READ_SF

(See execute_read_sf) READ_SF reads a spectral function from a file specified by a string argument. Expects exactly one string argument (the file path). The spectral function is read into a SFnc structure and pushed onto the processing stack. The file may optionally contain a header with:

  • a line "# TEMPERATURE: <value>" (floating-point value, K)
  • a line "# AVERAGE OVER <value> TRAJECTORIES" (floating-point value).

The frequency values are expected to be in cm-1, and spectral function values are expected in (J * m^6 * s) units.

READ_SPECTRUM


(See execute_read_spectrum) READ_SPECTRUM reads a spectrum from a file specified by a string argument. Expects exactly one string argument (the file path). The spectrum is read into a Spectrum structure and pushed onto the processing stack. The file may optionally contain a header with:

  • a line "# TEMPERATURE: <value>" (floating-point value, K)
  • a line "# AVERAGE OVER <value> TRAJECTORIES" (floating-point value).

The frequency values are expected to be in cm-1, and spectrum values are expected in (cm-1 Amagat-2) units.

CF_TO_SF

(See execute_cf_to_sf) CF_TO_SF converts a correlation function (CFnc) to a spectral function (SFnc) using IDCT. Expects a correlation function on top of the stack and applies the inverse dicrete cosine transform (IDCT) to convert it to a spectral function.

If the FIT_BASELINE function was previously called on this CFnc, the function will account for the correlation function's wing parameters to add the corresponding Fourier image to the resulting spectral function.

CMP

(See execute_cmp) CMP compares two top stack elements (CFnc, SFnc, Spectrum or Floats) for equality. CMP performs a deep comparison of the two toptmost stack elements, checking:

  • metadata: Temperature, length, trajectory count
  • array contents: element-by-element comparison. For time and frequency values an absolute threshold is assume, for CF and SF values a relative threshold is assumed.
Parameters
reltolOptional: relative tolerance for comparing floats (default: 1e-3)

On failure, an error message is printed detailing the differing fields. The processing_stack's (Processing_Stack) return_code is set to the result of CMP.

DUP

(See execute_dup) DUP duplicates the top element of the processing stack. Creates an exact copy of the top stack element and pushes it onto the stack (valid for all supported types: CFnc, SFnc, and Spectrum).

Fails if the stack is empty.

DUP2

(See execute_dup2) DUP2 duplicates the top two elements on the processing stack keeping their ordering. Schematically presenting the top stack elements: (before) ... a b – (after) ... a b a b

Fails if there are less than 2 elements on stack.

SWAP

(See execute_swap) SWAP swaps the top element with the one below in the processing stack. Schematically presenting the top stack elements: (before) ... a b – (after) ... b a

Fails if the stack size is less than 2.

ROT

(See execute_rot) ROT rotates the third item to top. Schematically presenting the top stack elements: (before) ... a b c – (after) ... b c a

Fails if the stack size is less than 3.

DROP

(See execute_drop) DROP removes the top item from the processing stack. The operation will fail if the stack is empty.

DROP2

(See execute_drop2) DROP2 removes the top two elements from the processing stack. It's equivalent to using DROP DROP. The operation will fail if there are not enough elements on the stack.

FIT_BASELINE

(See execute_fit_baseline) FIT_BASELINE fits the baseline model of the form C(t) = C + A/(1 + B^2 t^2) to the correlation function (CFnc) using Levenberg-Marquardt optimization. The function fits the baseline model to the correlation function (CFnc) on stack top using GSL's Levenberg-Marquardt algorithm. Fitted parameters are saved as wing_params (WingParams) field of the processing stack (Processing_Stack) to be used by CF_TO_SF function.

Parameters
cf_extrapolation_begin_indexOptional: start time for fitting (default: DEFAULT_CF_EXTRAPOLATION_BEGIN_INDEX)

See the paper "Simulation of collision-induced absorption spectra based on classical trajectories and ab initio potential and induced dipole surfaces. II. CO2-Ar rototranslational band including true dimer contribution" for details.

We rely on the specific structure of the correlation function (see Fig. 7). Specifically, we expect it to have a secondary maximum from which it decays to some positive constant.

AVERAGE_CFS

(See execute_average_cfs) AVERAGE_CFS averages all correlation functions (CFnc) on the stack. Computes the element-wise average of all correlation functions from the stack. All input CFncs must have identical dimensions, perfectly matching time arrays, and consistent Temperature values. The operation requires valid trajectory counts for every input CFnc.

The averaged CFnc replaces all input CFncs on the stack, with its trajectory count set to the arithmetic sum of all input trajectory counts.

The operation fails if the trajectory count for one of the CFncs is not set or the metadata is not compatible with the other ones.

COMPUTE_Mn_CLASSICAL_DETAILED_BALANCE

(See execute_compute_mn_classical_detailed_balance) COMPUTE_Mn_CLASSICAL_DETAILED_BALANCE computes n-th spectral moment using classical detailed balance. Calculates the n-th order spectral moment from either a correlation function (CFnc) or spectral function (SFnc) on stack top assuming classical detailed balance. Pushes the obtained spectral moment on stack.

Parameters
nRequired: order of spectral moment (passed as integer argument)

The computation for spectral function uses Simpson's method for numerical integration. If SPECTRUM_FREQUENCY_MAX parameter is set, the spectral function is truncated at this frequency before conducting the integration.

COMPUTE_Mn_QUANTUM_DETAILED_BALANCE

(See execute_compute_mn_quantum_detailed_balance) COMPUTE_Mn_QUANTUM_DETAILED_BALANCE computes n-th spectral moment using quantum detailed balance. Calculates the n-th order spectral moment from a spectral function (SFnc) on stack assuming quantum detailed balance. Pushes the obtained spectral moment on stack.

Parameters
nRequired: order of spectral moment (passed as integer argument)

The computation for spectral function uses Simpson's method for numerical integration. If SPECTRUM_FREQUENCY_MAX parameter is set, the spectral function is truncated at this frequency before conducting the integration.

INT3

(See execute_int3) INT3 triggers a debug breakpoint interrupt and displays comprehensive stack information. When called it will halt the program execution and display current stack contents.

ALPHA

(See execute_alpha) ALPHA computes absorption coefficient from spectral function (SFnc). Computes the absorption coefficient using the spectral function on stack top. The computation requires and consumes the input SFnc, using its Temperature field.

ADD_SPECTRA

(See execute_add_spectra) ADD_SPECTRA performs element-wise addition of multiple spectra (Spectrum) from the stack. Computes the sum of all spectra from the stack. All spectra must have consistent Temperature values. The resulting spectrum replaces all input spectra on the stack with the following properties:

  • trajectory count: arithmetic sum of all input trajectory counts
  • frequency range: [0, min(max_frequency)] of all input spectra
  • data: element-wise sum of input spectra (using cubic spline interpolation if needed)

If input frequency ranges differ, performs cubic spline interpolation to the target frequency range defined by the smallest maximum frequency.

Parameters
wavenumber_stepOptional: output spectrum resolution. Defaults to the largest wavenumber step among input spectra
nOptional: number of input spectra to process from stack top. Defaults to processing all available spectra from stack top. In this default case, all objects on stack are expected to be spectra (Spectrum).

SMOOTH

(See execute_smooth) Performs the smoothing of spectral function (SFnc) using LOESS algorithm. Applies LOESS regression to smooth the spectral function (SFnc) on stack top. The algorithm performs local polynomial fitting across the provided frequency grid. The result replaces input spectral function on stack top.

The function uses thread parallelization.

Parameters
grid_npointsRequired: number of grid points for smooth function evaluation
grid_maxRequired: upper frequency limit of the evaluation grid (in cm-1)
window_size_minOptional: minimum number of points in smoothing window
window_size_stepOptional: window size growth rate (int cm-1/point). Determines how window expands with frequency.
window_size_delayOptional: Delay before window size begins growing (in points). Maintains consistent window size at lower frequencies.
windows_size_capOptional: Cap on window size (in points) [though this option was not found useful in most cases]

D1

(See execute_D1) Applies D1 desymmetrization to the spectral function (SFnc) on the top of the stack.

D2

(See execute_D2) Applies D2 desymmetrization to the spectral function (SFnc) or spectrum (Spectrum) on the top of the stack.

D3

(See execute_D3) Applies D3 desymmetrization to the spectral function (SFnc) or spectrum (Spectrum) on the top of the stack.

D4

(See execute_D4) Applies D4 desymmetrization to the correlation function (CFnc) on the top of the stack producing spectral function (SFnc).

D4a

(See execute_D4a) Applies D4a desymmetrization to the correlation function (CFnc) on the top of the stack producing spectral function (SFnc).

INV_D2

(See execute_inv_D2) Applies inverse of D2 desymmetrization to the spectrum (Spectrum) on the top of the stack.

INV_D3

(See execute_inv_D3) Applies inverse of D3 desymmetrization to the spectrum (Spectrum) on the top of the stack.

WRITE_CF

Writes correlation function (CFnc) to output file. Serializes the correlation function from stack top to a file specified by a string argument. The correlation function is consumed from stack top during the operation. Its metadata (Temperature and trajectory count) is saved in a format expected by READ_CF.

The function handles the normlization: if correlation function's normalization flag is false, the data is divided by the trajectory count before writing to file.

Parameters
output_filenameRequired: output filename provided as unnamed string argument

Fails if stack is empty or top element is not correlation function (CFnc)

WRITE_SF

(See execute_write_sf) Writes spectral function (SFnc) to output file. Serializes the spectral function from stack top to a file specified by a string argument. The spectral function is consumed from stack top during the operation. Its metadata (Temperature and trajectory count) is saved in a format expected by READ_SF.

The function handles the normlization: if spectral function's normalization flag is false, the data is divided by the trajectory count before writing to file.

Parameters
output_filenameRequired: output filename provided as unnamed string argument

Fails if stack is empty or top element is not spectral function (SFnc)

WRITE_SPECTRUM

(See execute_write_spectrum) Writes spectrum (Spectrum) to output file. Serializes the spectrum from stack top to a file specified by a string argument. The spectrum is consumed from stack top during the operation. Its metadata (Temperature and trajectory count) is saved in a format expected by READ_SPECTRUM.

The function handles the normlization: if spectrum's normalization flag is false, the data is divided by the trajectory count before writing to file. If SPECTRUM_FREQUENCY_MAX parameter is set, spectrum is truncated at the specified frequency before saving to file.

Parameters
output_filenameRequired: output filename provided as unnamed string argument

Fails if stack is empty or top element is not spectrum (Spectrum)