[lammps-users] Mismatched fix in variable formula

Dear Friends

I used fix/ave spacial command in a loop

fix Fx${i} slab${i} ave/spatial 1 1000 1000 x center {dx} fx units box ave running fix Fy{i} slab${i} ave/spatial 1 1000 1000 y center {dy} fy units box ave running fix Fz{i} slab${i} ave/spatial 1 1000 1000 z center ${dz} fz units box ave running

and then variable command

variable FN equal f_Fx1

I give the following error.

Mismatched fix in variable formula

Do you have any suggestion about resolving this problem?

Thanks

Saly

Again, fix ave/spatial does not produce a single scalar value.
So you can't reference it in a variable like that. Please
read section 4.15 of the manual which explains scalars/vectors/arrays
in the context of LAMMPS fixes/computes/output.

Steve