Can anyone guide me about how I can calculate storage and loss modulus from gromacs simulation?

GROMACS version:
GROMACS modification: Yes/No
Here post your question
I am simulating a set of polymers in different salt concentrations and different temperatures. For these simulations, I am using Gromacs 2022.1. Now I want to calculate the storage and loss modulus from the simulations. I tried to calculate coefficient of viscosity using the following command, “gmx energy -s mdrun.tpr -f mdrun.edr -o energy.xvg -vis visco.xvg”, but I think I am not getting the correct value for viscosity. So, I feel I would try to calculate storage and loss modulus. Can anyone guide me in this? I understand that viscosity and storage and loss modulus are related parameters. But how can we calculate them in gromacs? Is there any document or manual regarding this?