&GLOBAL
  PRINT_LEVEL LOW
  PROJECT hcn_chaincoord_k
  RUN_TYPE MD
&END GLOBAL

&EXT_RESTART
  RESTART_COUNTERS F
  RESTART_FILE_NAME hcn_md-1.restart
  RESTART_POS T
  RESTART_THERMOSTAT T
  RESTART_VEL T
&END EXT_RESTART

&MOTION
  &FREE_ENERGY
    &METADYN
      DO_HILLS
      LAGRANGE
      NT_HILLS 10
      WW 1.0e-3
      &METAVAR
        COLVAR 1
        LAMBDA 1.0
        MASS 50.0
        SCALE 0.05
        &WALL
          POSITION 0.0
          TYPE QUADRATIC
          &QUADRATIC
            DIRECTION WALL_MINUS
            K 1.0
          &END QUADRATIC
        &END WALL
      &END METAVAR
      #      &METAVAR
      #        LAMBDA 0.1
      #        MASS 10.0
      #        SCALE 0.02
      #        COLVAR 2
      #      &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 10
    TEMPERATURE 50.0
    TEMP_TOL 100
    TIMESTEP 0.5
    &THERMOSTAT
      &NOSE
        LENGTH 3
        MTS 2
        TIMECON 100.0
        YOSHIDA 3
      &END NOSE
    &END THERMOSTAT
  &END MD
&END MOTION

#CPQA DEPENDS hcn_md.inp
&FORCE_EVAL
  METHOD Quickstep
  &DFT
    BASIS_SET_FILE_NAME GTH_BASIS_SETS
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    RESTART_FILE_NAME hcn_md-RESTART.wfn
    &MGRID
      CUTOFF 50
    &END MGRID
    &POISSON
      PERIODIC NONE
      POISSON_SOLVER MT
      &MT
      &END MT
    &END POISSON
    &QS
      EXTRAPOLATION_ORDER 3
    &END QS
    &SCF
      EPS_SCF 1.0E-6
      IGNORE_CONVERGENCE_FAILURE
      MAX_SCF 100
      SCF_GUESS RESTART
      &OT
        MINIMIZER DIIS
        N_DIIS 7
        PRECONDITIONER FULL_SINGLE_INVERSE
      &END OT
      &OUTER_SCF
        EPS_SCF 1.0E-06
        MAX_SCF 10
      &END OUTER_SCF
      &PRINT
        &RESTART
          LOG_PRINT_KEY
        &END RESTART
      &END PRINT
    &END SCF
    &XC
      &XC_FUNCTIONAL PADE
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
    &CELL
      ABC 8.0 8.0 8.0
      PERIODIC NONE
    &END CELL
    &COLVAR
      &COORDINATION
        KINDS_FROM N
        KINDS_TO C
        KINDS_TO_B H
        ND 16
        ND_B 16
        NN 10
        NN_B 10
        R_0 [angstrom] 1.3
        R_0_B [angstrom] 1.1
      &END COORDINATION
    &END COLVAR
    &COORD
      N          0.00     0.000    0.0
      C          1.220   -0.000    0.0
      H          2.1000   0.000    0.0
    &END COORD
    &KIND N
      BASIS_SET DZVP-GTH
      POTENTIAL GTH-PADE-q5
    &END KIND
    &KIND C
      BASIS_SET DZVP-GTH
      POTENTIAL GTH-PADE-q4
    &END KIND
    &KIND H
      BASIS_SET DZVP-GTH
      POTENTIAL GTH-PADE-q1
    &END KIND
  &END SUBSYS
&END FORCE_EVAL
