Dear all,

I have to run simulations that take a number of parameters but i need to study the effects of, say 2 parameters that are…a {-10:2:10}, and for each a. there is a b {-0.5:0.1:0.5}. The number in the middle is the step. The rest of the code remains the same, and at each run, these numbers change, one by one. As we can see, the set (a,b) has 11*11 values, hence that many simulation results shall have to be generated. How do I loop over this in a single script?

Thanks in advance. I am using the latest version of lammps, for reference.

Regards,

Dear all,

I have to run simulations that take a number of parameters but i need to study the effects of, say 2 parameters that are…a {-10:2:10}, and for each a. there is a b {-0.5:0.1:0.5}. The number in the middle is the step. The rest of the code remains the same, and at each run, these numbers change, one by one. As we can see, the set (a,b) has 11*11 values, hence that many simulation results shall have to be generated. How do I loop over this in a single script?

i would not do that. i would write a script that generates 11*11 input files with the parameter sets and then submit these simulations as individual simulations on an HPC cluster, and thus make good use of the inherent parallelism of the problem.

if you rather wait longer and do this all in one script, you can do two nested loops each running over 11 items, with integer spacing then compute the actual parameters with an equal style variable from the loop index, as had been suggested for a similar case on this very same mailing list *very* recently.

axel.