How to calculate pressure for individual components in the system

GROMACS version:2018.1
GROMACS modification: Yes/No
Dear GROMACS users,
The system has two graphene sheets and water molecules between them. I want to calculate the pressure of only water molecules in X, Y, and Z directions, not whole system pressure.
Any help is appreciated.
Thank you very much.
Best Regards,
Raju