@SET BASIS_SET 3-21G*
@SET BASIS_SET_FILE EMSL_BASIS_SETS
@SET POTENTIAL_FILE POTENTIAL
&FORCE_EVAL
  METHOD QMMM
  &DFT
    BASIS_SET_FILE_NAME ${BASIS_SET_FILE}
    POTENTIAL_FILE_NAME ${POTENTIAL_FILE}
    &MGRID
      COMMENSURATE
      CUTOFF 100
    &END MGRID
    &QS
      METHOD GAPW
    &END QS
    &SCF
      IGNORE_CONVERGENCE_FAILURE
      MAX_SCF 5
    &END SCF
    &XC
      &XC_FUNCTIONAL BLYP
      &END XC_FUNCTIONAL
    &END XC
  &END DFT
  &MM
    &FORCEFIELD
      &BEND
        ATOMS H O H
        K 0.
        THETA0 1.8
      &END BEND
      &BOND
        ATOMS O H
        K 0.
        R0 1.8
      &END BOND
      &CHARGE
        ATOM O
        CHARGE -0.8476
      &END CHARGE
      &CHARGE
        ATOM H
        CHARGE 0.4238
      &END CHARGE
      &NONBONDED
        &LENNARD-JONES
          ATOMS O O
          EPSILON 78.198
          RCUT 11.4
          SIGMA 3.166
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS O H
          EPSILON 0.0
          RCUT 11.4
          SIGMA 3.6705
        &END LENNARD-JONES
        &LENNARD-JONES
          ATOMS H H
          EPSILON 0.0
          RCUT 11.4
          SIGMA 3.30523
        &END LENNARD-JONES
      &END NONBONDED
    &END FORCEFIELD
    &POISSON
      &EWALD
        ALPHA .44
        EWALD_TYPE spme
        GMAX 100
        O_SPLINE 6
      &END EWALD
    &END POISSON
  &END MM
  &PROPERTIES
    &LINRES
      MAX_ITER 5
      PRECONDITIONER FULL_ALL
      &CURRENT
        ORBITAL_CENTER ATOM
      &END CURRENT
      &LOCALIZE
        MAX_ITER 5
      &END LOCALIZE
      &NMR
      &END NMR
    &END LINRES
  &END PROPERTIES
  &QMMM
    CENTER EVERY_STEP
    ECOUPL GAUSS
    NOCOMPATIBILITY
    USE_GEEP_LIB 12
    &CELL
      ABC 5 5 5
    &END CELL
    &PERIODIC
      GMAX 0.1
      &MULTIPOLE
        EWALD_PRECISION 0.000001
        RCUT 15.0
      &END MULTIPOLE
    &END PERIODIC
    &PRINT
      &PERIODIC_INFO
      &END PERIODIC_INFO
    &END PRINT
    &QM_KIND O
      MM_INDEX 1
    &END QM_KIND
    &QM_KIND H
      MM_INDEX 2 3
    &END QM_KIND
  &END QMMM
  &SUBSYS
    &CELL
      ABC 7 7 7
    &END CELL
    &KIND H
      BASIS_SET ${BASIS_SET}
      POTENTIAL ALL
    &END KIND
    &KIND O
      BASIS_SET ${BASIS_SET}
      POTENTIAL ALL
    &END KIND
    &TOPOLOGY
      CONNECTIVITY PSF
      CONN_FILE ./w2.psf
      COORDINATE PDB
      COORD_FILE_NAME ./w2.pdb
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL

&GLOBAL
  PRINT_LEVEL LOW
  PROJECT w2_qmmm-2
  RUN_TYPE LINEAR_RESPONSE
&END GLOBAL
