# Viscosity calculation gmx energy

**URL:** <https://gromacs.bioexcel.eu/t/viscosity-calculation-gmx-energy/2093>\
**Category:** User discussions\
**Created:** [May 4, 2021, 2:51pm UTC](https://gromacs.bioexcel.eu/t/viscosity-calculation-gmx-energy/2093 "2021-05-04T14:51:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunalmavani](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kunalmavani](https://gromacs.bioexcel.eu/u/kunalmavani)\
**Post date:** [May 4, 2021, 2:51pm UTC](https://gromacs.bioexcel.eu/t/viscosity-calculation-gmx-energy/2093/1 "2021-05-04T14:51:43Z")

</div>

GROMACS version: 2021  
GROMACS modification: No

Dear All,

I am calculating viscosity using gmx energy -vis which uses Einstein’s relation. I’m running the simulation for 200 ns. I am interested in the output files visco.xvg and evisco.xvg.

1. In the visco.xvg I see that I have data till 100 ns and for evisco.xvg till 50 ns. Why is that so and what is the difference? I expected both the files to have equal data points.
2. The shear viscosity data in the visco.avg (54.8 cP) file differs significantly from the last column of the evisco.xvg (192 cP). Data from which file should be referred for shear viscosity?

Output from visco.xvg  
Time (ps) Shear vis (cP) Bulk viscosity  
99998 54.864 357.352  
99998.2 54.8626 357.348  
99998.4 54.861 357.344  
99998.6 54.8591 357.34  
99998.8 54.8571 357.338  
99999 54.8552 357.335  
99999.2 54.8537 357.331  
99999.4 54.852 357.327  
99999.6 54.8503 357.322  
99999.8 54.8483 357.32

Output from evico.xvg  
49998.5 0.184633 0.304404 0.0879212 0.192319  
49998.7 0.18464 0.304396 0.0879256 0.192321  
49998.9 0.184656 0.3044 0.0879333 0.19233  
49999.1 0.184692 0.304371 0.0879252 0.192329  
49999.3 0.18471 0.304369 0.0879221 0.192334  
49999.5 0.184667 0.304372 0.0879115 0.192317  
49999.7 0.184679 0.304385 0.0879139 0.192326  
49999.9 0.184678 0.304385 0.0879119 0.192325  
50000.1 0.184678 0.304362 0.087925 0.192321

Thank you very much.

Regards,  
Kunal Mavani
