# [gmx-users] Calculate heat capacity

David spoel at xray.bmc.uu.se
Wed Mar 17 08:44:00 CET 2004

```On Wed, 2004-03-17 at 07:36, Ilya Chorny wrote:
> I'm not sure what gromacs does to calc Cv. I get a different reult as
> well.

You have to give the number of molecules in order to get the energy per
mole. Option -nmol IIRC.
>
> Ilya
>
>         -----Original Message-----
>         [mailto:gmx-users-admin at gromacs.org]On Behalf Of Jia-Lin Lo
>         Sent: Tuesday, March 16, 2004 9:53 PM
>         To: gmx-users at gromacs.org
>         Subject: Re: [gmx-users] Calculate heat capacity
>
>
>         Hi,
>              I use your algorithm to test.  The value is much
>         different from
>         g_energy's result.
>                Your algorithm: ~10^5(KJ/mole * K)
>                g_energy : ~ 10( J/mole * K)
>         I take a look  about gmx  source code. There is one paraghaph
>         heat capacity.
>
>         VarT = RMSD(T) * RMSD(T),  kb = 8.31451
>         factor = nmol*ndf*VarT/(3.0*Temp*Temp)
>         nmol = 1, ndf = 3
>         Cv = kb / (2/3 - factor)
>
>         It seems has no relationship with energy.  I am confused.
>
>         Jia-lin
>
>                 ----- Original Message -----
>                 From: Ilya Chorny
>                 To: gmx-users at gromacs.org
>                 Sent: Wednesday, March 17, 2004 12:00 PM
>                 Subject: RE: [gmx-users] Calculate heat capacity
>
>                 The heat capacity is proportional to the second moment
>                 (variance) of the energy.
>                 <sigma(E)^2> = k*T^2*Cv
>
>                 Ilya
>
>                         -----Original Message-----
>                         Of Jia-Lin Lo
>                         Sent: Tuesday, March 16, 2004 6:59 PM
>                         To: gmx-users at gromacs.org
>                         Subject: [gmx-users] Calculate heat capacity
>
>
>                         Hi,
>                              I am doing a simple simulation ( protein
>                         in water). When I use
>                         g_energy to monitor the  energy change, there
>                         are several statistical values
>                         printed on screen. I notice the last line is
>                         the heat capacity value. I would
>                         like to know how does it to be calculated?  Is
>                         there any formula for it ?
>                         I want to write a program to calculate it by
>                         myself.
>
>                         Jialin LO
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

```