microscopic calculation of pressure