Skip to content

Add optional check for imaginary modes in PhononCalc/QHACalc and return the frequencies#156

Closed
Andrew-S-Rosen wants to merge 18 commits intomaterialyzeai:mainfrom
Andrew-S-Rosen:image
Closed

Add optional check for imaginary modes in PhononCalc/QHACalc and return the frequencies#156
Andrew-S-Rosen wants to merge 18 commits intomaterialyzeai:mainfrom
Andrew-S-Rosen:image

Conversation

@Andrew-S-Rosen
Copy link
Copy Markdown
Contributor

@Andrew-S-Rosen Andrew-S-Rosen commented Mar 5, 2026

Summary

This is an updated attempt to check for imaginary modes. Supersedes #131.

The PR adds a new keyword argument imaginary_freq_tol to PhononCalc and QHACalc. If there are any imaginary frequencies with a magnitude greater than imaginary_freq_tol, an error will be raised. For PhononCalc and QHACalc, imaginary_freq_tol=None by default. The frequencies are also now returned when running PhononCalc and thereby closes #138.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@Andrew-S-Rosen Andrew-S-Rosen marked this pull request as draft March 5, 2026 20:34
@Andrew-S-Rosen Andrew-S-Rosen marked this pull request as ready for review March 5, 2026 22:11
@Andrew-S-Rosen
Copy link
Copy Markdown
Contributor Author

@rul048: I am getting test failures in CI that look unrelated. I'm not quite sure what is going wrong with loading the TensorNet model. But these tests seem to pass locally for me. Please let me know if you suggest any changes. This PR is ready for review.

@Andrew-S-Rosen Andrew-S-Rosen changed the title [WIP] Add check for imaginary modes in PhononCalc Add check for imaginary modes in PhononCalc Mar 5, 2026
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add check for imaginary modes in PhononCalc Add check for imaginary modes in PhononCalc and QHACalc Mar 5, 2026
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add check for imaginary modes in PhononCalc and QHACalc Add optional check for imaginary modes in PhononCalc and QHACalc Mar 6, 2026
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add optional check for imaginary modes in PhononCalc and QHACalc Add optional check for imaginary modes in PhononCalc/QHACalc and return the frequencies Mar 7, 2026
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen
Copy link
Copy Markdown
Contributor Author

Moved into #159 to prevent merge conflicts.

@Andrew-S-Rosen Andrew-S-Rosen deleted the image branch March 8, 2026 05:27
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.

[Feature Request]: Return frequencies in phonon calculations

1 participant