# Choose only one of gen-vel and continuation

**URL:** <https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329>\
**Category:** User discussions\
**Created:** [December 24, 2020, 2:30pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329 "2020-12-24T14:30:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://gromacs.bioexcel.eu/u/sam)\
**Post date:** [December 24, 2020, 2:30pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/1 "2020-12-24T14:30:58Z")

</div>

GROMACS version:2020.4  
i got

> ERROR 1 [file nvt.mdp]:  
> Generating velocities is inconsistent with attempting to continue a  
> previous run. Choose only one of gen-vel = yes and continuation = yes.

when I used

> gmx grompp -f nvt.mdp -c npt.gro -r npt.gro -t npt.cpt -p topol.top -o nvt.tpr

---

<div class="post-metadata">

**Author:** ![Masrul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/masrul/32/234_2.png) [@Masrul](https://gromacs.bioexcel.eu/u/Masrul)\
**Post date:** [December 24, 2020, 8:04pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/2 "2020-12-24T20:04:54Z")

</div>

**Continuation=yes** and **gen-val=yes** are conflicting! As **gen-vel=yes** will assign velocities to particles randomly with Maxwell distribution for given temperature, while **continution=yes** asks to use previous setup (which includes velocities as well). For first molecular dynamics run (NVT relaxation) use ( **continution=no** and **gen-vel=yes**. After that use **continution=yes** and **gen-vel=no**.

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://gromacs.bioexcel.eu/u/sam)\
**Post date:** [December 25, 2020, 1:11pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/3 "2020-12-25T13:11:23Z")

</div>

thanks but Actually I am going to do nvt remd simulation (300-600)K so I started with npt equilibration then followed by nvt equilibration at 600 K which I need the output structure as the initial structure for the nvt remd simulation. So how can I use velocity gen in this case?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 29, 2020, 2:40am UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/4 "2020-12-29T02:40:38Z")

</div>

The only time velocities are generated is immediately after energy minimization. You should preserve the velocities from the previous step by supplying the `.cpt` file from the end of your NPT equilibration run to `grompp -t` when preparing the new `.tpr` file. Re-generating velocities randomizes the system, rendering any previous equilibration meaningless.

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://gromacs.bioexcel.eu/u/sam)\
**Post date:** [December 29, 2020, 8:47am UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/5 "2020-12-29T08:47:33Z")

</div>

thanks for replying … excuse me Can I add it in npt as it always exists in nvt ?  
So is there is no issue for using velocity generators with npt followed by nvt equilibration ?

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 29, 2020, 1:43pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/6 "2020-12-29T13:43:58Z")

</div>

I suggest you work through some simple tutorials to understand normal workflows and what the purpose of velocity generation is. Again, you should only ever generate velocities at the outset of the first stage of equilibration, regardless of what the ensemble is.

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://gromacs.bioexcel.eu/u/sam)\
**Post date:** [December 29, 2020, 11:16pm UTC](https://gromacs.bioexcel.eu/t/choose-only-one-of-gen-vel-and-continuation/1329/7 "2020-12-29T23:16:23Z")

</div>

Thanks for helping
