You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently developing my research topic on phase transitions based on the SSCHA 2026 school tutorials (namely Lecture2 and Hands-on-session2). But when I performed the CONFIGS convergence test, the job terminated with the following warning:
RuntimeWarning: invalid value encountered in sqrt a[:] = np.sqrt(1.0 / (2.0 * w))
I suspect that minimizer.run() generated imaginary phonon frequencies, which caused the calculation to fail.
To investigate this, I debugged the script and confirmed that imaginary frequencies were indeed present after minimizer.run() by adding w_check, _ = minimizer.dyn.DiagonalizeSupercell() if np.any(w_check <= 0): print(f"[Warning] {nconf} configs has negative frequencies: {w_check[w_check<=0]}") # Save the refined auxiliary dynamical matrix refined_prefix = os.path.join(OUTPUT_DIR, f"refined_dyn_{nconf}_") minimizer.dyn.save_qe(refined_prefix)
I tried to explicitly force the use of minimizer.dyn.ForcePositiveDefinite() and minimizer.dyn.Symmetrize() after the minimizer.run() and run the script again, but nothing changed.
Why is this happening? I expected ForcePositiveDefinite() to eliminate the imaginary modes. Is there something I might be missing, or is there a recommended way to resolve this issue? Any suggestions would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am currently developing my research topic on phase transitions based on the SSCHA 2026 school tutorials (namely Lecture2 and Hands-on-session2). But when I performed the CONFIGS convergence test, the job terminated with the following warning:
RuntimeWarning: invalid value encountered in sqrt a[:] = np.sqrt(1.0 / (2.0 * w))I suspect that minimizer.run() generated imaginary phonon frequencies, which caused the calculation to fail.
To investigate this, I debugged the script and confirmed that imaginary frequencies were indeed present after minimizer.run() by adding
w_check, _ = minimizer.dyn.DiagonalizeSupercell() if np.any(w_check <= 0): print(f"[Warning] {nconf} configs has negative frequencies: {w_check[w_check<=0]}") # Save the refined auxiliary dynamical matrix refined_prefix = os.path.join(OUTPUT_DIR, f"refined_dyn_{nconf}_") minimizer.dyn.save_qe(refined_prefix)I tried to explicitly force the use of
minimizer.dyn.ForcePositiveDefinite()andminimizer.dyn.Symmetrize()after theminimizer.run()and run the script again, but nothing changed.Why is this happening? I expected ForcePositiveDefinite() to eliminate the imaginary modes. Is there something I might be missing, or is there a recommended way to resolve this issue? Any suggestions would be greatly appreciated.
I have uploaded the script 6_hessian_converg_nconf.py for your reference.
I look forward to any comments or suggestions. Thank you in advance for your help again.
Jianguo Si
DIMST, CAS
Beta Was this translation helpful? Give feedback.
All reactions