Fix temperature calculation when there are no atoms in the model

[#60065162]

Just return 0.