Skip to content

Report the xTB toolchain in thermo doctor - #71

Merged
galjos merged 1 commit into
mainfrom
doctor-xtb-toolchain
Jul 6, 2026
Merged

Report the xTB toolchain in thermo doctor#71
galjos merged 1 commit into
mainfrom
doctor-xtb-toolchain

Conversation

@galjos

@galjos galjos commented Jul 6, 2026

Copy link
Copy Markdown
Member

Follow-up to the xtb engines (#68, #70): thermo doctor only checked the DFTB+ toolchain. Now it also reports the xTB backends, so doctor reflects all three engines.

What it reports

  • xtb — the native binary for --engine xtb-cli (resolved via $XTB_COMMAND, then PATH).
  • tblite — the Python package for --engine xtb.
dftb+        found    /.../bin/dftb+
modes        found    /.../bin/modes
DFTB_PREFIX  found    /.../3ob/skfiles
C-C.skf      found    /.../3ob/skfiles/C-C.skf
xtb          found    /.../xtbcli/bin/xtb
tblite       found    importable

When missing, the detail line gives the fix:

xtb     missing  not found (set XTB_COMMAND or `conda install -c conda-forge xtb`; needed for --engine xtb-cli)  (optional)
tblite  missing  not importable (`conda install -c conda-forge tblite-python`; needed for --engine xtb)  (optional)

Design: optional, so DFTB+-only users are unaffected

  • The xTB checks are marked (optional) and do not change the doctor exit code — it still fails only on a missing required DFTB+ backend (dftb+/modes/DFTB_PREFIX/C-C.skf).
  • Diagnostic gains an optional flag; run_doctor filters optional items from the pass/fail decision.

This is a small step toward the "helpful doctor" idea — the detail now includes the exact conda install command for whatever's missing.

Note

This was originally committed onto the #70 branch, but #70 merged before its CI picked up the extra commit — so it's re-based here as its own PR off the current main. Offline suite: 252 passed / 11 skipped.

Extend the setup check to the xTB engines: the native `xtb` binary (for
`--engine xtb-cli`, resolved via $XTB_COMMAND or PATH) and the `tblite` package
(for `--engine xtb`). Both are optional -- a DFTB+-only user is unaffected: they
are shown as informational and do not change the doctor exit code, which still
fails only on a missing required DFTB+ backend.
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.68%. Comparing base (b87b46c) to head (ad6b309).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   96.66%   96.68%   +0.02%     
==========================================
  Files          24       24              
  Lines        1527     1538      +11     
==========================================
+ Hits         1476     1487      +11     
  Misses         51       51              
Flag Coverage Δ
unittests 96.68% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@galjos
galjos merged commit ee34db1 into main Jul 6, 2026
3 checks passed
galjos added a commit that referenced this pull request Jul 6, 2026
`environment.yml` already installed DFTB+ but predates the xTB engines
(#68, #70). Add the xTB backends so `conda env create -f
environment.yml` provisions **every** calculation engine in one command.

```yaml
dependencies:
  - python>=3.12
  - dftbplus        # DFTB+ engine: `dftb+` and `modes`
  - xtb             # native xtb binary, for --engine xtb-cli
  - tblite-python   # GFN-xTB via tblite, for --engine xtb
  - pip
  - pip:
      - "-e .[test,lint]"
```

After `conda env create -f environment.yml && conda activate
thermoscreening`, `thermo doctor` reports every backend as found (pairs
with #71). README updated to say the env covers all backends.

Verified the three backends resolve on conda-forge (dftbplus-25.1 nompi,
xtb-6.6.1, tblite-python-0.3.0); YAML validated.

This is the "installable through the project" follow-up: the compiled
backends (DFTB+/modes/xtb/tblite) can't be pip-installed, so the conda
env is how the project bundles them, while `thermo setup-dftb` handles
the Slater-Koster and GBSA parameter files.
@galjos
galjos deleted the doctor-xtb-toolchain branch July 6, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant