[lammps-users] uloop


I am trying to run a number of simulations for a range of densities and
temperatures. For this purpose, I would like to write a script that
loops over the densities, e.g. 0.7, 0.71, 0.72, ....
and for each density over the temperatures, e.g. 0.9, 0.91, 0.92, ...
The individual simulation runs should be performed parallel.

I am trying to solve this with uloop variables, but I am not sure
whether two of these can be used to start parallel runs in partitions?

In case anyone has a better idea how to make this work, I would be
highly interested.

Many thanks,

You should be able to increment multiple variables
with the next command.

See Section_howto, 4.4 of the manual for examples.


thanks for the reply Steve,

in case it is of interest, I have done it like this now:

echo both

variable vDensSteps equal 20
variable vTempSteps equal 20
variable vDensStart equal 0.7
variable vTempStart equal 0.9
variable vDensStep equal 0.05
variable vTempStep equal 0.05

variable vRuns equal \{vDensSteps\}\*{vTempSteps}
variable vRun uloop ${vRuns}

variable viDens equal floor((\{vRun\}\-1\)/{vTempSteps})
variable viTemp equal \{vRun\}\-1\-{viDens}*${vTempSteps}

variable vDens equal \{vDensStart\}\+{viDens}*\{vDensStep\} variable vTemp equal {vTempStart}+\{viTemp\}\*{vTempStep}

print "run at density \{vDens\} and temperature {vTemp}"

#generate directory and enter
shell mkdir r${vDens}_T${vTemp}
shell cd r${vDens}_T${vTemp}


# leave directory
shell cd ..

next vRun
jump msv_range2.in

Steve Plimpton wrote: