# How to perform triplicate simulation for a system by changing gen seed value(i.e. in .mdp file)?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644>\
**Category:** User discussions\
**Created:** [November 27, 2024, 5:16am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644 "2024-11-27T05:16:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giri](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Giri](https://gromacs.bioexcel.eu/u/Giri)\
**Post date:** [November 27, 2024, 5:16am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644/1 "2024-11-27T05:16:53Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question If changing the gen seed value (default is -1) account for different initial velocity then what is the role of Maxwell distribution and gen temp? How the random number generator i.e. seed (numerical value) will be related to initial velocity?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [November 27, 2024, 9:34am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644/2 "2024-11-27T09:34:43Z")

</div>

I think the idea is to sample randomly from a Boltzmann distribution the distribution of velocities for your particles. Generally, when you generate (pseudo-) random numbers, you need a “starting point”, that is, a `gen_seed` to start generating them. If you change the seed, you change the velocities of the individual particles (but if the temperature is the same then the Boltzmann distribution you sample from is the same). So, in principle, changing the seed gives you different starting velocities for your atoms.

The seed is also important for reproducibility purposes, as setting the same seed will give you the same starting velocities in other simulation.

---

<div class="post-metadata">

**Author:** ![Giri](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Giri](https://gromacs.bioexcel.eu/u/Giri)\
**Post date:** [November 28, 2024, 9:47am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644/3 "2024-11-28T09:47:31Z")

</div>

Thank you for the reply. So while performing triplicate, at the time of equilibration(NVT, NPT) and production (in the .mdp file) gen\_seed should be changed or only need to change during NVT.

---

<div class="post-metadata">

**Author:** ![obZehn](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/obzehn/32/2629_2.png) [@obZehn](https://gromacs.bioexcel.eu/u/obZehn)\
**Post date:** [November 28, 2024, 10:20am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644/4 "2024-11-28T10:20:53Z")

</div>

I would generate the velocities only once, when I do the first dynamical simulation after the energy minimization, as for following runs (NVT, NPT etc) I would read the velocities from previous outputs during the `gmx grompp` compilation by setting `gen-vel = no` in the mdp file.

If you want to do replicates, then I would generate new velocities for a new replica when I have dynamics for the first time. If you have a standard pipeline of the form energy min. → NVT → NPT → prod, then after EM you can have three NVT sims with different seed and proceed from there.

---

<div class="post-metadata">

**Author:** ![Giri](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Giri](https://gromacs.bioexcel.eu/u/Giri)\
**Post date:** [November 28, 2024, 11:54am UTC](https://gromacs.bioexcel.eu/t/how-to-perform-triplicate-simulation-for-a-system-by-changing-gen-seed-value-i-e-in-mdp-file/10644/5 "2024-11-28T11:54:11Z")

</div>

Thank you.
