Include File Mechanism
From wiki.gromacs.org
When constructing a system topology in a .top file for presentation to grompp, GROMACS uses the so-called C preprocessor cpp. cpp interprets lines like
#include "ions.itp"
by looking for the indicated file in the current directory, the GROMACS share/top directory as indicated by the GMXDATA environment variable, and any directory indicated by a -I flag in the value of the include run parameter in the .mdp file. It either finds this file or reports a warning. (Note that when you supply a directory name, you should use Unix-style forward slashes '/', not Windows-style backslashes '\' for separators.) When found, it then uses the contents exactly as if you had cut and pasted the included file into the main file yourself. Note that you shouldn't go and do this yourself, since the main purposes of the include file mechanism are to re-use previous work, make future changes easier, and prevent typos.
Further, cpp interprets code such as
#ifdef POSRES_WATER ; Position restraint for each water oxygen [ position_restraints ] ; i funct fcx fcy fcz 1 1 1000 1000 1000 #endif
by testing whether the non-environment variable POSRES_WATER was defined on the command line of cpp (in general, but not with grompp), or with a -D flag in the include run parameter as above, or with #define POSRES_WATER earlier in the .top file or its #include files. This mechanism allows you to change your .mdp file to choose whether or not you want position restraints on your solvent, rather than your .top file.
Note that you may choose a different underlying preprocessor with the cpp run parameter.

