# implicit Poisson solver with spatially density dependent dielectric constant
&GLOBAL
  PROJECT     H2O_spatial_rho_dep_dielec
  RUN_TYPE    ENERGY
  PRINT_LEVEL MEDIUM
&END GLOBAL

&FORCE_EVAL
  METHOD Quickstep
  &DFT
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    &POISSON
      POISSON_SOLVER IMPLICIT
      &IMPLICIT
        BOUNDARY_CONDITIONS PERIODIC
        MAX_ITER     300
        TOL          1.0E-5
        OR_PARAMETER 1.0E-00
        &DIELECTRIC
          DIELECTRIC_FUNCTION_TYPE  spatially_rho_dependent
          DIELECTRIC_CONSTANT  5.0
          RHO_MIN    1.0E-4
          RHO_MAX    1.0E-3
          DERIVATIVE_METHOD cd5
          &DIELEC_XAA_ANNULAR
            epsilon     8.0
            X_xtnt      0.5 7.5
            base_center 4.0 4.0
            base_radii  1.5 2.0
            smoothing_width 0.5
          &END DIELEC_XAA_ANNULAR
        &END DIELECTRIC
      &END IMPLICIT
   &END POISSON
   &PRINT
      &IMPLICIT_PSOLVER
        &DIELECTRIC_CUBE off
          STRIDE 1 1 1
        &END DIELECTRIC_CUBE
      &END IMPLICIT_PSOLVER
      &V_HARTREE_CUBE off
        STRIDE 1 1 1
      &END V_HARTREE_CUBE
   &END PRINT
    &MGRID
      CUTOFF 180
      NGRIDS 4
      &RS_GRID
        DISTRIBUTION_TYPE DISTRIBUTED
      &END RS_GRID
    &END MGRID
    &QS
      EPS_DEFAULT 1.0E-10
      EPS_FILTER_MATRIX  0.1
      LS_SCF off
      &DISTRIBUTION
        BASIC_OPTIMIZATION .FALSE.
        BASIC_SPATIAL_OPTIMIZATION .TRUE.
      &END DISTRIBUTION
    &END QS
    &LS_SCF
      MAX_SCF    3
      EPS_FILTER 1.0E-7
      EPS_SCF    1.0E-7
      MU        -0.20
      MIXING_FRACTION 0.45
      S_PRECONDITIONER      NONE
      REPORT_ALL_SPARSITIES off
      PERFORM_MU_SCAN       off
      PURIFICATION_METHOD   TRS4
    &END LS_SCF
    &SCF
      SCF_GUESS ATOMIC
      MAX_SCF   3
      EPS_SCF   1.0E-4
      &OT
        MINIMIZER DIIS
        PRECONDITIONER FULL_SINGLE_INVERSE
      &END OT
      &OUTER_SCF
        MAX_SCF 3
        EPS_SCF 1.0E-4
      &END OUTER_SCF
      &PRINT
        &RESTART off
          BACKUP_COPIES 0
          &EACH
            QS_SCF 10
          &END EACH
        &END RESTART
      &END PRINT
    &END SCF
    &XC
      &XC_FUNCTIONAL PBE
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
    &CELL
      ABC 8.0 8.0 8.0
      MULTIPLE_UNIT_CELL 1 1 1
    &END CELL
    &COORD
     O         4.9999870401        4.5606769781        4.5606769833
     H         5.0000000491        4.4536015938        5.5327585878
     H         5.0000000214        5.5327585972        4.4536017371
    &END COORD
    &KIND H
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q1
    &END KIND
    &KIND O
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q6
    &END KIND
  &END SUBSYS
&END FORCE_EVAL
