# Start a new simulation from a previous state and coordinates

**URL:** <https://gromacs.bioexcel.eu/t/start-a-new-simulation-from-a-previous-state-and-coordinates/6340>\
**Category:** User discussions\
**Tags:** cpt-file\
**Created:** [May 4, 2023, 3:35pm UTC](https://gromacs.bioexcel.eu/t/start-a-new-simulation-from-a-previous-state-and-coordinates/6340 "2023-05-04T15:35:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pipitoludovico](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pipitoludovico](https://gromacs.bioexcel.eu/u/pipitoludovico)\
**Post date:** [May 4, 2023, 3:35pm UTC](https://gromacs.bioexcel.eu/t/start-a-new-simulation-from-a-previous-state-and-coordinates/6340/1 "2023-05-04T15:35:45Z")

</div>

GROMACS version:2022.4  
GROMACS modification: No  
Here post your question  
Good afternoon,  
I would like to start a brand new simulation using the last coordinates from a previous run as a starting point.

I don’t understand the difference between:  
`gmx grompp -f new_run.mdp -c previous.gro -t previous.cpt -p topol.top -o new_tpr.tpr`  
(which explicitly refers to the last generated .gro and .cpt)

and  
`gmx convert-tpr -s previous.tpr extend 200 -o new.tpr`  
(which uses the last generated .tpr, extending the duration).

Say I want to start a brand new simulation from the last checkpoint/frame, which one should I use?  
Given that every time I reassign velocities (as specified in the .mdp) I don’t understand which command I should use.

It seems that -extend increases the duration of a simulation, maintaining all the data from the previous one (being a continuation) while creating the tpr from “scratch” every time might what I am looking for, but I’d rather ask more experienced users.

Thanks!

---

<div class="post-metadata">

**Author:** ![blablablablablablab](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@blablablablablablab](https://gromacs.bioexcel.eu/u/blablablablablablab)\
**Post date:** [May 4, 2023, 7:33pm UTC](https://gromacs.bioexcel.eu/t/start-a-new-simulation-from-a-previous-state-and-coordinates/6340/2 "2023-05-04T19:33:06Z")

</div>

But after you have the new extended tpr, you have to start the simulation with that tpr and the last checkpoint file using mdrun.  
I think the first one should be used when you are using a new mdp file with some parameter change, but still want to do a continuation. In case of the convert tpr , you are using the same parameters from the old mdp and just extending the simulation time.  
Based on your requirements: Given that you probably have gen vel on in the mdp, I think you should re grompp everytime you restart a simulation.

---

<div class="post-metadata">

**Author:** ![pipitoludovico](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pipitoludovico](https://gromacs.bioexcel.eu/u/pipitoludovico)\
**Post date:** [May 4, 2023, 8:25pm UTC](https://gromacs.bioexcel.eu/t/start-a-new-simulation-from-a-previous-state-and-coordinates/6340/3 "2023-05-04T20:25:55Z")

</div>

Thank you, I just was not sure about what to do!
