deepmodeling / deepmodeling/tbplas
[Code scan] Validate all TBPM config sections used by solvers
- 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
`Config` exposes `DC_conductivity` and `quasi_eigenstates`, and solver/analysis code reads both sections later. However, `set_legal_params()` and `check_params()` only validate `generic`, `LDOS`, `dyn_pol`, and `dckb`. Typos in the omitted sections can pass configuration checks and fail later as ignored settings or `KeyError`.
Code references:
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/config.py#L102-L123
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/config.py#L140-L165
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/solver.py#L392-L412
https://github.com/deepmodeling/tbplas/blob/4d3652b3dba8eb930e4869a6d41074f62d703692/tbplas/tbpm/solver.py#L497-L523
Suggested fix: include every public config section in `_legal_params` and validate them in `check_params()`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tbplas/tbpm/config.py at set_legal_params() and check_params(), then inspect the DC_conductivity and quasi_eigenstates reads in tbplas/tbpm/solver.py. Include every public config section in _legal_params and validation so typos are rejected before solver or analysis code encounters ignored settings or KeyError failures.
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
- 75/100