I am a regular GROMACS user. I do not think you can just easily have the total functional form "printed out" from GROMACS. However, you can obtain it from the topology file (
itps) and the
mdp file. Let me elaborate a little below.
The functional forms you are referring to in the GROMACS
itp file are the ones used in bonded interactions - bonds, angles, and (proper and improper) dihedrals - and they indeed may vary across force fields, mostly for historical reasons. For example, GROMOS uses cosine based angle potentials (see GROMACS manual - bonded interactions for the functional form), while other force fields use harmonic angle potentials. Another example is OPLS using Fourier functions (GROMACS manual - bonded interactions for the functional form) for proper dihedrals, while other force fields use other functions. However, most of this functional forms are very similar, or in some cases equivalent: for example, at least in the case of dihedrals, you can actually have the same dihedral potential expressed via a Fourier function or by a Ryckaert-Bellemans function. As you recognized, the functional form of a particular bonded interaction in GROMACS is defined in the
itp file by a functional form "ID" - called
function type: i.e., the func 1, func 2 you mentioned. This Table from the GROMACS manual contains a complete list of the different functions available in GROMACS for the bonded terms, their "itp ID" (
function type), and the parameters each of them requires.
Besides bonded interactions, the total functional form is made up of a second part: the nonbonded interactions (GROMACS manual - nonbonded interactions; see also, e.g., van Gusteren et al). This part is possibly more relevant in the context of your sub-question about force field compatibility. In classical MD, nonbonded interactions most commonly means describing van der Waals and Coulomb interactions. However, it is in how such nonbonded terms are specifically treated which can make a big difference and renders force field mixing not recommendable (i.e., Justin's replies on Researchgate here and here) unless a proper validation is carried out (see below). This is the case because, the specific force fields have been all parametrized with different nonbonded settings. What I refer to here is to the exact treatment of Lennard-Jones and Coulomb interactions. For example, while the use of Lennard-Jones potential itself is pretty much ubiquitous, the scaling of the 1-4 interactions, i.e., the interactions between atom i and atom j which is 3 bonds away from i, varies considerably across force fields, see, e.g., Table 2 of S. Riniker. This difference (and others) impacts the overall functional form of the force field, and in turn the parameters which make up the force field. So, different force fields end up having different balances of Lennard-Jones and Coulomb interactions: e.g., some force fields have on average partial charges with larger magnitudes than others, and this usually means that the Lennard-Jones parameters will be somewhat less cohesive to compensate for that.
The paper of S. Riniker gives a detailed overview of the four major force fields historically developed for biomolecules - AMBER, CHARMM, GROMOS, OPLS -, their refinement over time, and all the different settings which come with that.
Also note that, despite the fact that water models, such as TIP3P or SPC, can be considered a "separate" force field, they are compatible with certain force fields because such force fields have been developed using them. In other words, each force field chose to use a certain water model - possibly because they were the developers of that model - for their force field. The specific force field was then parametrized using that chosen water model, e.g., TIP3P for OPLS and SPC for GROMOS. This then means that you should use TIP3P with OPLS and SPC with GROMOS and not vice versa, etc.
A last note on the validation: force fields have historically been validated in various ways, that is, by using different parametrization targets. For example, GROMOS 53A6 relies primarily on solvation free energies, the coarse-grain Martini force field on free energies of transfer, etc. The chosen parametrization targets reflect the "philosophy" behind the force field, and tell you also about the domain of application of the force field. Now, this means that if you create a new molecule (a new
itp file) within that force field by following the guidelines (e.g., use a particular method to compute the partial charges, use the force field default atom type for the Lennard-Jones parameter of the aromatic atoms, etc.), the idea is that you get a molecule which is compatible with the force field and which, in principle, should give you, for example in the case of GROMOS, solvation free energies in agreement with experimental data. Now, you see that if you mix in topologies from different force fields, there's no guarantee that this is the case. Potentially, for a specific application, if you really need to mix in different force field, you should first carefully validate that properties which are relevant for your application and for that system are reproduced well (solvation free energy, mass density, etc.). But this is very application specific, and should be checked very carefully. Now, I think I should leave it here and not go much further off topic. :)