Yes, this exists, but not quite with this kind of syntax. On top of it, you could also use the partition keyword and run multiple calculations concurrently in parallel as separate MPI groups.
There are several kinks and caveats:
since the read_data command defines a simulation box and you can define that box only once, you have to start each loop with a “clear” command to reset the state of the LAMMPS simulation entirely (except for variables)
you can either use a loop, an index, or a file style variable to loop over, for a multi-partition run, there also are uloop or universe style variables
you need to use the “label”, “jump” and “next” commands in your script besides the variable definitions
I’ve found that my scripts look the cleanest when I use getenv variables and then control the overall set-of-simulations with an external script. For example:
(in LAMMPS script)
variable n getenv N
read_data datafile_$n
print 'Some Generic Output' file output_$n
(etc)
(in wrapper script / on command line)
for nloop in {1..5}; do export N=$nloop; lmp -i input_script; done
(note N=$nloop cannot have spaces).
As for more advanced needs such as running this script on a computing cluster, running these jobs in parallel, etc, those will then be shell scripting questions that are separate from running LAMMPS itself.