Repository navigation
fix(vasp): recover NWRITE = 2 symmetry on 2D meshes, conjugate subgroups and SYMPREC (#83) - #94
Merged
Merged
Conversation
…ups and SYMPREC (#83) An OUTCAR without an operator table now yields VASP's operations in three states where pyprocar raised the NWRITE = 3 / ISYM = -1 error: - Orbits follow VASP's IBZKPT (mkpoints.F): test points are the mesh, plus their images under the lattice's operations only when all of those keep the mesh's lattice, and an orbit counts the images that are test points. VASP's own S_6 table failed the old rule on a 61x61x1 mesh. - When conjugate subgroups all fit, the initial magnetic moments (MAGMOM, VASP's default, turned from the SAXIS frame) pick VASP's group. - spglib runs at the SYMPREC the INCAR echo sets. Tested against the operator tables of 9 VASP 6.5.0 runs and 2 fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 tasks
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.
film.mp4
Why
VASP's default NWRITE = 2 prints no operator table. pyprocar then recovers the operations by fitting subgroups of the crystal's point group to what the OUTCAR states. In three cases the fit found no single answer and raised "rerun VASP with NWRITE = 3". The non-collinear
fermi2Dpath from user report #23 hit this with default settings. Closes #83.What changed
mkpoints.Fin the VASP 6.5.0 source). An operation that does not keep the mesh's lattice still pairs the mesh points it maps onto the mesh. VASP's own S_6 table failed the old test on the 61x61x1 fixture.get_magnetic_symmetryfinds those operations.How it works
flowchart TD A[OUTCAR without operator table] --> B[spglib crystal operations at the INCAR SYMPREC] B --> C[subgroups with VASP's point group and operation count] C --> D{orbits cut to VASP's test points match the irreducible k-points?} D -->|exactly one fits| F[those operations] D -->|several fit| E[keep the subgroup whose operations keep the initial moments] E -->|exactly one left| F E -->|none or several| G[raise: rerun with NWRITE = 3 or ISYM = -1] D -->|none fits| GScope
Tradeoffs
data/.Blast Radius
The change reaches
Outcar.rotations, whichVaspParser.ebsuses to unfold symmetry-reduced meshes (fermi2D,fermi3D, mesh band structures). A wrong tie-break would unfold a mesh with the wrong group without notice. It can only choose among subgroups that already fit every stated fact. VASP's group is the set of crystal operations that keep the moments, so a correct MAGMOM leaves exactly that group.Verification
VASP's printed tables are recovered. I ran 9 VASP 6.5.0 spin-orbit runs with NWRITE = 3. Each varies MAGMOM, SAXIS or SYMPREC (CsCl-type and zinc-blende InP). I stripped each table and compared the recovery with the printed one. Head 22e8cae recovers 10 of 10 tables, the 9 runs and the 61x61x1 fixture. Main recovers 4 of 10.
fermi2d/non-colinear, 61x61x1Each fix carries a case. The orbit rule takes default MAGMOM from 0 fits to 4. The moments take 4 or 2 fits down to VASP's one. Reading SYMPREC takes the T_d case from 0 fits to 1.
fermi2Dworks on default VASP output. I ranpyprocar.fermi2D(code="vasp", mode="plain")andmode="spin_texture"on a copy offermi2d/non-colinearwith the table stripped. On main, both raise. On head, both draw. The PNGs are byte-identical to the ones made with the printed table.Gates. These passed on head:
ruff_new_violations.py checkandformat, andruff --select F821,F822,F823,NPY201.ty_baseline.pywith ty 0.0.92: 0 new, 0 stale.pytest -m "not data": 3580 passed. The 7test_ty_baseline.pytests failed only because the shared env has noty. With ty 0.0.92 on PATH they pass.pytest -m data: 484 passed.red_green.py origin/main: ok. The new tests fail on main. The one guard test is marked.Not verified
is_axial=False.Created with Claude Opus 5.5 in T3 Code, with Claude Opus 5.5 review subagents.