Overwriting previous dump files when running multiple simulations

Hi All,

I am trying to run multiple simulations, but I am overwriting dump files which are supposed to be created at each different run and only having the dump file of last run. Below one is the input file:

variable a loop 9
variable seed index 1 2 3 4 5 6 7 8 9
log log.$a

variable sigma equal 2.498896133
variable vx equal normal(0,\{sigma\},{seed})
variable vy equal normal(0,\{sigma\},{seed})
variable vz equal normal(0,\{sigma\},{seed})

velocity mobile set \{vx\} {vy} ${vz}

print "vz = ${vz}"
if "vz < 0" then quit

dump 1 mobile custom 100 Ar_Velocity_Position.dat id vx vy vz x y z

thermo 10
run 100

clear
next seed
next a
jump in.automation_501

1-) What should I do not to overwrite the dump files
2-) Why the printed vz value and the real value of Vz are different from each other?
velocity mobile set \{vx\} {vy} \{vz\} velocity mobile set \-3\.16470773391865 {vy} \{vz\} velocity mobile set \-3\.16470773391865 2\.95503089942291 {vz}
velocity mobile set -3.16470773391865 2.95503089942291 -1.42000795332037

print "vz = ${vz}"
vz = 1.4577597271259
if "vz < 0" then quit

I will appreciate your help.
Thanks,
Rose

Hi All,

I am trying to run multiple simulations, but I am overwriting dump files which are supposed to be created at each different run and only having the dump file of last run. Below one is the input file:

variable a loop 9
variable seed index 1 2 3 4 5 6 7 8 9
log log.$a

variable sigma equal 2.498896133
variable vx equal normal(0,\{sigma\},{seed})
variable vy equal normal(0,\{sigma\},{seed})
variable vz equal normal(0,\{sigma\},{seed})

velocity mobile set \{vx\} {vy} ${vz}

print "vz = ${vz}"
if "vz < 0" then quit

dump 1 mobile custom 100 Ar_Velocity_Position.dat id vx vy vz x y z

thermo 10
run 100

clear
next seed
next a
jump in.automation_501

1-) What should I do not to overwrite the dump files

give each file a new name (via an immediately expanded variable) or
tell the dump command to append to the file.

2-) Why the printed vz value and the real value of Vz are different from each other?

vz is an equal style variable. each time you expand it, it will
evaluate the corresponding definition. since your definition contains
the a function using a (pseudo) random number, it will give you a
different value for each expansion.

axel