Hi everyone

I am calculating viscosity for water by Green-Kubo method.I used two methods to calculate the stress tensor on the fly.

Firstly, I calculate the per-atom stress tensors and then sum over all atoms, followed by divided by 3*V (V is the volume of my system). Then I out the correlation functions and integrate them to get the viscosity.

Secondly, I used the stress tensor for the entire system for the correlation functions and integrate them to get the viscosity.

I found the viscosity got by second way is 10 times lager than the preceding one. I have checked the summation of stress tensors from the first one is equal to the press of the whole system (see below), which means that there is no misusage of the “compute stress/atom” and “compute reduce sum” commands.

What is the problem?

Step v_pxx v_pyy v_pzz sum of pxx pyy pzz Press

0 566.99263 1222.7654 646.22803 2435.98606 2435.986

1E6 1066.2925 1795.2442 1436.4714 4298.0081 4298.0081

2E6 613.92871 681.95052 -440.21401 855.66522 855.66523

3E6 671.48437 803.13143 -44.56826 1430.04754 1430.0475

4E6 1302.3147 1126.8408 1999.1622 4428.3177 4428.3177

5E6 1419.1795 679.51978 1585.0635 3683.76278 3683.7627

6E6 890.20389 -24.07363 1003.7215 1869.85176 1869.8517

7E6 804.52754 868.78218 1563.1807 3236.49042 3236.4904

8E6 1397.1533 -231.35232 -32.19473 1133.60625 1133.6062

9E6 1573.4173 1412.1224 1867.0938 4852.6335 4852.6335

1E7 546.85908 318.53894 705.9205 1571.31852 1571.3185