Is there anything wrong about fix ave/correlate?

Hi,everybody
I have recently confused about how a global vector is established and used by another command. Specifically, I doubt the code for viscosity calcualtion is incorrect. the relavent script is extracted from the manual (P89, 24 Jan 2013 version):

viscosity calculation, switch to NVE if desired

#unfix NVT
#fix NVE all nve

reset_timestep 0
variable pxy equal pxy
variable pxz equal pxz
variable pyz equal pyz
fix SS all ave/correlate $s $p d & v_pxy v_pxz v_pyz type auto file S0St.dat ave running variable scale equal {convert}/(${kB}$T)$V*s*{dt}
variable v11 equal trap(f_SS[3]){scale} variable v22 equal trap(f_SS[4])*{scale}
variable v33 equal trap(f_SS[5])
${scale}
thermo_style custom step temp press v_pxy v_pxz v_pyz v_v11 v_v22 v_v33
run 100000
variable v equal (v_v11+v_v22+v_v33)/3.0
variable ndens equal count(all)/vol
print “average viscosity: $v [Pa.s/ @ T K, {ndens} /A^3”

As illustrated in ‘compute pressure’ command, a vector [pxx,pyy,pzz,pxy,pxz,pyz] is created and can be used with indices1-6 by other command. logically, the ‘fix ave/correlate’ can create an identical vector of the same length and order. So,v11 is supposed to be calculated by trap(f_SS[4])*{scale}, other than trap(f_SS[3])*{scale}. Similarly, v22 and v33 correspond to f_SS[5] and f_SS[6], respectively.
Is anything wrong or don’t I indeed get the ‘fix ave/correlate’ command? If the latter, would you please tell me what the vector created by ‘fix ave/correlate’ looks like? Thank you very much!
Best wishes,
Hongtao

Hi,everybody
I have recently confused about how a global vector is established and used by another command. Specifically, I doubt the code for viscosity calcualtion is incorrect. the relavent script is extracted from the manual (P89, 24 Jan 2013 version):

Before questioning the correctness of a script in a 1.5 year old version, please update to the latest version and compare to the script provided in the examples directory.

viscosity calculation, switch to NVE if desired

Hi,Axel
Thank you for your reply.
I have examined the latest manual version (1 Feb 2014) and the example fo development version (viscosity). Both have the same description.
Is the question I refered really question? If not, would you please tell me what the vector created by ‘fix ave/correlate’ looks like? Thank you very much
Hongtao

在 2014-07-16 10:03:43,“Axel Kohlmeyer” <akohlmey@…24…> 写道:

Hi,Axel
Thank you for your reply.
I have examined the latest manual version (1 Feb 2014) and the example fo development version (viscosity). Both have the same description.
Is the question I refered really question? If not, would you please tell me what the vector created by ‘fix ave/correlate’ looks like? Thank you very much

That is explained in the manual…