Support Turbomole's multi-file output in read_cclib/cclib_thermo - #110
Merged
Conversation
Verified against a real Turbomole 7.2 aoforce (frequency) calculation, fetched from cclib's own public regression-test data (cclib/cclib-data). Turbomole splits a job's output across many small files instead of one logfile (control, coord, aoforce.out, ...). cclib's own ccread/ccopen supports this via its documented multi-file mode (source: str | list[str]), but read_cclib/cclib_thermo always did cclib.io.ccread(str(path)), which silently cannot accept a list -- so despite the docs/module docstring listing Turbomole as supported, it could not actually be used at all. Accept path/output_file as a single path or a list of paths (_normalize_source), passed through to cclib unmodified for the list case, with a readable _describe_source for error messages either way. Add the real captured Turbomole aoforce.out + companion files as test fixtures (a 7-atom Au/N/Cl complex) and tests parsing them end to end through read_cclib and cclib_thermo, plus unit tests for the new helpers. Closes #109
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
+ Coverage 97.27% 97.28% +0.01%
==========================================
Files 31 31
Lines 1910 1918 +8
==========================================
+ Hits 1858 1866 +8
Misses 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Review nit: the 'No energy' TSValueError used the raw output_file (a Python list repr for the Turbomole multi-file case) instead of _describe_source's clean comma-joined format.
galjos
added a commit
that referenced
this pull request
Jul 8, 2026
Small docs-only addition following the ORCA/Gaussian/Turbomole real-software validation work (#108, #110, #112): a brief note in the QM-import usage section stating that `orca_thermo`/`cclib_thermo` are validated against genuine program output, and that unparseable files raise `TSValueError` rather than an arbitrary parser exception. Verified by building the docs locally and visually checking the rendered note (Furo's styled admonition) in the browser. No code changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by fetching a real Turbomole calculation from cclib's own public regression-test data (cclib/cclib-data) and running it through
cclib_thermo— the first genuine (non-mocked) Turbomole test this reader has ever had.The bug
Turbomole splits a job's output across many small files instead of one logfile (
control,coord,aoforce.out, ...). cclib's ownccread/ccopendocuments exactly this case —source: str | list[str], "a single logfile, a list of logfiles (for a single job)" — butread_cclib/cclib_thermoalways didcclib.io.ccread(str(path)), which converts a list to its string repr rather than passing it through. So despite Turbomole being named in the docs and the module docstring as a supported program, it could not actually be read at all.The fix
read_cclib(path)/cclib_thermo(output_file, ...)now accept either a single path or a list of paths (_normalize_source), passed to cclib unmodified for the list case, with a readable_describe_sourcefor error messages either way. Single-file callers (Gaussian/ORCA/Psi4/NWChem) are unaffected.Verification
Downloaded a real Turbomole 7.2
aoforcefrequency calculation (a 7-atom Au/N/Cl complex) from cclib's own public test-data repository and ran it through the actual code:Committed the real captured files as test fixtures (
tests/data/calculator/turbomole/, ~160 KB, with a provenance README) and added tests: exact-value parsing, the fullcclib_thermopipeline end-to-end, a mock proving the list reachescclib.io.ccreadunmodified, and unit tests for the new helpers. Full suite passes (377 passed, 12 pre-existing skips), 100% patch coverage onqm.py. Docs updated with a Turbomole multi-file example.Closes #109