Skip to content

Use fixed lattice references for SED and skip coordinate reads - #106

Merged
Tingliangstu merged 1 commit into
codex/pysed-3.0-architecturefrom
codex/pysed-fixed-lattice-reference
Nov 9, 2026
Merged

Tingliangstu merged 1 commit into
codex/pysed-3.0-architecturefrom
codex/pysed-fixed-lattice-reference

Conversation

@Tingliangstu

Copy link
Copy Markdown
Collaborator

SED previously averaged reference-atom coordinates separately in every block. This change builds one periodic reference lattice from the production cell and the cell numbering in basis.in, and reuses it for all blocks. It removes the dependence of the spatial phase on block-averaged coordinates.

Changes

  • Keep the four-column basis.in format and the generator's cell order (i, then j, with k changing fastest). Ordinary repeats use the existing row-wise division; positive-diagonal upper/lower triangular repeats recover primitive vectors with solve(P, cell).
  • Use the production trajectory cell for whole-system calculations and the supplied dump_group_supercell for local groups. Document the numbering rule, NPT-to-production geometry, and local-group example.
  • Load only velocities and cells during SED calculation. GPUMD/LAMMPS direct readers skip coordinate columns; NetCDF conversion still stores the full trajectory and existing compatible caches remain reusable.
  • Clarify the block-duration variable and retain the reviewed console layout and diagnostic messages. The projection/FFT kernel, mass weighting, normalization formula, and frequency folding are unchanged.

Validation

  • WSL CPU suite, limited to one CPU and one BLAS thread: 142 passed, 402 subtests passed. The optional real-CUDA test was excluded.
  • Tests cover ordinary/triclinic geometry, production-cell reconstruction, upper/lower triangular phases and total/partial SED, the Ni/diamond local-cell geometry, cache/direct-reading parity, and cache preservation.
  • Sphinx HTML build passed with warnings treated as errors, using a temporary documentation copy.
  • Source comparison confirmed that the numerical kernel and frequency folding are unchanged; normalization only renames the duration argument. git diff --check passed.

External generators must use the documented spatial numbering; four columns cannot identify arbitrary spatial permutations. Local-group production geometry must be supplied explicitly. This fixed-site SED is not an instantaneous-position analysis of diffusing ions.

Only source, documentation, and tests are included; no trajectory data, calculation outputs, or generated plots are added.

@Tingliangstu
Tingliangstu merged commit f25cc5d into codex/pysed-3.0-architecture Nov 9, 2026
10 of 16 checks passed
@Tingliangstu
Tingliangstu deleted the codex/pysed-fixed-lattice-reference branch November 9, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant