&GLOBAL
  PRINT_LEVEL LOW
  PROJECT almo-doublet-no-charge
  RUN_TYPE ENERGY
&END GLOBAL

&FORCE_EVAL
  METHOD QS
  &DFT
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    CHARGE 0
    MULTIPLICITY 2
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    UKS
    &ALMO_SCF
      ALMO_ALGORITHM PCG
      ALMO_SCF_GUESS MOLECULAR
      DELOCALIZE_METHOD NONE
      EPS_FILTER 1.0E-6  ! 1.0E-8
      RETURN_ORTHOGONALIZED_MOS
      &ALMO_OPTIMIZER_PCG
        CONJUGATOR POLAK_RIBIERE
        EPS_ERROR 5.0E-3
        LIN_SEARCH_EPS_ERROR 0.05
        LIN_SEARCH_STEP_SIZE_GUESS 0.1
        MAX_ITER 50
        MAX_ITER_OUTER_LOOP 5
        PRECONDITIONER DEFAULT
      &END ALMO_OPTIMIZER_PCG
      &ANALYSIS T
        FROZEN_MO_ENERGY_TERM SUBLATTICE
        &PRINT
          &ALMO_CTA
            FILENAME charge_terms
          &END ALMO_CTA
          &ALMO_EDA_CT
            FILENAME ct_energy_terms
          &END ALMO_EDA_CT
        &END PRINT
      &END ANALYSIS
      &FRAGMENT 1
        CHARGE 0
        MULTIPLICITY 2
      &END FRAGMENT
      &FRAGMENT 2
        CHARGE 0
        MULTIPLICITY 1
      &END FRAGMENT
    &END ALMO_SCF
    &MGRID
      COMMENSURATE
      CUTOFF 200
      NGRIDS 1
      REL_CUTOFF 10.
    &END MGRID
    &QS
      ALMO_SCF T
      EPS_DEFAULT 1.0E-6  ! 1.0E-8
    &END QS
    &SCF
      MAX_SCF 300
      SCF_GUESS ATOMIC
      &OT
        MINIMIZER CG
        PRECONDITIONER FULL_ALL
      &END OT
      &OUTER_SCF  ! repeat the inner SCF cycle 10 times
        EPS_SCF 5.0E-5  ! must match the above
        MAX_SCF 100
      &END OUTER_SCF
    &END SCF
    &XC
      &XC_FUNCTIONAL NO_SHORTCUT
        &PBE T
        &END PBE
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &SUBSYS
    &CELL
      ABC [angstrom] 4.5198722000 7.8286483000 7.3588725000
      ALPHA_BETA_GAMMA [deg] 90.0000 90.000 90.0000
      PERIODIC XYZ
    &END CELL
    &COORD
      O          3.14333        0.47930        0.49934 cluster 1
      H          2.67181        0.90972        1.25626 cluster 1
      O         -0.60361        5.43039        4.66859 environment 2
      H         -1.20708        4.93582        4.05848 environment 2
      H         -0.30501        6.21348        4.14126 environment 2
    &END COORD
    &KIND H
      BASIS_SET SZV-MOLOPT-GTH
      POTENTIAL GTH-PBE-q1
    &END KIND
    &KIND O
      BASIS_SET SZV-MOLOPT-GTH
      POTENTIAL GTH-PBE-q6
    &END KIND
    &TOPOLOGY
      CONNECTIVITY USER
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
