! -*- cp2k -*-
@SET SCF_CONV   1.0E-8
@SET CUTOFF        500
@SET FUNCTIONAL    PBE 
@SET DECOUPLING     MT
@SET CHARGE          1

&FORCE_EVAL
  &PRINT
    &FORCES OFF
    &END
  &END

  METHOD QS

  &DFT
    CHARGE ${CHARGE}
    &MGRID
      CUTOFF ${CUTOFF}
      NGRIDS 5
    &END MGRID
    &QS
      EPS_DEFAULT 1.0E-12
    &END QS
    &SCF
      SCF_GUESS RESTART 
      EPS_SCF       ${SCF_CONV}
      MAX_SCF      30
      &PRINT
        &RESTART 
          LOG_PRINT_KEY T
          FILENAME =./WFN_restart-1.wfn
          &EACH 
            QS_SCF  0
          &END EACH
          ADD_LAST NUMERIC
          COMMON_ITERATION_LEVELS 1
        &END RESTART
      &END PRINT
      &OT ON
        MINIMIZER DIIS
           ! MINIMIZER CG
           ! PRECONDITIONER FULL_ALL
           ! PRECONDITIONER FULL_KINETIC
        PRECONDITIONER FULL_SINGLE_INVERSE
           !ENERGY_GAP  0.001
      &END OT
      &OUTER_SCF
        EPS_SCF ${SCF_CONV}
        MAX_SCF 5
      &END OUTER_SCF
    &END SCF
    &XC
      &XC_FUNCTIONAL ${FUNCTIONAL}
      &END XC_FUNCTIONAL
    &END XC
@IF ( ${DECOUPLING} == NONE )
    &POISSON
    &END
@ENDIF
@IF ( ${DECOUPLING} == MT )
    &POISSON
       POISSON_SOLVER MT
       PERIODIC NONE
       &MT
       &END
    &END
@ENDIF
@IF ( ${DECOUPLING} == WAVELET )
    &POISSON
       POISSON_SOLVER WAVELET
       PERIODIC NONE
       &WAVELET
         SCF_TYPE 60
       &END
    &END
@ENDIF
  &END DFT
  
  ! Include subsys
@INCLUDE 'subsys.inc'
&END FORCE_EVAL
