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

Ugly RuntimeWarning in bose_factor #253

Open
rebeccafair opened this issue Nov 2, 2022 · 0 comments
Open

Ugly RuntimeWarning in bose_factor #253

rebeccafair opened this issue Nov 2, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@rebeccafair
Copy link
Member

rebeccafair commented Nov 2, 2022

Sometimes on this line in StructureFactor._bose_factor:

bose = 1/(np.exp(np.absolute(self._frequencies)/(kB*temp)) - 1)

RuntimeWarning: overflow encountered in exp is triggered.

This happens if the temperature is low and mode frequencies are high, I encountered this with an Ammonium Sulphate calculation that I have (mode frequencies up to 425 meV) and a temperature of 5K, but you can reproduce this with any material if you set the temperature to a silly small value.

I don't think we need to change the result (we get an infinite exponential and then bose = 0 which is what we want), but when using euphonic-powder-map it screws with the progress bar so we may want to hide this warning sometimes.

@rebeccafair rebeccafair added the good first issue Good for newcomers label Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant