I tried to search online if there are examples or suggestions on how to set up a 4-point flexible water model, such as TIP4P/2005f, qTIP4P/f, TIP4P/$\epsilon$ FLEX, etc., but there's no clear example on how to set up intermolecular constraints, particularly for dummy atom distances and angles, with respect to the $\ce{O}$ and $\ce{H}$ atoms.
I am looking for input examples for CP2K and GROMACS, but an input setup for any major classical MD software with an explanation would be really helpful.
#define FLEXIBLE
in the main topology file before reading in the water topology and parameters. However, you wish to use TIP4P/2005f, qTIP4P/f etc. for which parameter files are not shipped by default with gromacs, so I suspect that you would have to find the parameters and edit them in to make your own topology/parameter file. $\endgroup$