[lammps-users] question on variable command

It seems that “variable a equal b” means “macro copy” rather than assignment of value of b to a.
That is, if “b” changes from 1 to 2 afterward, “a” also changes.
Is there a method to assign the value of “b” to “a” using notations of “a” and “b”?

Best regards,

Luke

It seems that "variable a equal b" means "macro copy" rather than

actually, this syntax is not allowed.
you would have to do

variable a equal v_b

for that.

assignment of value of b to a.
That is, if "b" changes from 1 to 2 afterward, "a" also changes.
Is there a method to assign the value of "b" to "a" using notations of
"a" and "b"?

variable a equal ${b}

any variable reference starting with a $ is being
expanded by the input processor before the string
is handled to the parser for evaluation.

cheers,
    axel.