#CPQA DEPENDS c8_broy_gapw_all.inp

&GLOBAL
  PROJECT  c8_broy_xashh_c
  PRINT_LEVEL MEDIUM
  RUN_TYPE ENERGY
  FLUSH_SHOULD_FLUSH
&END GLOBAL

&FORCE_EVAL
  METHOD QS
  &PRINT
    &FORCES ON
    &END
  &END
  &DFT
    BASIS_SET_FILE_NAME ../../../data/EMSL_BASIS_SETS
    POTENTIAL_FILE_NAME ../../../data/POTENTIAL
    RESTART_FILE_NAME  c8_broy_gapw_all-RESTART.wfn
    LSD
    &MGRID
      NGRIDS 4
      CUTOFF 100
    &END MGRID
    &QS
      METHOD GAPW
      MAP_CONSISTENT
      EXTRAPOLATION PS
      EXTRAPOLATION_ORDER 2
    &END QS
    &SCF
      SCF_GUESS RESTART
      MAX_SCF   500
      EPS_SCF 5.0e-3
      &SMEAR
        METHOD FERMI_DIRAC 
        ELECTRONIC_TEMPERATURE   500.
        FIXED_MAGNETIC_MOMENT  0.
      &END
      &MIXING
          METHOD BROYDEN_MIXING
          ALPHA   0.2
          BETA  1.0
          NBUFFER 8
      &END
      ADDED_MOS   20 20
    &END SCF
    &XC
      &XC_FUNCTIONAL PBE
      &END XC_FUNCTIONAL
    &END XC

    &XAS
      &SCF
        EPS_SCF 1.0E-1
        MAX_SCF 500
        &SMEAR ON
           METHOD FERMI_DIRAC
           ELECTRONIC_TEMPERATURE [K] 300
        &END
        &MIXING
           METHOD  BROYDEN_MIXING
           ALPHA 0.1
           BETA 1.5
           NBUFFER 8
        &END MIXING
      &END

      METHOD        TP_HH
      DIPOLE_FORM   VELOCITY
      STATE_TYPE    1s
      STATE_SEARCH  16
      ATOMS_LIST    3 4 5
      ADDED_MOS     200
      &LOCALIZE
      &END
##      RESTART
##      WFN_RESTART_FILE_NAME ./c8_broy_xashh
      &PRINT
         &PROGRAM_RUN_INFO
         &END
         &RESTART
             FILENAME ./c8_broy_xashh
             &EACH
               XAS_SCF 15
             &END
             ADD_LAST NUMERIC
         &END
         &XAS_SPECTRUM
           FILENAME ./c8_broy_xashh
         &END
         &XES_SPECTRUM
           FILENAME ./c8_broy_xashh
         &END
      &END
    &END
    &PRINT
      &MO
        &EACH
          QS_SCF 100
        &END
        EIGENVALUES
        OCCUPATION_NUMBERS
      &END
##      &MO_CUBES
##        NHOMO  64
##        NLUMO 20
##        WRITE_CUBE F
##      &END
    &END
  &END DFT

  &SUBSYS
    &CELL
       ABC   5.42858871335 5.42858871335 5.42858871335
    &END CELL

    &KIND  C
      BASIS_SET  6-31Gxx
      POTENTIAL  ALL
    &END

    &TOPOLOGY
      COORD_FILE_NAME ../sample_xyz/C_8.xyz 
      COORDINATE XYZ
      CONNECTIVITY OFF
    &END TOPOLOGY

  &END SUBSYS
&END FORCE_EVAL

