deepmodeling / deepmodeling/tbplas
[Code scan] Preserve finite s-orbital cube values at the nucleus
- 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: Low
`set_cube()` forces every grid point with `r < 1.0e-7` to zero. That avoids division by zero for angular functions with `l > 0`, but it also zeros `l == 0` s orbitals at the nucleus, where the value is finite. The resulting cube output contains an artificial node at the nucleus for s states.
Code reference:
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/cython/atom.pyx#L193-L209
Suggested fix: handle `l == 0` separately at small `r`, and only force zero for angular components that are genuinely undefined or vanish at the origin.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tbplas/cython/atom.pyx at set_cube(), especially lines 193-209, and inspect how the small-r cutoff interacts with the orbital angular component. Verify the behavior for l == 0 and l > 0; done means finite s-orbital values are preserved at the nucleus while genuinely undefined or vanishing components remain zero.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100