# About seed for simulation

**URL:** <https://ask.bioexcel.eu/t/about-seed-for-simulation/1854>\
**Category:** MDWeb\
**Created:** [March 11, 2020, 2:27pm UTC](https://ask.bioexcel.eu/t/about-seed-for-simulation/1854 "2020-03-11T14:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matsuzawa](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@matsuzawa](https://ask.bioexcel.eu/u/matsuzawa)\
**Post date:** [March 11, 2020, 2:27pm UTC](https://ask.bioexcel.eu/t/about-seed-for-simulation/1854/1 "2020-03-11T14:27:46Z")

</div>

Hello.

I created new project, and prepared for simulation by “Gromacs FULL MD setup”.  
Using this prepared structure, I ran “Simple Box Solvent Molecular Dynamics (NPT)” 2 times.  
After simulation, I noticed that these 2 simulation seeds(written in log file as ld\_seed) are same.  
But other results (gro, trr, xtc, pdb) were different.  
And using analysis tool, I checked RMSd and Bfactor. These were also different.  
Then using analysis tool “Get a trajectory snapshot”, I checked structures first step and last step.  
These structures were same between first and second simulation.

If seed is same, should simulation results be same?  
Can I change seed for simulation?  
Trajectories are different, why are snapshots same?

Thank you for your help.

Regards,

---

<div class="post-metadata">

**Author:** ![adam.hospital](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/adam.hospital/32/151_2.png) [@adam.hospital](https://ask.bioexcel.eu/u/adam.hospital)\
**Post date:** [March 13, 2020, 10:19am UTC](https://ask.bioexcel.eu/t/about-seed-for-simulation/1854/2 "2020-03-13T10:19:54Z")

</div>

Hi matsuzawa,

_ **If seed is same, should simulation results be same?** _

In theory yes, but MD has a stochastic behaviour that makes trajectories diverge quickly even using the same seed. See this thread from CHARMM forum as an example:

> **[same seed but get different result](https://www.charmm.org/ubbthreads/ubbthreads.php?ubb=showflat&Number=35530)**
>
> Hello,When doing equilibration in MD, I run exactly the same input file with the same number of processors. And I also checked the output file, in the line "RANDOM NUM. GEN. SEED(S) = ", the numbers are the same. Why the trajectories are different?...

_ **Can I change seed for simulation?** _

Unfortunately this is not possible with MDWeb. I would recommend you to take a look at the new work done by BioExcel on MD usability here: [http://mmb.irbbarcelona.org/biobb/](http://mmb.irbbarcelona.org/biobb/)  
This building blocks library is much more flexible than MDWeb in terms of GROMACS parameters, for example it will allow you to change the seed.

_ **Trajectories are different, why are snapshots same?** _

Actually the final snapshots of the two trajectories are different. Try to download both trajectories to your own computer and visualize them using a software like VMD. There must have been some issues with the “Get a trajectory snapshot” tool.

Thank you very much for your interest in our tool!

Regards,

-Adam-
