automatic seed

Dear Users,
Is there any command in LAMMPS such that the same script at each run will take a random seed value automatically instead of manual supply of the seed in velocity command?

Thanks & Regards

Dear Users,
Is there any command in LAMMPS such that the same script at each run will
take a random seed value automatically instead of manual supply of the seed
in velocity command?

no. but why not write a program or script that
computes a series of random numbers and
uses this information to generate a sequence
of input files with a different seed?

axel.

Personally I like to use an in-line command like

./lmp -var T $temper -var seed `bash -c 'echo $RANDOM'` -echo screen < infile.in

and then LAMMPS input file infile.in as lines like

print "Seed: ${seed}"
velocity all create T {seed} dist gaussian

You've already heard 2 good solutions. Here's 2 more.

There is a random() function in the variable command
that will take a single seed. Then every time you
invoke a variable containing that function
you get a new random #, which if you scale it
can become a new seed for the velocity command,
e.g. in a loop.
You just need to be a bit careful that the consecutive
RNs from the first generator are independent seeds
for the 2nd. I think they will be b/c the variable
command and the velocity command use 2 different
styles of RN generators.

You can go to www.random.org and its Integer
Generator and get a list
of 10 or 100 or 1000 or 10000 true random numbers at the click
of the mouse, each scaled from 1 to 1 billion (for example).
Then you can paste those
into your input script as values for an index-style variable.
Then use that variable as the arg for the velocity command
seed, again in a loop.
I've used that method before there was a random()
function built into the variable command.

Steve

You've already heard 2 good solutions. Here's 2 more.

There is a random() function in the variable command
that will take a single seed. Then every time you
invoke a variable containing that function
you get a new random #, which if you scale it
can become a new seed for the velocity command,
e.g. in a loop.
You just need to be a bit careful that the consecutive
RNs from the first generator are independent seeds
for the 2nd.

You can go to www.random.org and its Random Integer
Generator and get a list
of 10 or 100 or 1000 or 10000 true random numbers at the click
of the mouse, each scaled from 1 to 1 billion (for example).
Then you can paste those
into your input script as values for an index-style variable.
Then use that variable as the arg for the velocity command
seed, again in a loop.
I've used that method before there was a random()
function built into the variable command.

Steve

Here is another solution. We just added file-type
variables, which means you can put a list of RNG seeds
in a file, and read them into LAMMPS one at at time,
each time the variable is evaluated. See the variable
doc page for details.

Steve