# How to define independednt initial condition for simulation in Gromacs (gen\_seed or ld\_seed)?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499>\
**Category:** User discussions\
**Created:** [November 7, 2024, 11:12am UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499 "2024-11-07T11:12:05Z")\
**Posts on this page:** 5\
**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:** [November 7, 2024, 11:12am UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499/1 "2024-11-07T11:12:05Z")

</div>

Dear Gromacs users,

I would like to perform 5 independent simulations (different initial conditions) of water diffusion in zeolite to study the effect of initial conditions on the diffusion coefficient of water.  
I discovered that the .mdp file has the `gen_seed` and `ld_seed` options. However, I could not correctly understand the difference between these options. Also, I don’t know how to define numbers for independent simulations. 1,2, … or other numbers?  
Could you please explain the differences? Also, what numbers can be used for that?

Best

---

<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:** [November 7, 2024, 11:17am UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499/2 "2024-11-07T11:17:56Z")

</div>

`gen-seed` is the seed to generate random initial velocities (with `gen-vel = yes`).

`ld-seed` is used to control the temperature during the simulation, if you use `sd` or `bd` integrators or with the `v-rescale` thermostat.

---

<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:** [November 7, 2024, 11:20am UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499/3 "2024-11-07T11:20:54Z")

</div>

Dear Magnusl,

Thanks for your reply.

Then I need the `gen_seed` option. How can I define other numbers except(-1)? Is there any specific rule for that?

---

<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:** [November 7, 2024, 12:13pm UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499/4 "2024-11-07T12:13:52Z")

</div>

It is a random seed ([Random seed - Wikipedia](https://en.wikipedia.org/wiki/Random_seed)). You can set it to whatever integer you want. Unless you want to generate the same velocities, e.g., to reproduce (in theory) a previous simulation, there is no reason to set it to anything else than the default -1, giving a (semi-)random seed.

---

<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:** [November 7, 2024, 12:17pm UTC](https://gromacs.bioexcel.eu/t/how-to-define-independednt-initial-condition-for-simulation-in-gromacs-gen-seed-or-ld-seed/10499/5 "2024-11-07T12:17:51Z")

</div>

Thanks a lot for your descriptions.

Best
