Open dgarayr opened 2 years ago
When refactoring this part of the code I didn't track all constants back to the Sackur–Tetrode equation for the translational entropy, mainly because the code was using a mix of CGS and SI units (now we use a mix of Hartree and SI units). The leftover inline constants were numbered with the intent to resolve at some point in the future.
Translating everything to Hartree units and using meaningful variable names would of course be useful.
Contributions are of course welcome, xtb
is an open source project after all.
Checking thermochemical calculations from xTB, I find the way in which translational entropy is calculated a bit weird (although results are right). The expression in the thermodyn subroutine from thermo.f90 for s_tr involves a simplified expression including two hard-coded values named magic4 and magic5.
There is no direct reference to the source of these values, although they can be traced to an equation presented by Stewart and Tseng, J. Am. Chem. Soc. 1971, 93, 5, 1273, which was derived from the Sackur-Tetrode equation as presented in S. Glasstone, “Theoretical Chemistry”, 1944. Following the original text, it is found that the simplified equation is reached by rearranging constants, changing the logarithms to base 10, and converting P to atm and R to cal mol-1 K-1. Although the expression is correct and thus the obtained values are valid, it is quite confusing to encounter this quite old and non-referenced expression for the translational entropy when the rest of magnitudes in the subroutine, including the own translational partition function, are computed directly from physical constants using common expressions for statistical thermodynamics.
Moreover, the employed expression drops the pressure dependence of translational entropy, assuming P = 1 to cancel the logarithm. I could not find the pressure reference state used by xTB for thermochemical calculations neither in the module nor in the documentation, so it might be stated more explicitly at some point, maybe even in the output together with the temperature. Going a bit beyond this, I think the ideal feature would be to allow the user to change the pressure reference state as it is done with temperature, like in other codes such as Gaussian or ADF.