deepmodeling / deepmodeling/dpti

[Code scan] TI result JSON stores only one total error value

Open Beginner friendly
#125 1 comment 0 reactions 0 assignees View on GitHub
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
`ti.post_tasks()` prints a total error value for every thermodynamic point, but the JSON output computes `all_fe_tot_err` once using the loop variable `ii` after the print loop. As a result, `result.json` contains only the last point's total error instead of an array aligned with `all_fe`, `all_fe_stat_err`, and `all_fe_inte_err`.

Code references
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L549
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L557
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L559
https://github.com/deepmodeling/dpti/blob/b719828e7eeb571bd26411430197cd74ea78e38c/dpti/ti.py#L568

Reproduction
Run `ti.post_tasks()` on a multi-point job and inspect `result.json`. `data.all_fe_tot_err` should have one value per free-energy point, but the current code serializes only the norm for the final loop index.

Expected result
`all_fe_tot_err` should be computed vector-wise, for example from all pairs of `all_fe_err` and `all_fe_sys_err`, and its length should match `all_fe`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in dpti/ti.py at post_tasks(), especially the referenced lines around the result.json construction. Run ti.post_tasks() on a multi-point job and inspect all_fe, all_fe_err, and all_fe_sys_err alongside all_fe_tot_err. Done means all_fe_tot_err contains one total-error value per free-energy point and is aligned with the other arrays.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.