Different values for gen-seed in mdp file

GROMACS version: 2018.1

Hi everyone, I have a receptor-ligand system and from umbrella sampling at different receptor-ligand distances I could find the distances at which the ligand is most probably going to bind. So, in order to get an idea of time taken for binding, I am running 10-independent unbiased MD simulations each starting from same initial structure (corresponding to a specific receptor-ligand distance where it is most likely to bind); so in order to perform 10-independent simulations I modify the velocity generation random seeds i.e. gen-seed in mdp files, e.g. if I have trajectories like: seed_1,seed_2,…,seed_10 then I put gen-seed values= 1,2,…,10 respectively for seed_1,seed_2,…,seed_10; Is this a correct way of running these or the manual choice of random seeds that differ by only one can impact the randomness of the simulations? I am of the view that using different random seeds will always give us different starting velocities. Any help will be much appreciated, thank you

Seeds values that are consecutive integers will lead to essentially identical starting conditions. I tested this a long time ago. You need to assign dramatically different values to get proper randomness.

Thank you for your reply Dr. Lemkul. In my case the starting structure is same for the independent simulations; in order to make them random I would like to assign different sets of velocities to the initial structure; So, if consecutive integers are used as gen-seed then the velocities of the starting structure in different simulations will be very similar to each other, I hope this is what you meant by identical starting conditions; I have done a small test: generated 1000 random numbers in cpp twice using random-seed=1 and 2 respectively and then measured and found they are very much uncorrelated; so, does gromacs work in a different way? and what is then the optimal process to run multiple copies of a simulation starting from same structure (using gen-seed=-1)?

gen_seed = -1 is generally a safe way to get suitable random numbers. You can always verify what the seed was in mdout.mdp or by printing the contents of the .tpr file with gmx dump.

Dr. Lemkul I used a random seed in my MD run (gen_seed= -1) and now I need to know what the seed was when generating velocities for my system. I do not know if I’m doing something wrong, but my mdout.mdp just prints:

; GENERATE VELOCITIES FOR STARTUP RUN
gen_vel = yes
gen_temp = 300
gen_seed = -1

The md.log file and also the “gmx dump -s myfile.tpr” command are able to print the ld-seed but not the gen_seed. Do you have any suggestions to access such a number?

The seed value is only used by grompp for generating velocities, so it is not encoded in the .tpr file because it is not needed by dynamics. grompp writes an mdout.mdp file that should have it, though.

Dr. Lemkul, thanks for your prompt reply and for the clarification. However, my mdout.mdp file (attached) does not contain the ‘gen_seed’ info. It just prints gen_seed = -1
mdout.mdp (10.7 KB)

Originally, what I wanted to do was to compare the results from two MD runs using constraints = h-bonds vs constraints = all-bonds, keeping the same conditions for the rest of the variables of my system, like ld_seed and gen_seed.

I see no reason to try to preserve seeds in this case. As soon as the constraints are solved, the trajectories will start to diverge because the forces will be different. You will not be able to do a frame-vs-frame comparison of the impact of the constraints, at least as a function of initial velocities in this way.

Note that each force field is parametrized to be used with a specific constraint convention. If you change it, you introduce unknown errors into the simulation.