read in multiple data

Dear Lammps Users,

I would like to calculate energies for a set of configurations
with lammps. Is there a way to read_data twice in the same input file?
I got an error when I tried, but a work around would be helpful.

Alternatively, is there a way to specify the data file as a command
line argument? The idea would be to simply execute lammps as a script
on a list of data files. Any ideas on how to do this kind of thing
would be very much appreciated.

Thanks,
John

Dear Lammps Users,

I would like to calculate energies for a set of configurations
with lammps. Is there a way to read_data twice in the same input file?
I got an error when I tried, but a work around would be helpful.

you can place multiple calculations in the same script,
but you have to call "clear" in between, which means,
that you need to repeat the entire system definition.

however, in combination with loops, this can be used
to automate parameter sweeps or similar things.

Alternatively, is there a way to specify the data file as a command
line argument? The idea would be to simply execute lammps as a script

yes, you can define index style variables using the -var command line flag.

axel.

Alternatively, is there a way to specify the data file as a command
line argument? The idea would be to simply execute lammps as a script

yes, you can define index style variables using the -var command line flag.

In fact you can specify a list of data files as a command-line arg,
then use a single value from the variable as the arg to a read_data
command that is in a loop, where you use the "clear" that Axel
mentioned in the loop to start a new simulation and increment the
variable to do read_data on a new file each iteration.

Steve