running input file multiple times

Dear Steve,

I am trying to model sputtering of nitrogen molecule on graphene substrate while using fix deform. I have been able to run a single trajectory but now I want to run 2000 trajectories. I wrote out a restart file after equilibrating the surface before impingement occurs. Now, I need to generate random velocities along x y and z directions to sum up to 1000m/s. I came across this post
http://lammps.sandia.gov/threads/msg10852.html
but I’m afraid that variable index command won’t work here as I have 2000 entries for each vx, vy and vz. I have a way of generating the same while using random numbers. I looked through the variable command documentation and it mentioned something about using python functions. I am just wondering, am I on the right path? Or is there an easier way I might be missing?

Now to run the same input file for 2000 trajectories, I am a bit confused how to go about it. After the nitrogen molecule reaches 8Å over the graphene surface, I want to stop the simulation using

if zco-ord > somevalue then quit

Now how do I restart the simulation again for unto 2000 times? Instead of the above logic, should I use

if zco-ord > somevalue then jump SELF

If so, is there a way to generate separate output files for each simulation (containing velocity, co-ordinates of molecule)?

Thank you

I’m not clear on what you want to do, even for 1 simulation.

You want intitial random velocities in some different manner

than the velocity command would produce? If you can’t

do it from an input script, you can put them in a data file

or in another file that an atomfile-style variable can read,

and thus assign them to atoms. If you pre-process and create

2000 such files, you can run 2000 simulations with different

pre-determined initial velocities.

Steve