Variable Format with Dump Command

Hello, I have been searching for a way to insert in variable format in LAMMPS dump command. For example, we’d like to change the atom count, so we change the variable for atoms, and the file name will change to reflect this change at all possible places. Is there a way to do this automatic name change in dump with change in variable?

Do you mean something like this?

variable natoms equal atoms
dump 1 all atom 50 system-${natoms}.dump

Please see 5.2. Parsing rules for input scripts — LAMMPS documentation
and variable command — LAMMPS documentation for details and more.

1 Like