msd/nongauss command in confined systems

Dear LAMMPS users,

I want to calculate the non-Gaussian parameter for confined system.
That means I should calculate the lateral-nongauss parameter.
I tried to do that by this way :

compute MSD oxygen msd com yes

variable drsquared equal ave((c_MSD[1]*c_MSD[1])+(c_MSD[2]*c_MSD[2]))

variable drfourth equal ave(((c_MSD[1]*c_MSD[1])+(c_MSD[2]c_MSD[2]))((c_MSD[1]*c_MSD[1])+(c_MSD[2]*c_MSD[2])))

variable nonGuss equal ((1v_drfourth)/(2v_drsquared*v_drsquared))-1

But the “ave” does not work and it gives error !
I was wondering if you have any other suggestion about calculating the msd/nongauss ?

Thanks for your attention.

Best,
Saeed.

Dear LAMMPS users ,

Can you please give me some ideas about my question ?
Thanks a lot in advance.

Saeed.

It would help a lot if you showed us your input script, LAMMPS version and the exact error message.

Dear Stefan,

I use : lammps-14May16

the error is : ERROR: Invalid special function in variable formula (…/variable.cpp:3962)

and this is a part of my input file :

compute MSD oxygen msd com yes

variable drsquared equal ave((c_MSD[1]*c_MSD[1])+(c_MSD[2]*c_MSD[2]))

variable drfourth equal ave(((c_MSD[1]*c_MSD[1])+(c_MSD[2]c_MSD[2]))((c_MSD[1]*c_MSD[1])+(c_MSD[2]*c_MSD[2])))

variable nonGuss equal ((1v_drfourth)/(2v_drsquared*v_drsquared))-1

Best,
Saeed.

It works fine for me in a minimal test example. Is your version of LAMMPS perhaps not the latest?

Dear Stefan,

I changed my LAMMPS version to new one but again I have that error !
ERROR: Invalid special function in variable formula (…/variable.cpp:4055)

Best,
Saeed.

Well, in that case it might be an error in a different variable. However, as long as you do not share your input script it is impossible for anyone else to diagnose what exactly is going wrong.