I got the answer to this question on the GROMACS forum which can be found here.
the thermostat influence in the non-equilibrium cosine perturbation approach is automatically taken care by GROMACS, which biases termperature rescaling based on the velocity profile of fluid particles.
However, some thermostats will introduce additional ‘artificial’ viscosity, so your reasoning is correct, I believe. However, from a practical standpoint I don’t see the reason why one would want to compute a nominal value of viscosity from a NVE simulation, mainly because of two reasons:
- production runs are rarely NVE, so you would want to use a consistent value for viscosity (and the one from NVE would be incorrect).
- viscosity itself is a function of temperature, so I’m not sure if it makes sense from a purely physical standpoint to estimate if by fixing the total energy, rather than temperature.
When it comes to pressure, as far as I know it may be problematic to estimate viscosity from equilibrium NPT simulations (you want the cell volume not to fluctuate in order for the Green-Kubo formula to converge). I am not sure about non-equilibrium though; probably volume fluctuations are not a problem in NE.