[lammps-users] Passing string variables from the command line


I just upgraded to the most recent version of LAMMPS, and it seems that
passing variables from the command line does quite work the way it used
to. For example, running LAMMPS with the options
  lmp -var foo bar
used to create a variable ${foo} which evaluated to "bar". Now, however, I
get the error message "ERROR: Invalid thermo keyword in variable". The
reason is probably that this command line argument is treated like
specifying "variable foo equal bar" in LAMMPS, which means that I can only
use a valid equation as the variable content.

Is there any way to pass arbitrary strings to LAMMPS variables from the
command line? This was a very useful feature, for example passing
filenames etc.




Thanks for pointing this out. Looks like we've killed this capability,
and will either need to revive it, or change the docs so that they
don't claim that this can be done. Look for a patch probably sometime
next week.


A patch to reinstate this feature has been posted.