#CPQA INCLUDE ../BASIS_SET
#CPQA INCLUDE ../POTENTIAL
&GLOBAL
  PRINT_LEVEL LOW
  PROJECT H2O-IP-meta
  RUN_TYPE MD
&END GLOBAL

&MULTIPLE_FORCE_EVALS
  FORCE_EVAL_ORDER 1 2
  MULTIPLE_SUBSYS F
&END MULTIPLE_FORCE_EVALS

@SET CHARGE  0
@SET LSD 0
@INCLUDE dft_force_env.inc
@SET CHARGE -1
@SET LSD 1
@INCLUDE dft_force_env.inc
&FORCE_EVAL
  METHOD MIXED
  &MIXED
    MIXING_TYPE GENMIX
    NGROUPS 2
    &GENERIC
      MIXING_FUNCTION E1+k*E2
      # Propagate the Equation of Motion according to the neutral state Hamiltonian
      PARAMETERS k
      VALUES 0.
      VARIABLES E1 E2
    &END GENERIC
  &END MIXED
  &SUBSYS
    &CELL
      ABC 5.0 5.0 5.0
    &END CELL
    &COLVAR
      &U
        &MIXED
          ENERGY_FUNCTION E2-E1
          VARIABLES E1 E2
        &END MIXED
      &END U
    &END COLVAR
    &COORD
      O   0.000000    0.000000   -0.065587
      H   0.000000   -0.757136    0.520545
      H   0.000000    0.757136    0.520545
    &END COORD
    &KIND H
      BASIS_SET DZVP-GTH-PADE
      POTENTIAL GTH-PADE-q1
    &END KIND
    &KIND O
      BASIS_SET DZVP-GTH-PADE
      POTENTIAL GTH-PADE-q6
    &END KIND
  &END SUBSYS
&END FORCE_EVAL

&MOTION
  &FREE_ENERGY
    &METADYN
      DO_HILLS
      NT_HILLS 3
      WW 1.0e-3
      &METAVAR
        COLVAR 1
        SCALE [kcalmol] 0.5
      &END METAVAR
      &PRINT
        &COLVAR
          COMMON_ITERATION_LEVELS 3
        &END COLVAR
        &HILLS
          COMMON_ITERATION_LEVELS 3
        &END HILLS
      &END PRINT
    &END METADYN
  &END FREE_ENERGY
  &MD
    ENSEMBLE NVT
    STEPS 9
    TEMPERATURE 300.0
    TIMESTEP 0.5
    &THERMOSTAT
      &NOSE
        LENGTH 3
        MTS 2
        TIMECON 100.0
        YOSHIDA 3
      &END NOSE
    &END THERMOSTAT
  &END MD
&END MOTION
