wrong attribute in dump custom

Hi all,
My requirement is to “dump” per-atom velocity after subtracting off the center-of-mass velocity. I used the following lines for that.
compute vx all property/atom vx
variable vxorgn atom c_vx-(gmask(all)*vcm(all,x)

dump 1 all custom 100 *.cfg id type xs ys zs v_vxorgn

But lammps reports that variable as wrong attribute. Although this is a atom_style variable why this error is coming ? Can anybody help me regarding this ?

Thanks a lot in advance.

Hi all,
My requirement is to "dump" per-atom velocity after subtracting off the
center-of-mass velocity. I used the following lines for that.
compute vx all property/atom vx
variable vxorgn atom c_vx-(gmask(all)*vcm(all,x)
dump 1 all custom 100 *.cfg id type xs ys zs v_vxorgn

But lammps reports that variable as wrong attribute. Although this is a
atom_style variable why this error is coming ? Can anybody help me
regarding this ?

It is not wrong attribute, but "Invalid syntax in variable formula". It
is because you missed an ")" at the end of your variable line.

Ray