# Question about generating random seed using sequence of numbers

Dear everyone,
I am using velocity all create 300 random # seed rot yes mom yes dist gaussian to initiate the velocity of all the atoms.
I want to do a sequence of simulations which relax my system, in order to have, let's say ten, different relaxation states for further simulation. So, the input file for relaxation is all the same except the random # seed. And basically they have the same temperature, pressure, volume, etc.
I have searched how to generate the seed on mailing list. It seems Steve suggests that big integer should be used. And also some suggestions on how to generate a sequence of random numbers in the input file.
However, I am wondering, is that OK if I use simple numbers like 1, 2, 3, …, 9, 10 to be the seeds? In this case, the only difference in my ten input files are command of this line, like:

velocity all create 300 1 rot yes mom yes dist Gaussian
velocity all create 300 2 rot yes mom yes dist Gaussian
… …
velocity all create 300 9 rot yes mom yes dist Gaussian
velocity all create 300 10 rot yes mom yes dist Gaussian

Do I have to use ten different big integers or generate this ten seeds by some random number generator? Because I’d like to write them myself in the input files, I want them to be easy and simple.
Any help would be much appreciated!

Best Regards
Liu

Dear everyone,

I am using velocity all create 300 random # seed rot yes mom yes dist
gaussian to initiate the velocity of all the atoms.

I want to do a sequence of simulations which relax my system, in order to
have, let's say ten, different relaxation states for further simulation. So,
the input file for relaxation is all the same except the random # seed. And
basically they have the same temperature, pressure, volume, etc.

I have searched how to generate the seed on mailing list. It seems Steve
suggests that big integer should be used. And also some suggestions on how
to generate a sequence of random numbers in the input file.

However, I am wondering, is that OK if I use simple numbers like 1, 2, 3, …,
9, 10 to be the seeds? In this case, the only difference in my ten input
files are command of this line, like:

velocity all create 300 1 rot yes mom yes dist Gaussian

velocity all create 300 2 rot yes mom yes dist Gaussian

… …

velocity all create 300 9 rot yes mom yes dist Gaussian

velocity all create 300 10 rot yes mom yes dist Gaussian

Do I have to use ten different big integers or generate this ten seeds by
some random number generator? Because I’d like to write them myself in the
input files, I want them to be easy and simple.

easy and simple would be using an external tool/program to generate a
suitable set of seeds and then read them from a file style variable.

shell 'rm -f rngs.txt; for s in \$(seq 1 100); do echo \$RANDOM >>
rngs.txt ; done'
variable seed file rngs.txt

and from now on you can use \${seed} in your input as a seed and

next seed

will give you the next seed from a list of 100.

HTH,
axel.

Dear Axel,
Thank you very much for your reply! I have learned a lot from your suggestion. I will try that later.
My problem right now is that I’d like to write the seeds in input file myself, because I want to record them and repeat my simulations later inrder to test the validity of my script. So, I want them to be simple to record.
Could you please tell me is that OK if I use 1 to 10 as the seeds? Do I have to use ten big integers?

Best Regards
Liu

Dear Axel,
Thank you very much for your reply! I have learned a lot from your
suggestion. I will try that later.
My problem right now is that I'd like to write the seeds in input file
myself, because I want to record them and repeat my simulations later inrder
to test the validity of my script. So, I want them to be simple to record.

you can just create the file with a sufficiently large number of
entries separately and use it in every run.
i am illustrating the principle, not demanding that you do it exactly so.

Could you please tell me is that OK if I use 1 to 10 as the seeds? Do I have
to use ten big integers?

this is another of the "what does it matter to have somebody's
opinion?" class of questions.
if you care about the validity of your results, you first need to
learn and understand something about (pseudo-)random number
generators, the "quality" of them and how much those are impacted by
the choice of seed. but then you also need to study how sensitive
your simulations are to those choices and how quickly individual
trajectories decorrelate. you may find, that your initial geometry may
have a significant impact as well, and that it may be just as
important to wait long enough until decorrelation is sufficiently
large.

however, all of this is very system and application (i.e. what kind of
analysis you're doing on those trajectories) specific to give a
general "this is OK" or "this is not OK" statement. apart from that,
science is dependent on facts, not on opinions (however much you
sometimes might get a feel it is). so if this matters to you, you have
to get proof and not blindly follow what somebody tells you.

axel.

Dear Axel,

Thank you very much!

I write ten separate input files and change the lines which contain ‘velocity create …’ manually. Not a clever method, but it is easy for me to implement.

Since this seems does not have a direct answer just as ‘Yes’ or ‘No’, I think it is more complicated for me to understand and find out the answer, I understand I need to run lots of simulations and try to figure it out based on the results. And maybe I also need to learn some basic knowledge about mechanism of random number generation. Sounds like lots of work to do.

According to my previous runs, it seems the results of 1 to 10 or big integers as the seeds are both all right. Although the results are different, I think they both make sense in my simulation.

Thanks a lot for all your help!

Best Regards

Liu