Calculation of Delta H, q, and w