Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default create_thermal_displacements to False in VASP and forcefield PhononMaker #647

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

janosh
Copy link
Member

@janosh janosh commented Dec 11, 2023

Motivation: Most people likely won't use the thermal_displacement_matrix resulting from create_thermal_displacements=True but having it on can cause the calculation to fail due to this line in phonopy's _get_disp_matrices

assert (abs(disps.imag) < 1e-1).all()

This change was discussed with @JaGeo but pinging her for final approval.

Full stack trace

INFO:jobflow.managers.local:generate_frequencies_eigenvectors failed with exception:
Traceback (most recent call last):
  File "/Users/janosh/dev/jobflow/src/jobflow/managers/local.py", line 106, in _run_job
    response = job.run(store=store)
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/janosh/dev/jobflow/src/jobflow/core/job.py", line 584, in run
    response = function(*self.function_args, **self.function_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/janosh/dev/atomate2/src/atomate2/common/jobs/phonons.py", line 232, in generate_frequencies_eigenvectors
    return PhononBSDOSDoc.from_forces_born(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/janosh/dev/atomate2/src/atomate2/common/schemas/phonons.py", line 397, in from_forces_born
    phonon.run_thermal_displacement_matrices(
  File "/Users/janosh/.venv/py311/lib/python3.11/site-packages/phonopy/api_phonopy.py", line 2927, in run_thermal_displacement_matrices
    tdm.run()
  File "/Users/janosh/.venv/py311/lib/python3.11/site-packages/phonopy/phonon/thermal_displacement.py", line 359, in run
    self._get_disp_matrices()
  File "/Users/janosh/.venv/py311/lib/python3.11/site-packages/phonopy/phonon/thermal_displacement.py", line 404, in _get_disp_matrices
    assert (abs(disps.imag) < 1e-10).all()

@janosh janosh added ux User experience breaking Breaking changes phonon Phonon workflow related labels Dec 11, 2023
@JaGeo
Copy link
Member

JaGeo commented Dec 11, 2023

@janosh , agreed. The default should be false! Thanks for tackling this!

@janosh janosh merged commit 2c23435 into main Dec 11, 2023
6 checks passed
@janosh janosh deleted the create_thermal_displacements-default-false branch December 11, 2023 21:19
@utf utf added the fix Bug fix PR label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking changes fix Bug fix PR phonon Phonon workflow related ux User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants