deepmodeling / deepmodeling/dpti
[Code scan] NVT TI task generation references an unset pressure
- 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
The supported NVT temperature-path branch in `ti.make_tasks()` never assigns `pres`, but later passes `pres=pres` into `_gen_lammps_input()`. This makes valid `ens='nvt'`, `path='t'` task generation fail with `UnboundLocalError`.
Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L143
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L150
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L239
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L248
Reproduction
Call `ti.make_tasks()` with minimal valid NVT/T-path settings. The branch accepts the configuration at lines 143-150, then fails when building the first task because `pres` was not defined.
Expected result
NVT task generation should either not pass pressure to `_gen_lammps_input()` or initialize a harmless/default pressure value for the generator.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in dpti/ti.py at the NVT temperature-path branches around lines 143-150 and trace the call to _gen_lammps_input() around lines 239-248. Reproduce the issue with minimal valid NVT/T-path settings, then verify that task generation completes without an UnboundLocalError and handles pressure as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100