deepmodeling / deepmodeling/tbplas

[Code scan] Record the first AC-conductivity time slice

Open Beginner friendly
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
19
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This issue comes from a Codex global scan of deepmodeling/tbplas at commit 4d3652b3dba8eb930e4869a6d41074f62d703692.

Severity: Medium

`tbpm_accond` initializes `corr` to zero, computes the AC correlation values for timestep 1, and even writes them in DEBUG mode. However, the output array is only updated inside the loop that starts at `t = 2`, so `corr(:, 1)` remains zero in normal output.

Code references:
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/fortran/tbpm.f90#L221-L239
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/fortran/tbpm.f90#L283-L344

Suggested fix: accumulate `corr(:, 1)` immediately after the initial `corrval` calculation, before entering the `t = 2, n_timestep` loop.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in tbplas/fortran/tbpm.f90 at the tbpm_accond code referenced around lines 221–239 and 283–344. Trace the initial corrval calculation and the loop beginning at t = 2, then ensure the first time slice is accumulated before that loop. Done means normal output records the computed corr(:, 1) values instead of leaving them zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
hpc
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.