mercredi 8 mai 2019

OverflowError: (34, 'Result too large') calculate e^-(b*dE)

I want to calculate boltzmann distribution which is e^-(b*dE). b is 1/kT where k is boltzmann constant and T is temperature. dE is delta energy.

I use from scipy.constants import k to get the value of k and import math to get the value of e. dE and T are integer.

Is there any library that can import to get the value of e^-(b*dE) easily?




Aucun commentaire:

Enregistrer un commentaire