Fix onsiteDB: add missing Tc, La, Po, At onsite energies#349
Conversation
The onsite_energy_database was missing four elements that are present in the old derived fork: Tc, La, Po, At. A full element-by-element comparison against the downstream copy (UniSK) confirmed that all 68 shared elements are 100% numerically identical -- the four were simply dropped during a prior refactor, not recomputed. The values below are from the same GAPW LDA source as the rest of the table. - Tc (after Mo, before Ru): 5s/5p/4d - La (after Ba): 5s/6s/5p/6p/5d/4f/d*/f* - Po (after Bi, before At): 6s/6p/d* - At (after Po, before Rn): 6s/6p/d* This restores full periodic-table coverage (72 elements) so downstream SK parameter workflows that iterate over all elements no longer hit 'element not found in onsite energy database'.
|
This advisory review plan was generated from changed file names using trusted base-branch code. DeePTB PR Review Plan / DeePTB PR 审查计划Risk / 风险等级: Low (低) · Changed files / 变更文件: 1 Why / 风险来源
Recommended Review / 建议审查重点
Detailed risk areas
Human review focus
Local commands and hold conditionsSuggested local commands:
Hold conditions:
Advisory only. / 仅作为审查辅助。 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesOnsite energy database updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
dptb/nn/sktb/onsiteDB.py'sonsite_energy_databasewas missing four elements: Tc, La, Po, At. Downstream workflows that iterate over all elements (e.g. SK parameter generation that walks the full periodic table) hitAssertionError: <element> not found in onsite energy database.Verification that this is pure data loss, not a recomputation
A full element-by-element, orbital-by-orbital comparison against a downstream fork (UniSK, derived from an older DeePTB) confirms:
main: 68 elementsAt,La,Po,Tc) are the only difference — they were dropped during a prior refactor, not recomputed with different values.So adding them back is safe and conflicts with nothing.
Changes
Added the four elements at their periodic-table positions, using the same GAPW LDA source as the rest of the table:
Restores full periodic-table coverage (72 elements).
Testing
Loaded the updated database and confirmed all four elements are present and queryable; no import errors. (No unit test added since this is a static data table, but happy to add one if maintainers prefer.)
Summary by CodeRabbit
New Features
Bug Fixes