[lammps-users] Question about values defined in fix command

Dear LAMMPS users,

I am wondering whether it only can define values in fix commands according to c_ID, f_ID and v_name for “fix ave/time”, “fix ave/spatial” and “fix ave/atom”. Could I do that for other fix commands, like “fix spring” or “fix smd” and so on.

Most appreciate for your reply.

Best
Yajie

Other fix commands that require a number for an input
can't take a variable or compute that you expect the fix
to re-evaluate (e.g. on-the-fly during a run),
unless the code in the fix is changed to do that.

What you can do is use something like ${abc} in your input
script for the parameter, which will evaluate the variable "abc"
(one time) before the fix command is invoked, and pass it the result.

Steve