#ifdef _FF_OPLS
;
; This topology file should work with ffoplsaa.itp
;

	
[ moleculetype ]
; molname       nrexcl
SOL             2

#define MNO
#ifdef MNO
; We use a strange order of atoms to make things go faster in GROMACS
[ atoms ]
; id    at type res nr  residu name     at name         cg nr   charge
1       opls_119     1       SOL             HW1             1       0.241
2       opls_119     1       SOL             HW2             1       0.241
3       opls_120     1       SOL             OL1             1      -0.241
4       opls_120     1       SOL             OL2             1      -0.241
5       opls_118     1       SOL              OW             1       0

[ constraints ]
; i     j       funct   distance
1       5       1       0.09572
2       5       1       0.09572
1       2       1       0.15139

[ dummies3 ]
; The position of the dummy is computed as follows:
;
; The distance from OW to OL is 0.07 nm, the geometry is tetrahedral
; (109.47 deg)
; Therefore, a =3D b =3D 0.07 * cos (109.47/2) / | xOH1 + xOH2 |
;            c =3D 0.07 * sin (109.47/2) / | xOH1 X xOH2 |
;           =20
;
; Using | xOH1 X xOH2 | =3D | xOH1 | | xOH2 | sin (H1-O-H2)
;       | xOH1 + xOH2 | =3D 2 | xOH1 | cos (H1-O-H2)
; Dummy pos x4 =3D x1 + a*x21 + b*x31 + c*(x21 X x31)

; Dummy from                    funct   a       b               c
4       5       1       2       4       -0.344908  -0.344908  -6.4437903493
3       5       1       2       4       -0.344908  -0.344908   6.4437903493

[ exclusions ]
1       2       3       4       5
2       1       3       4       5
3       1       2       4       5
4       1       2       3       5
5       1       2       3       4

#else

[ atoms ]
; id    at type res nr  residu name     at name         cg nr   charge
1       OW      1       SOL              OW             1       0
2       HW      1       SOL             HW1             1       0.241
3       HW      1       SOL             HW2             1       0.241
4       OL      1       SOL             OL1             1      -0.241
5       OL      1       SOL             OL2             1      -0.241

[ settles ]
; i     funct   doh     dhh
1       1       0.09572 0.15139

[ dummies3 ]
; The position of the dummy is computed as follows:
;
; The distance from OW to OL is 0.07 nm, the geometry is tetrahedral
; (109.47 deg)
; Therefore, a =3D b =3D 0.07 * cos (109.47/2) / | xOH1 + xOH2 |
;            c =3D 0.07 * sin (109.47/2) / | xOH1 X xOH2 |
;           =20
;
; Using | xOH1 X xOH2 | =3D | xOH1 | | xOH2 | sin (H1-O-H2)
;       | xOH1 + xOH2 | =3D 2 | xOH1 | cos (H1-O-H2)
; Dummy pos x4 =3D x1 + a*x21 + b*x31 + c*(x21 X x31)

; Dummy from                    funct   a       b               c
4       1       2       3       4       -0.344908  -0.344908  -6.4437903493
5       1       2       3       4       -0.344908  -0.344908   6.4437903493

[ exclusions ]
1       2       3       4       5
2       1       3       4       5
3       1       2       4       5
4       1       2       3       5
5       1       2       3       4
#endif
#endif
