Hawaii Hybrid
|
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:
&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.
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:
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:
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 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 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.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.
(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:
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.
(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:
The frequency values are expected to be in cm-1, and spectral function values are expected in (J * m^6 * s) units.
(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:
The frequency values are expected to be in cm-1, and spectrum values are expected in (cm-1 Amagat-2) units.
(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.
(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:
reltol | Optional: 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.
(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.
(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.
(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.
(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.
(See execute_drop) DROP removes the top item from the processing stack. The operation will fail if the stack is empty.
(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.
(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.
cf_extrapolation_begin_index | Optional: 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.
(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.
(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.
n | Required: 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.
(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.
n | Required: 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.
(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.
(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.
(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:
If input frequency ranges differ, performs cubic spline interpolation to the target frequency range defined by the smallest maximum frequency.
wavenumber_step | Optional: output spectrum resolution. Defaults to the largest wavenumber step among input spectra |
n | Optional: 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). |
(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.
grid_npoints | Required: number of grid points for smooth function evaluation |
grid_max | Required: upper frequency limit of the evaluation grid (in cm-1) |
window_size_min | Optional: minimum number of points in smoothing window |
window_size_step | Optional: window size growth rate (int cm-1/point). Determines how window expands with frequency. |
window_size_delay | Optional: Delay before window size begins growing (in points). Maintains consistent window size at lower frequencies. |
windows_size_cap | Optional: Cap on window size (in points) [though this option was not found useful in most cases] |
(See execute_D1) Applies D1 desymmetrization to the spectral function (SFnc) on the top of the stack.
(See execute_D2) Applies D2 desymmetrization to the spectral function (SFnc) or spectrum (Spectrum) on the top of the stack.
(See execute_D3) Applies D3 desymmetrization to the spectral function (SFnc) or spectrum (Spectrum) on the top of the stack.
(See execute_D4) Applies D4 desymmetrization to the correlation function (CFnc) on the top of the stack producing spectral function (SFnc).
(See execute_D4a) Applies D4a desymmetrization to the correlation function (CFnc) on the top of the stack producing spectral function (SFnc).
(See execute_inv_D2) Applies inverse of D2 desymmetrization to the spectrum (Spectrum) on the top of the stack.
(See execute_inv_D3) Applies inverse of D3 desymmetrization to the spectrum (Spectrum) on the top of the stack.
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.
output_filename | Required: output filename provided as unnamed string argument |
Fails if stack is empty or top element is not correlation function (CFnc)
(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.
output_filename | Required: output filename provided as unnamed string argument |
Fails if stack is empty or top element is not spectral function (SFnc)
(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.
output_filename | Required: output filename provided as unnamed string argument |
Fails if stack is empty or top element is not spectrum (Spectrum)