Skip to content

fix(qe): honor angstrom cells without cel files - #1029

Open
njzjz-bot wants to merge 3 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-296
Open

fix(qe): honor angstrom cells without cel files#1029
njzjz-bot wants to merge 3 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-296

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Fixes #296.

Respect an explicit CELL_PARAMETERS { angstrom } unit in QE cp/traj files when no .cel sidecar is present.

Tests: cd tests && python -m unittest test_qe_cp_traj test_qe_cp_traj_skipload

Why existing tests missed it: Existing tests covered Bohr/default input and sidecar cells, but not an Angstrom card without .cel.

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. dpdata qe labels Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@njzjz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 87413554-6f3e-40de-b8ba-888678e91246

📥 Commits

Reviewing files that changed from the base of the PR and between 0416b54 and b4ebc39.

📒 Files selected for processing (11)
  • dpdata/formats/qe/traj.py
  • tests/qe.traj/a_no_cel/cp.in
  • tests/qe.traj/a_no_cel/cp.pos
  • tests/qe.traj/alat_no_cel/cp.in
  • tests/qe.traj/alat_no_cel/cp.pos
  • tests/qe.traj/angstrom_no_cel/cp.in
  • tests/qe.traj/angstrom_no_cel/cp.pos
  • tests/qe.traj/bohr_no_cel/cp.in
  • tests/qe.traj/bohr_no_cel/cp.pos
  • tests/qe.traj/missing_cell_no_cel/cp.in
  • tests/test_qe_cp_traj.py

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.

@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 27.07%

⚠️ 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_import 11.1 ms 8.6 ms +28.94%
WallTime test_cli 367.4 ms 293.4 ms +25.23%

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 njzjz-bot:fix/issue-296 (b4ebc39) with master (9723e34)

Open in CodSpeed

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.78%. Comparing base (0416b54) to head (b4ebc39).
⚠️ Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
dpdata/formats/qe/traj.py 98.18% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1029      +/-   ##
==========================================
+ Coverage   86.87%   87.78%   +0.90%     
==========================================
  Files          89       90       +1     
  Lines        8266     9313    +1047     
==========================================
+ Hits         7181     8175     +994     
- Misses       1085     1138      +53     

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

@wanghan-iapcm wanghan-iapcm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #296 angstrom fix is correct and the new test genuinely fails on pre-fix code (10.44 vs 19.73). Requesting test coverage for the rewrite's other new branches, which codecov/patch flags red -- see inline.

Comment thread dpdata/formats/qe/traj.py Outdated
Exercise Bohr CELL_PARAMETERS without a cell trajectory and the missing-card error for ibrav zero.

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning-Effort: xhigh

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A blocking data-correctness issue remains in the unit dispatch. This PR is authored by njzjz-bot, so GitHub does not permit this account to request changes on its own PR; the inline COMMENT records the required fix.

Process note: the Codex usage allowance is about to reset, so I am spending the remaining token budget now on this review.

Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh

Comment thread dpdata/formats/qe/traj.py Outdated
Distinguish angstrom, bohr, and alat CELL_PARAMETERS cards in the missing-.cel fallback. Derive alat from celldm(1) or A, honor the default unit only when that scale is available, and reject unsupported or ambiguous declarations.\n\nCoding-Agent: Codex\nCodex-Version: codex-cli 0.144.6\nModel: gpt-5.6-sol\nReasoning-Effort: xhigh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dpdata qe size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Read qe/cp/traj with unit angstrom without .cel file

3 participants