Skip to content

[codex] Fix QE matdyn frequency token parsing - #109

Merged
singularitti merged 2 commits into
masterfrom
#86
Jun 20, 2026
Merged

singularitti merged 2 commits into
masterfrom
#86

Conversation

@singularitti

Copy link
Copy Markdown
Member

Summary

Fixes #86 by parsing QE matdyn.x frequency rows as numeric tokens instead of splitting on whitespace and adjacent minus signs.

Root Cause

The previous parser used re.split(r"\s+|(?<!\s)(?=-)", line) to handle merged negative frequencies such as -2471.6424-2400.9590. That delimiter-based approach can split valid scientific notation at exponent signs, for example 1.0000E-03.

Changes

  • Add a numeric token regex for frequency-line parsing.
  • Replace delimiter splitting in FromQEOutput.read_frequency_file with number extraction.
  • Add regression tests for merged negative frequencies and exponent signs.

Validation

  • uv run python -m unittest tests.test_input_maker

@singularitti
singularitti marked this pull request as ready for review June 20, 2026 00:48
@singularitti
singularitti merged commit 8f011f4 into master Jun 20, 2026
0 of 24 checks passed
@singularitti
singularitti deleted the #86 branch June 20, 2026 00:49
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.

Split numbers when reading QE's matdyn output

1 participant