[lammps-users] Variable pair_coeff


Is there some way I can modify pair coefficients as a function of their current

The only way I can think of is to perform the modifications separately, write
them to a file, and `include` them whenever I want to. Is there something
simpler, I can do within the script?


Do you mean change the pair coeff gradually on the fly as
a simulation runs? If so, see the fix adapt command.

Or do you want to do a run, change the pair coeff, do another run.
If you want to do that you can use variable commands in the
LAMMPS input script, and use a new variable value in the
pair_coeff command.


I did mean the latter case (although thanks for pointing me to `adapt`). I will try that out.

So if I need to begin by assigning 'N' different radii to each of the 'N' particles in my system, I could read them in as, maybe `index` variables, and then use `equal` variables to modify each of them.