Skip to content

fix: add missing elements 104-118 (Rf~Og) to periodic_table.json#1009

Open
SchrodingersCattt wants to merge 1 commit into
deepmodeling:masterfrom
SchrodingersCattt:fix/add-missing-elements-104-118
Open

fix: add missing elements 104-118 (Rf~Og) to periodic_table.json#1009
SchrodingersCattt wants to merge 1 commit into
deepmodeling:masterfrom
SchrodingersCattt:fix/add-missing-elements-104-118

Conversation

@SchrodingersCattt

@SchrodingersCattt SchrodingersCattt commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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

  • New Features
    • Expanded the periodic table data to include elements 104–118, completing the later portion of the table.
    • Added the missing entry closure before the new elements to ensure the data is properly formatted.

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.
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working dpdata labels Jul 5, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 5, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 23.16%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks

Performance Changes

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)

Open in CodSpeed

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.87%. Comparing base (8b6a0a7) to head (2953526).
⚠️ Report is 69 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 65f48075-2e44-4416-884d-630a59b38b61

📥 Commits

Reviewing files that changed from the base of the PR and between 5de0229 and 2953526.

📒 Files selected for processing (1)
  • dpdata/periodic_table.json

📝 Walkthrough

Walkthrough

This 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.

Changes

Periodic Table Data

Layer / File(s) Summary
Add missing element entries
dpdata/periodic_table.json
Closes the preceding Lr object and appends entries for elements Rf through Og (atomic numbers 104-118), each with name, atomic_no, X, atomic_mass, radius, and calculated_radius fields.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding missing periodic table elements 104–118 to periodic_table.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dpdata size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants