parse_ti_output
Parse RASPA2 thermodynamic integration output from lambda subdirectories, extract ⟨∂U/∂λ⟩ values, and compute ΔA via trapezoidal integration to obtain free energy differences in kJ/mol.
Instructions
Parse RASPA2 Thermodynamic Integration (TI) output and compute ΔA (1-8).
Expects one completed RASPA2 simulation per lambda value (0.0 → 1.0), each in its own subdirectory. The subdirectory name should contain the lambda value (e.g. 'lambda_0.3/', '0.3/', etc.).
RASPA2 must be run with Lambda and LambdaDefinition set in simulation.input. Each output file must contain a line matching: Average <dU/dlambda>: X.XXXXX +/- Y.YYYYY [K]
KNOWN LIMITATION: The exact format of this line varies between RASPA2 versions and build options. If status='no_ti_data' is returned, check:
That the simulation used Lambda / LambdaDefinition keywords.
That the RASPA2 version writes 'Average <dU/dlambda>'.
That subdirectory names contain the numeric lambda value. In that case, extract dU/dlambda values manually from the output files and call numpy.trapezoid() directly.
The function integrates ⟨∂U/∂λ⟩ over λ using the trapezoidal rule: ΔA = ∫₀¹ ⟨∂U/∂λ⟩ dλ [K] → ×R → [kJ/mol]
Fewer lambda points = less accuracy:
3 points (0, 0.5, 1): rough estimate
5 points: adequate for most cases
11 points (0.0, 0.1, ..., 1.0): high accuracy
Args: output_dir: Root directory containing per-lambda subdirectories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_dir | Yes |