Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Up to standards ✅🟢 Issues
|
| Category | Results |
|---|---|
| Security | 2 medium |
🟢 Metrics 32 complexity
Metric Results Complexity 32
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Left-handed cells currently reverse the predicted stress because
BatchedGraph.from_graphsuses the signed lattice triple product as the volume. Exchanging two lattice basis vectors preserves the physical lattice and Cartesian atom positions, and the stress normalization requires the nonnegative physical volumeabs(det(lattice)).Apply
abs()at the existing volume owner and document the volume unit. The existing cross/dot implementation is retained, including its MPS compatibility, and the strain definition, graph conversion, energy/force paths and checkpoint format stay unchanged.Reproduction
For the same two-atom Si structure represented with left-handed basis vectors, the original ASE calculator reports
σxx ≈ +0.01204520 eV/ų. The energy-strain finite difference gives approximately-0.01202048 eV/ų, and the candidate reports approximately-0.01204520 eV/ų. The finite-strainC11changes from approximately-155.616 GPato+155.616 GPa, matching the right-handed representation's approximately+155.605 GParesult.This also reaches real consumers. Five FIRE cell-relaxation steps raise the original left-handed system's total energy from approximately
-10.521078to-9.365305 eV. With this patch, it decreases to approximately-10.626108 eV, matching the right-handed control's approximately-10.626107 eV.Verification
StructOptimizerwithFrechetCellFilter, trajectory readback, andStructureData → Trainer.train → SGD → checkpointrecovery.mainatb9a6c15860237297a5a5169660e83b2e61a78e76, and 6 passed with the patch. The candidate plus existing model, relaxation and trainer regressions gives 226 passed and 3 accelerator cases deselected.5.61e-4to1.19e-7.mps:0, returns finite energy/forces/stress and passes the equivalence checks. MPS training and relaxation remain unrun.git diff --checkpass.CPU execution used macOS arm64, Python 3.12.14, PyTorch 2.14.1, ASE 3.29.0 and pymatgen 2026.10.24. CUDA, XPU, other operating systems and the full accelerator training matrix remain unrun. The atomate2 report in #240 requires a separate reproducer.