! 12.2017 major bug fix. removed wrong cycle that was caussing segfault and
!         added check on intergral (incore and disk) counts. [Tobias Binninger + Valery Weber]
!         see https://groups.google.com/forum/#!topic/cp2k/pc6B14XOALY
!
! Warning: the segfault easily disappears with little modification (cell size, atomic positions, BS, ...).
!
&GLOBAL
  PRINT_LEVEL LOW
  PROJECT_NAME NaFeO2
  RUN_TYPE ENERGY
&END GLOBAL

&FORCE_EVAL
  METHOD QS
  &DFT
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    BASIS_SET_FILE_NAME BASIS_ADMM_lite
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    &AUXILIARY_DENSITY_MATRIX_METHOD
      ADMM_PURIFICATION_METHOD MO_DIAG
      METHOD BASIS_PROJECTION
    &END AUXILIARY_DENSITY_MATRIX_METHOD
    &MGRID
      CUTOFF 1.00E+02
    &END MGRID
    &QS
      EPS_DEFAULT 1.0E-8
    &END QS
    &SCF
      EPS_SCF 1.0E-06
      MAX_SCF 2
      &OT T
        ALGORITHM IRAC
        ENERGY_GAP 1.0E-01
        PRECONDITIONER FULL_ALL
      &END OT
    &END SCF
    &XC
      &HF
        FRACTION 0.25
        &INTERACTION_POTENTIAL
          CUTOFF_RADIUS 2.0
          POTENTIAL_TYPE TRUNCATED
          T_C_G_DATA t_c_g.dat
        &END INTERACTION_POTENTIAL
        &MEMORY
          EPS_STORAGE_SCALING 0.1
          MAX_MEMORY 1
        &END MEMORY
        &SCREENING
          EPS_SCHWARZ 1.0E-2
          EPS_SCHWARZ_FORCES 1.0E-2
          SCREEN_ON_INITIAL_P T
          SCREEN_P_FORCES T
        &END SCREENING
      &END HF
      &XC_FUNCTIONAL
        &PBE
          SCALE_C 1.0
          SCALE_X 0.75
        &END PBE
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
    &CELL
      A 5.5 0.0 0.0
      B 0.0 5.7 0.0
      C 0.0 0.0 7.1
    &END CELL
    &COORD
      Fe    0.0000000000000000E+00    0.0000000000000000E+00    0.0000000000000000E+00
      Fe    2.6945510356950164E+00    2.1093382598543182E+00    3.5672320716005652E+00
      Na    2.6407618353100051E+00    2.0342158468069704E+00   -2.3944311803165301E-02
      Na   -1.1141631424880116E-01    8.5248198749385246E-02    3.5276990471810978E+00
      O    1.7820335386425468E+00   -1.5033613479947458E-01    6.8220535199059515E+00
      O    4.5320148015026831E+00   -6.2171301952756242E-01    5.6073007758480786E+00
    &END COORD
    &KIND Fe
      BASIS_SET SZV-MOLOPT-SR-GTH
      BASIS_SET AUX_FIT cFIT13_lite
      POTENTIAL GTH-PBE-q16
    &END KIND
    &KIND Na
      BASIS_SET SZV-MOLOPT-SR-GTH
      BASIS_SET AUX_FIT cFIT3_lite
      POTENTIAL GTH-PBE-q9
    &END KIND
    &KIND O
      BASIS_SET SZV-MOLOPT-SR-GTH
      BASIS_SET AUX_FIT cFIT3_lite
      POTENTIAL GTH-PBE-q6
    &END KIND
  &END SUBSYS
&END FORCE_EVAL
