Skip to content

Conversation

@Andrew-S-Rosen
Copy link
Contributor

@Andrew-S-Rosen Andrew-S-Rosen commented Dec 23, 2025

If a user wants to calculate thermochemistry, it must be done on a minimum energy structure otherwise it is not valid. Currently, there is no mechanism for the user to confirm the results are sensible. I have added a keyword argument imag_mode_threshold: float | None = None that will raise a RuntimError if there are imaginary modes below the user-provided threshold.

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

…tions

If a user wants to calculate thermochemistry, it must be done on a minimum energy structure otherwise it is not valid. Currently, there is no mechanism for the user to confirm the results are sensible. I have added a keyword argument `imag_mode_threshold: float | None = None` that will raise a `ValueError` if there are imaginary modes with magnitude greater than `imag_mode_threshold`.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add option to check if imaginary modes exist in phonon or QHA calcula… Add option to check if imaginary modes exist in phonon or QHA calculations Dec 23, 2025
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add option to check if imaginary modes exist in phonon or QHA calculations Add option to check if imaginary modes exist in phonopy/QHA calculations Dec 23, 2025
pre-commit-ci bot and others added 10 commits December 23, 2025 01:15
Fix typo in parameter documentation for imag_mode_threshold.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
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 option to check if imaginary modes exist in phonopy/QHA calculations Add option to check if imaginary modes exist in phonopy/QHA calculations to ensure valid thermochemistry Dec 23, 2025
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add option to check if imaginary modes exist in phonopy/QHA calculations to ensure valid thermochemistry Add option to check if imaginary modes exist in phonon/QHA calculations to ensure valid thermochemistry Dec 23, 2025
Updated force assertion to use absolute tolerance.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
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