@SET NREP 1
@SET DO_PEXSI .TRUE.

&GLOBAL
  PROJECT C_8
  PRINT_LEVEL MEDIUM
  RUN_TYPE ENERGY
&END GLOBAL
&FORCE_EVAL
  METHOD QS
  &DFT
    BASIS_SET_FILE_NAME GTH_BASIS_SETS
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    &MGRID
      NGRIDS 4
      CUTOFF 200
    &END MGRID
    &QS
      METHOD GPW
      EPS_PGF_ORB 1.0E-9
      LS_SCF ${DO_PEXSI}
    &END QS
    &LS_SCF
      MAX_SCF 50
      EPS_SCF 1.0e-8
      EPS_FILTER 1.0E-9
      MIXING_FRACTION 0.4
      S_PRECONDITIONER NONE
      REPORT_ALL_SPARSITIES OFF
      PERFORM_MU_SCAN OFF
      PURIFICATION_METHOD PEXSI
      &RHO_MIXING
        METHOD BROYDEN_MIXING
        ALPHA 0.4
        NBUFFER 8
        !NSKIP 2
        !N_SIMPLE_MIX 4
      &END RHO_MIXING
      &PEXSI
         NUM_POLE 50
         MAX_PEXSI_ITER 5
         TEMPERATURE [K] 5000.
         NUM_ELECTRON_PEXSI_TOLERANCE 0.0001
         VERBOSITY BASIC
         MIN_RANKS_PER_POLE 0
         NP_SYMB_FACT 1
      &END PEXSI
    &END LS_SCF
    &SCF
      EPS_DIIS 0.1
      MAX_DIIS 4
      SCF_GUESS ATOMIC
      ADDED_MOS 100
      MAX_SCF   50
      EPS_SCF   1.0e-7
      &SMEAR
        METHOD FERMI_DIRAC
        ELECTRONIC_TEMPERATURE [K] 5000.
      &END
      &MIXING
        METHOD BROYDEN_MIXING
        ALPHA 0.4
        NBUFFER 8
        !NSKIP 2
        !N_SIMPLE_MIX 4
      &END
    &END SCF
    &XC
      &XC_FUNCTIONAL PADE
      &END XC_FUNCTIONAL
    &END XC
    &PRINT
      &MO
        &EACH
          QS_SCF 100
        &END
        EIGENVALUES
        OCCUPATION_NUMBERS
      &END
    &END
  &END DFT
  &SUBSYS
    &CELL
       ABC   5.42858871335 5.42858871335 5.42858871335
       MULTIPLE_UNIT_CELL ${NREP} ${NREP} 1
    &END CELL
    &KIND  C
      BASIS_SET  DZVP-GTH
      POTENTIAL  GTH-PBE-q4
    &END
    &TOPOLOGY
      COORD_FILE_NAME ../sample_xyz/C_8.xyz
      COORDINATE XYZ
      CONNECTIVITY OFF
      MULTIPLE_UNIT_CELL ${NREP} ${NREP} 1
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
