# Extending Simulaton

**URL:** <https://gromacs.bioexcel.eu/t/extending-simulaton/8930>\
**Category:** User discussions\
**Tags:** mdp-parameters, grompp, mdrun\
**Created:** [April 19, 2024, 11:45am UTC](https://gromacs.bioexcel.eu/t/extending-simulaton/8930 "2024-04-19T11:45:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yabiasal](https://avatars.discourse-cdn.com/v4/letter/y/dec6dc/32.png) [@yabiasal](https://gromacs.bioexcel.eu/u/yabiasal)\
**Post date:** [April 19, 2024, 11:45am UTC](https://gromacs.bioexcel.eu/t/extending-simulaton/8930/1 "2024-04-19T11:45:36Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
I have simulated 1 microseconds of a protein and now I wold like to extend it. This is how I did simulation:  
First, in the md.mdp file I set nsteps to 50000000 and dt 0.002 picosendos (simulating 100 nanoseconds in each run). Then I wrote the code to execute mdrun for 100 nanoseconds. When the 100ns was completes, I extended it using convert-tpr. For example, the code for extending simulation from 900ns to 1000ns would be as shown below:

```auto
###Extend Simulation
gmx convert-tpr -s md_900.tpr -extend 100000 -o md_1000.tpr
###Run
mpirun mdrun_mpi -deffnm md_1000 -s md_1000.tpr -cpi md_900.cpt -noappend

```

Now I want to extend the simulation another 1 microseconds but I want to do it in a different way because this approach wastes a lot of time queuing to run.  
I want to use nsteps -1 in the mdp file and then run this code

```auto
###Run
mpirun mdrun_mpi -deffnm md_1000 -s md_1000.tpr -cpi md_900.cpt -noappend -maxh 71.9

```

By doing this, I will make sure to end the simulation before it gets killed exceeding the 72 hour allocation time. However, I do not know how to extend the tpr file and what to use instead of md\_1000.tpr in the code above.  
Any help is so much appreciated  
Thanks!

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [April 19, 2024, 9:17pm UTC](https://gromacs.bioexcel.eu/t/extending-simulaton/8930/2 "2024-04-19T21:17:41Z")

</div>

make a tpr for higher time, lets say 10 microsecond and extend after very 72 hrs using -cpi flag

---

<div class="post-metadata">

**Author:** ![Carsten](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Carsten](https://gromacs.bioexcel.eu/u/Carsten)\
**Post date:** [April 23, 2024, 8:53am UTC](https://gromacs.bioexcel.eu/t/extending-simulaton/8930/3 "2024-04-23T08:53:18Z")

</div>

Hi!

Although deprecated, you can still pass the `-nsteps -1` flag to `gmx mdrun` for now. This is the easiest way to keep your `.tpr` running forever without having to recreate it by putting `nsteps = -1` in the `.mdp` file.
