deepmodeling / deepmodeling/dpti
[Code scan] hti_liq default Helmholtz compute always falls through to an error
- Dominant language
- Python
- Stars
- 42
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
Source: Codex global repository scan of deepmodeling/dpti at commit b719828e7eeb571bd26411430197cd74ea78e38c.
Project: https://github.com/orgs/deepmodeling/projects/27
Problem
`hti_liq.compute_task()` handles the default `free_energy_type='helmholtz'`, but then immediately evaluates a separate `if free_energy_type == 'gibbs'` with an attached `else`. For Helmholtz runs, the function computes and prints the result, then falls through to `RuntimeError('known free energy type')` before writing `result.json`.
Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/hti_liq.py#L438
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/hti_liq.py#L443
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/hti_liq.py#L456
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/hti_liq.py#L466
Reproduction
Run the liquid HTI compute path on a completed job with the CLI default type:
```bash
python -m dpti.hti_liq compute JOB
```
Expected result
The default Helmholtz compute path should write `JOB/result.json` and return normally. The Gibbs branch should be an `elif` or the unknown-type check should be separate from the Helmholtz/Gibbs branches.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.