<div>Hi, all,</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; Actually I think others have also noticed this &quot;bug&quot;: g_energy often generate incorrect heat capacity.&nbsp; When I checked the source code of gmx_energy.c, I found the calculation of heat capacity is only related with the fluctuation of temperature, which is actually the algorithm for NVE ensemble only (refer to Allen &amp; Tildesley, Computer simulation of liquids, pp. 53, eqn. 2.82). For other ensembles, e.g. NVT ensemble, the heat capacity&nbsp;should be&nbsp;related with the fluctuation of energies.</div>

<div>&nbsp;&nbsp;&nbsp;&nbsp; Another problem: even with the energy fluctuation algorithm for the heat capacity, I found it is not easy to get an convergent value. The most important factor is that the fluctuations are sensitively related with the temperature (pressure) coupling time constants for NVT (NPT) ensembles.</div>

<div>I wonder if anyone can help me resolving this problem? Thanks a lot!</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>&nbsp;</div>
<div>zgzhang</div>