Calculation of elastic constants using isothermal molecular dynamics.