! regtesting input, needs CUTOFF 300, EPS_DEFAULT 1E-10,
!                         EPS_FILTER 1E-6, EPS_SCF 1E-7 for better setting
!
!
! use NREP=37 for >100000 particles
! use NREP=47 for >200000 particles
! use NREP=80 for >1000000 particles
@SET NREP 3
&FORCE_EVAL
  METHOD Quickstep
  &DFT
    ! LSD
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    &LS_SCF
      EPS_FILTER 1.0E-4
      EPS_SCF 1.0E-5
      MAX_SCF 4
      MU -0.1
      PERFORM_MU_SCAN OFF
      REPORT_ALL_SPARSITIES ON
      S_INVERSION SIGN_SQRT
      S_PRECONDITIONER ATOMIC
    &END LS_SCF
    &MGRID
      CUTOFF 100
      SKIP_LOAD_BALANCE_DISTRIBUTED
      &RS_GRID
        MAX_DISTRIBUTED_LEVEL 5
      &END RS_GRID
    &END MGRID
    &QS
      EPS_DEFAULT 1.0E-7
      LS_SCF
      &DISTRIBUTION
        BASIC_CLUSTER_OPTIMIZATION .TRUE.
        BASIC_OPTIMIZATION .FALSE.
      &END DISTRIBUTION
    &END QS
    &SCF
      EPS_SCF 1.0E-8
    &END SCF
    &XC
      &XC_FUNCTIONAL PADE
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
    &CELL
      ABC 4.0 3.0 3.0
      MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
    &END CELL
    &COORD
      H 0.0 0.0 0.0 H
      H 0.8 0.0 0.0 H
    &END COORD
    &KIND H
      BASIS_SET SZV-MOLOPT-GTH
      POTENTIAL GTH-PADE-q1
    &END KIND
    &TOPOLOGY
      MULTIPLE_UNIT_CELL ${NREP} ${NREP} ${NREP}
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL

&GLOBAL
  PRINT_LEVEL MEDIUM
  PROJECT H2-big-1
  RUN_TYPE ENERGY
  ! EXTENDED_FFT_LENGTHS ! enable for large systems and FFTW
  &DBCSR
    AVG_ELEMENTS_IMAGES 500
    USE_MPI_RMA T
  &END DBCSR
  ! TRACE
  ! TRACE_MASTER
  ! TRACE_MAX 1000
&END GLOBAL

&MOTION
  &MD
    ENSEMBLE NVE
    STEPS 10
    TEMPERATURE 300
    TIMESTEP 0.1
  &END MD
&END MOTION
