&GLOBAL
  PRINT_LEVEL LOW
  PROJECT 2gly_mtd_rp_dp_rmsd
  RUN_TYPE MD
&END GLOBAL

&MOTION
  &FREE_ENERGY
    &METADYN
      DO_HILLS F
      LAGRANGE
      NT_HILLS 40
      TEMPERATURE 100.
      TEMP_TOL 50
      WW 1.0e-4
      &METAVAR
        COLVAR 1
        LAMBDA 4.5
        MASS 2.0
        SCALE 0.03
      &END METAVAR
      &METAVAR
        COLVAR 2
        LAMBDA 4.5
        MASS 2.0
        SCALE 0.03
      &END METAVAR
      &PRINT
        &COLVAR
          COMMON_ITERATION_LEVELS 3
          &EACH
            MD 1
          &END EACH
        &END COLVAR
        &HILLS
          COMMON_ITERATION_LEVELS 3
          &EACH
            MD 1
          &END EACH
        &END HILLS
      &END PRINT
    &END METADYN
  &END FREE_ENERGY
  &MD
    ENSEMBLE NVT
    STEPS 50
    TEMPERATURE 300.0
    TEMP_TOL 50
    TIMESTEP 1
    &PRINT
      &ENERGY
        ADD_LAST NUMERIC
        &EACH
          MD 10
        &END EACH
      &END ENERGY
    &END PRINT
    &THERMOSTAT
      TYPE NOSE
      &NOSE
        LENGTH 6
        MTS 2
        TIMECON 1500
        YOSHIDA 3
      &END NOSE
    &END THERMOSTAT
  &END MD
  &PRINT
    &RESTART
      &EACH
        MD 100
      &END EACH
    &END RESTART
    &RESTART_HISTORY OFF
    &END RESTART_HISTORY
    &TRAJECTORY
      &EACH
        MD 10
      &END EACH
    &END TRAJECTORY
  &END PRINT
&END MOTION

&FORCE_EVAL
  METHOD FIST
  &MM
    &FORCEFIELD
      PARMTYPE CHM
      PARM_FILE_NAME ../sample_pot/2gly.pot
      &SPLINE
        EMAX_ACCURACY 500.0
        EMAX_SPLINE 1.0E10
        EPS_SPLINE 1.0E-6
        R0_NB [bohr] 0.0001
        RCUT_NB 20.0
      &END SPLINE
    &END FORCEFIELD
    &POISSON
      &EWALD
        ALPHA .36
        EWALD_TYPE ewald
        GMAX 29
      &END EWALD
    &END POISSON
    &PRINT
      &FF_INFO
        SPLINE_INFO
      &END FF_INFO
    &END PRINT
  &END MM
  &SUBSYS
    &CELL
      ABC 30.0 30.0 30.0
    &END CELL
    &COLVAR
      &REACTION_PATH
        ALIGN_FRAMES T
        ATOMS 1 5 8 9 10 12 15 16 17
        DISTANCES_RMSD
        LAMBDA 0.1
        SUBSET_TYPE LIST
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.0.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.1.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.2.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.3.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.4.xyz
        &END FRAME
      &END REACTION_PATH
    &END COLVAR
    &COLVAR
      &DISTANCE_FROM_PATH
        ALIGN_FRAMES T
        ATOMS 1 5 8 9 10 12 15 16 17
        DISTANCES_RMSD
        LAMBDA 0.1
        SUBSET_TYPE LIST
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.0.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.1.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.2.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.3.xyz
        &END FRAME
        &FRAME
          COORD_FILE_NAME ../sample_xyz/MOL.4.xyz
        &END FRAME
      &END DISTANCE_FROM_PATH
    &END COLVAR
    &TOPOLOGY
      CHARGE_BETA
      CONNECTIVITY UPSF
      CONN_FILE_NAME ../sample_psf/2gly.psf
      COORDINATE PDB
      COORD_FILE_NAME ../sample_pdb/2gly.pdb
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
