How to modify the equation governing vsite of four or five side water model?

I am working on implementing a new force field for a four-site water model. How should the governing equations be modified to adjust the position of the virtual sites (vsites) in four- or five-site water models?

From what I understand, the positions of the virtual sites are determined by a governing equation, which does not seem to be directly modifiable in the .itp file. Could you please guide me on how to proceed?

Example:
"; The position of the virtual site is computed as follows:
;
; O
;
; V
;
; H H
;
; const = distance (OV) / [ cos (angle(VOH)) * distance (OH) ]
; 0.015 nm / [ cos (52.26 deg) * 0.09572 nm ]
;
; Vsite pos x4 = x1 + a*(x2-x1) + b*(x3-x1)
"

1 Like

You have quite a selection of virtual sites in Gromacs:

I imagine at least one of them will do what you’re looking for. If not, then you might need to modify the source code directly, and compile your own copy of Gromacs, but that makes your problem two orders of magnitude more complex.