fix: add missing elements 104-118 (Rf~Og) to periodic_table.json#1009
fix: add missing elements 104-118 (Rf~Og) to periodic_table.json#1009SchrodingersCattt wants to merge 1 commit into
Conversation
The ELEMENTS list in periodic_table.py already contains all 118 element symbols, but periodic_table.json only had entries for elements 1-103 (H~Lr). This mismatch causes KeyError when dpdata.System() is constructed with a type_map that includes elements beyond Lr, and subsequently to_lammps_lmp() is called. The _get_lammps_masses() safety check passes (all names in ELEMENTS) but Element() lookup fails because _pdt dict lacks the entry. Added elements: Rf(104), Db(105), Sg(106), Bh(107), Hs(108), Mt(109), Ds(110), Rg(111), Cn(112), Nh(113), Fl(114), Mc(115), Lv(116), Ts(117), Og(118). Mass numbers from most stable isotopes.
Merging this PR will improve performance by 23.16%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_cli |
372.1 ms | 296.2 ms | +25.64% |
| ⚡ | WallTime | test_import |
11.3 ms | 9.4 ms | +20.72% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing SchrodingersCattt:fix/add-missing-elements-104-118 (2953526) with master (5de0229)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1009 +/- ##
==========================================
+ Coverage 86.06% 86.87% +0.81%
==========================================
Files 83 89 +6
Lines 7886 8268 +382
==========================================
+ Hits 6787 7183 +396
+ Misses 1099 1085 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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)
📝 WalkthroughWalkthroughThis PR adds JSON entries for elements with atomic numbers 104 through 118 (Rf through Og) to the periodic table data file, including a fix to properly close the preceding Lr entry. ChangesPeriodic Table Data
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
The ELEMENTS list in periodic_table.py already contains all 118 element symbols, but periodic_table.json only had entries for elements 1-103 (H~Lr). This mismatch causes KeyError when dpdata.System() is constructed with a type_map that includes elements beyond Lr, and subsequently to_lammps_lmp() is called. The _get_lammps_masses() safety check passes (all names in ELEMENTS) but Element() lookup fails because _pdt dict lacks the entry.
Added elements: Rf(104), Db(105), Sg(106), Bh(107), Hs(108), Mt(109), Ds(110), Rg(111), Cn(112), Nh(113), Fl(114), Mc(115), Lv(116), Ts(117), Og(118). Mass numbers from most stable isotopes.
Summary by CodeRabbit