neutrons / multiphonon

multiphonon (getDOS)
MIT License
3 stars 5 forks source link

Add a function to calculate thermal factor (u2) from a dos #161

Open granrothge opened 1 week ago

granrothge commented 1 week ago

As a diagonostic it would be nice to calculate u^2 in addition to the 2W that is currently calculated. essentially 2W =u^2Q^2

u^2 has the advantage of being Q independent.

I would like an additional function added to src/multiphonon/forward/phonon.py

I think the function would be

def usqcalc(E,dE,g,beta,M): g0 = gamma0(E, g, beta, dE) return g0 J2meV (h_b / A2m) * 2.0 / 2.0 / (M amu)