# \-trestart (default 10 ps) must be divisible by -dt for useful results?

**URL:** <https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345>\
**Category:** User discussions\
**Created:** [October 15, 2024, 1:58pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345 "2024-10-15T13:58:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 15, 2024, 1:58pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/1 "2024-10-15T13:58:40Z")

</div>

GROMACS version: 2024

Dear Gromacs Users:

When I run `gmx msd` I face this error. I can not understand what it says.

```auto
Program: gmx msd, version 2024.3
Source file: src/gromacs/trajectoryanalysis/modules/msd.cpp (line 683)
Function: virtual void gmx::analysismodules::Msd::analyzeFrame(int, const t_trxframe&, t_pbc*, gmx::TrajectoryAnalysisModuleData*)

Inconsistency in user input:
-trestart (default 10 ps) must be divisible by -dt for useful results.

For more information and tips for troubleshooting, please check the GROMACS
website at https://manual.gromacs.org/current/user-guide/run-time-errors.html

```

Could you please help me with that? I think this is just for the 2024 version because I did not face this error in previous versions.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [October 15, 2024, 2:24pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/2 "2024-10-15T14:24:56Z")

</div>

Yes, this check ([gmx msd: throw error if -trestart is not divisible by -dt and moved check for dt\_ \> trestart (!4259) · Merge requests · GROMACS / GROMACS · GitLab](https://gitlab.com/gromacs/gromacs/-/merge_requests/4259)) was introduced in 2024.2 to fix this bug ([Unexpected results for MSD, for various -dt (#5051) · Issues · GROMACS / GROMACS · GitLab](https://gitlab.com/gromacs/gromacs/-/issues/5051)).

Do you specify `-dt`? To what? What is the interval between the frames in your trajectory file?

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 15, 2024, 2:37pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/3 "2024-10-15T14:37:28Z")

</div>

Dear MagnusL,

Thanks for your reply. This a part of is my .mdp file.

```auto
; Run parameters
integrator = md ; leap-frog integrator
nsteps = 60000000     
dt = 0.0005     
; Output control
nstxout = 5000 ; save coordinates every - ps
nstvout = 5000 ; save velocities every - ps
nstenergy = 5000 ; save energies every - ps
nstlog = 5000 ; update log file every - ps

```

Actually, I don’t know how to specify -dt. I know it should be in gmx msd command but I don’t know how to specify the number.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [October 15, 2024, 2:52pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/4 "2024-10-15T14:52:48Z")

</div>

Then it seems like you are suffering from [gmx msd crashes when trajectory was saved too often (#4694) · Issues · GROMACS / GROMACS · GitLab](https://gitlab.com/gromacs/gromacs/-/issues/4694), which will be fixed (possibly in GROMACS 2025) by [Allow femtosecond level trajectories to be analyzed in gmx-msd (!4428) · Merge requests · GROMACS / GROMACS · GitLab](https://gitlab.com/gromacs/gromacs/-/merge_requests/4428), but it has not been merged yet.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [October 15, 2024, 2:53pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/5 "2024-10-15T14:53:52Z")

</div>

At a closer thought, it should not be that bug. Sorry. I’ll see if I can understand what’s the problem.

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 15, 2024, 3:00pm UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/6 "2024-10-15T15:00:52Z")

</div>

Thank you very much.

For this .mdp file :

```auto
; Run parameters
integrator = md       
nsteps = 60000000 
dt = 0.001    
; Output control
nstxout = 20000    
nstvout = 20000    
nstenergy = 20000    
nstlog = 20000    

```

I used this command:  
`gmx msd -f nvt5.xtc -s nvt5.tpr -o msd.xvg -trestart 20`

And, It is worked. But, I have no reason for the selection of `-trestart 20` . :-))

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [October 16, 2024, 5:55am UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/7 "2024-10-16T05:55:08Z")

</div>

In the last case it worked because `-trestart` must be divisible by `-dt` (or the time between frames. In that case you write every 20 ps, so `-trestart` cannot be \< 20.

---

<div class="post-metadata">

**Author:** ![mj.rezayani](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mj.rezayani/32/3918_2.png) [@mj.rezayani](https://gromacs.bioexcel.eu/u/mj.rezayani)\
**Post date:** [October 16, 2024, 10:28am UTC](https://gromacs.bioexcel.eu/t/trestart-default-10-ps-must-be-divisible-by-dt-for-useful-results/10345/8 "2024-10-16T10:28:44Z")

</div>

Dear MagnusL

Thanks
