fix(dftbplus): parse all geometry and force rows#1018
Conversation
Use the declared atom count instead of a four-row state machine when reading DFTB+ GenFormat geometries and Total Forces. Add a five-atom regression that explains why the ammonia fixture did not expose truncation. 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1018 +/- ##
==========================================
- Coverage 86.87% 86.84% -0.03%
==========================================
Files 89 89
Lines 8266 8256 -10
==========================================
- Hits 7181 7170 -11
- Misses 1085 1086 +1 ☔ 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.
Approving: correct rewrite of the DFTB+ parser (#991). Reading natoms from the GenFormat header and looping dynamically fixes the accidental hard-coded 4-row limit (which was invisible only because the sole fixture, ammonia, had exactly 4 atoms). Verified: count line's field 0 is the atom count, exactly natoms geometry+force rows are read, columns/units unchanged, the 4-atom fixture is unaffected, and the new 5-atom test genuinely fails on the pre-fix truncating parser. Build CI green (docs/readthedocs red is the unrelated emscripten-forge outage, handled in #1035). Minor non-blocking follow-ups exist for malformed input (unbound natoms if no Geometry block) and the F/fractional GenFormat flag, both pre-existing edge cases.
Fixes #991.
Use the declared DFTB+ atom count instead of a four-row state machine for geometry and force blocks.
Tests:
cd tests && python -m unittest test_dftbplusWhy existing tests missed it: The only fixture was ammonia with exactly four atoms, matching the accidental hard-coded limits.
Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh