Seperating the calculation region for gmx energy -vis

Dear Gromacs community,

Thanks to the forum. I am a new user for gromacs and have an interest in evaluating the local viscosity by gromacs.
gmx energy -f filename.edr -vis can produce an evisco.xvg included the shear viscosity using Einstein relation.
However, as far as I know, the .edr file only can use for calculate the entire system instead of the certain region I want.

For example, the following figure is produced by VMD by importing the .gro file.


The upper and lower are the charged walls, and the center part is the water with ions.I would like to extract the viscosity only for the water molecules. (Eventually, I aim to extract the water molecules only near the charged wall)

I found a method from this post with following process.

  1. After running a system until steady state.
  2. use gmx make_ndx to select the “SOL” group, which is water molecules only
  3. create a new .mdp file with energy-grps = SOL
  4. Use gmx grompp to create a .tpr file
  5. Use gmx mdrun -rerun to get a new .edr file
  6. Use gmx energy -vis to get a new evisco.xvg

However, the results didn’t change. I wonder if this process can actually use for viscosity calculation.

Another method I saw is
1. After running a system until steady state.
2. Add a cos-acceleration = 0.04 to .mdp and run NVT.
3. Use gmx energy and it will show 1/viscosity.

However, it seems that it only can present the viscosity for the entire system, but not for certain volume.

I am curious to learn if there is a practical way to calculate the viscosity within the region of interest.

Really appreciating for your reading. Any comment will be really helpful for me!

Best Regards,

Wade