&GLOBAL
  PROJECT water_tip4p
  RUN_TYPE MD
&END GLOBAL

&MOTION
  &CONSTRAINT
    &G3X3
      ATOMS 1 2 3
      DISTANCES 1.89035 1.89035 3.0869
      INTERMOLECULAR FALSE
      MOLECULE 1
    &END G3X3
    &VIRTUAL_SITE
      ATOMS 4 2 1 3
      INTERMOLECULAR FALSE
      MOLECULE 1
      PARAMETERS 0.128012065 0.128012065
    &END VIRTUAL_SITE
  &END CONSTRAINT
  &MD
    ENSEMBLE NVE
    STEPS 200
    TEMPERATURE 100
    TIMESTEP 1.0
  &END MD
  &PRINT
    &FORCES ON
      FORMAT XYZ
      &EACH
        MD 2
      &END EACH
    &END FORCES
    &VELOCITIES ON
      FORMAT XYZ
      &EACH
        MD 2
      &END EACH
    &END VELOCITIES
  &END PRINT
&END MOTION

&FORCE_EVAL
  METHOD FIST
  &MM
    &FORCEFIELD
      !GROMACS parms
      ![ atomtypes ]
      !; full atom descriptions are available in ffoplsaa.atp
      !; name  bond_type    mass    charge   ptype          sigma      epsilon
      ! opls_113   OW     15.99940     0.000       A    3.15365e-01  6.48520e-01
      ! opls_114   HW      1.00800     0.520       A    0.00000e+00  0.00000e+00
      ! opls_115   MW      0.00000    -1.040       D    0.00000e+00  0.00000e+00
      !
      ![ bondtypes ]
      !; i    j  func       b0          kb
      !  OW    HW      1    0.09572   502080.0   ; For TIP4F Water - wlj 1/98
      !  OW    LP      1    0.01750   753120.0   ;          -idem-
      !
      ![ angletypes ]
      !;  i    j    k  func       th0       cth
      !  HW     OW     HW      1   109.500    627.600   ; For TIP4F Water - wj 1/98
      !  HW     OW     LP      1    54.750    418.400   ; For TIP4F Water - wj 1/98
      &BEND
        ATOMS HW OW HW
        !K          [rad^2kjmol] 627.600
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BEND
        ATOMS HW OW MW
        !K          [rad^2kjmol]  418.400
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 54.750
      &END BEND
      &BEND
        ATOMS MW HW OW
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BEND
        ATOMS MW HW HW
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BEND
        ATOMS OW HW HW
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BEND
        ATOMS OW MW HW
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BEND
        ATOMS HW MW HW
        K [rad^2kjmol] 0.000
        KIND G87
        THETA0 [deg] 109.500
      &END BEND
      &BOND
        ATOMS OW HW
        K [nm^-2kjmol] 502080.0
        KIND G87
        !K      [nm^-2kjmol] 0.0
        R0 [nm] 0.09572
      &END BOND
      &BOND
        ATOMS OW MW
        !K      [nm^-2kjmol]  753120.0
        K [nm^-2kjmol] 00.0
        KIND G87
        R0 [nm] 0.01750
      &END BOND
      &BOND
        ATOMS HW HW
        K [nm^-2kjmol] 000000.0
        KIND G87
        R0 [nm] 0.01750
      &END BOND
      &BOND
        ATOMS HW MW
        K [nm^-2kjmol] 000000.0
        KIND G87
        R0 [nm] 0.01750
      &END BOND
      &CHARGE
        ATOM OW
        ! CHARGE -1.04
        CHARGE 0.000000
      &END CHARGE
      &CHARGE
        ATOM HW
        CHARGE 0.52
        !CHARGE 0.00
      &END CHARGE
      &CHARGE
        ATOM MW
        CHARGE -1.04
        ! CHARGE 0.00
      &END CHARGE
      &NONBONDED
        &LENNARD-JONES
          ATOMS OW OW
          EPSILON [kjmol] 6.36386E-01
          SIGMA [nm] 3.15061E-01
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS OW MW
          EPSILON 0.0
          SIGMA 0.1
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS OW HW
          EPSILON 0.0
          SIGMA 0.1
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS HW HW
          EPSILON 0.0
          SIGMA 0.1
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS HW MW
          EPSILON 0.0
          SIGMA 0.1
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS MW MW
          EPSILON 0.0
          SIGMA 0.1
        &END LENNARD-JONES
      &END NONBONDED
      &SPLINE
        EMAX_SPLINE 1000000.0
        RCUT_NB 12.0
      &END SPLINE
    &END FORCEFIELD
    &POISSON
      &EWALD
        ALPHA .44
        !EWALD_TYPE spme
        EWALD_TYPE NONE
        GMAX 24
        O_SPLINE 6
      &END EWALD
    &END POISSON
  &END MM
  &SUBSYS
    &CELL
      ABC 40.000 40.000 40.000
    &END CELL
    &KIND OW
      ELEMENT O
      MASS 15.99940
    &END KIND
    &KIND HW
      ELEMENT H
      MASS 1.00800
    &END KIND
    &KIND MW
      ELEMENT H
      MASS 0.00000
    &END KIND
    &PRINT
      &ATOMIC_COORDINATES SILENT
      &END ATOMIC_COORDINATES
      &MOLECULES ON
      &END MOLECULES
    &END PRINT
    &TOPOLOGY
      CONN_FILE_FORMAT PSF
      CONN_FILE_NAME ../sample_psf/water_tip4p.psf
      COORDINATE pdb
      COORD_FILE_NAME ../sample_pdb/water_tip4p.pdb
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
