# [gmx-users] inconsistency in obtained temperature values by traj and g_energy tools

Justin Lemkul jalemkul at vt.edu
Mon Jul 14 13:52:56 CEST 2014

```
On 7/13/14, 8:41 PM, Rasoul Nasiri wrote:
> On Mon, Jul 14, 2014 at 1:02 AM, Justin Lemkul <jalemkul at vt.edu> wrote:
>
>>
>>
>> On 7/13/14, 7:11 PM, Rasoul Nasiri wrote:
>>
>>> On Sun, Jul 13, 2014 at 2:27 AM, Justin Lemkul <jalemkul at vt.edu> wrote:
>>>
>>>
>>>>
>>>> On 7/12/14, 7:25 AM, Rasoul Nasiri wrote:
>>>>
>>>>   On Sat, Jul 12, 2014 at 12:17 PM, Tsjerk Wassenaar <tsjerkw at gmail.com>
>>>>> wrote:
>>>>>
>>>>>    Note that two constrained atoms correspond to one constraint.
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> C12H26
>>>>>
>>>>> 26 constrained atoms due to hydrogens which have been connected to
>>>>> carbon
>>>>> atoms.
>>>>>
>>>>> Number of molecules 2550 therefore  66300 will be total constrained
>>>>> atoms
>>>>> in cell.
>>>>>
>>>>>
>>>>>   Note that grompp makes your life easy by printing out the corrected
>>>> number
>>>> of degrees of freedom.  It should be 3N - 0.5*N_constraints.
>>>>
>>>>
>>>>
>>>>   Based on grompp_d:
>>>
>>> Number of degrees of freedom in T-Coupling group System is 196338.00
>>>
>>> 3N-0.5*N_constrants = 196338
>>>
>>> N= 96900
>>> ===.> N_constraints =188706
>>>
>>> T(corrected) = T(g_traj)*N_atoms/(N_atoms-N_constraints)
>>>
>>> T(g_traj) = 269 K
>>> N_atoms = 96900
>>>
>>> ==> T(corrected) = -262 which is unphysical value.
>>>
>>> any other suggestions/solutions?
>>>
>>> Note that the desired temperature is 400 K.
>>>
>>>
>> You're doing the calculation wrong.
>>
>> Number of degrees of freedom that g_traj assumes: 96900 * 3 = 290700
>>
>
> I think translational modes should be reduced, having said this for N total
> atoms with fixed mumentum into the cell (290700-3) must be more accurate.
>

g_traj has no knowledge of COM treatment, periodicity, etc, so such an operation
is not necessary (not that it makes any difference in this case).  If anything,
the degrees of freedom associated with translational and/or rotational motion
have been corrected by grompp, so the manipulation would lie in the denominator,
but if using the quantity printed by grompp, you don't need any further subtraction.

-Justin

--
==================================================

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 601
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==================================================
```