fix(vasp): interpret negative POSCAR scale as volume#1019
Conversation
Convert negative POSCAR scale factors to a positive linear factor that realizes the requested cell volume, while retaining direct multiplier behavior for positive scales. Add a regression for volume and Cartesian coordinate scaling; the previous fixtures only used positive factors. Coding-Agent: Codex Codex-Version: codex-cli 0.144.4 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
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 |
Merging this PR will not alter performance
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1019 +/- ##
==========================================
+ Coverage 86.87% 86.95% +0.08%
==========================================
Files 89 90 +1
Lines 8266 9185 +919
==========================================
+ Hits 7181 7987 +806
- Misses 1085 1198 +113 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wanghan-iapcm
left a comment
There was a problem hiding this comment.
The negative-scale-as-volume fix is correct and matches the algorithm in #993. One follow-up: codecov/patch is red because the added test exercises only the Direct-coordinates path — see the inline note for the Cartesian case worth adding.
Cover Cartesian coordinate scaling and the zero-volume guard for negative POSCAR target-volume factors. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
Fixes #993.
Convert negative POSCAR scale factors from target volume to a positive linear factor while preserving positive-scale behavior.
Tests:
cd tests && python -m unittest test_vasp_poscar_to_system.TestVaspNegativeScaleWhy existing tests missed it: All previous POSCAR fixtures used positive scale factors, so the VASP volume convention was untested.
Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh