@SET PROJECT hbn3_1h2o_dipcor_ff
@SET RESFILE hbn3_1h2o_dipcor_ff
@SET XYZ hbn3x_1h2o.xyz
@SET RUN  ENERGY_FORCE
@SET TIME  80000
@SET RESTART 0
@SET HESSIAN 0
@SET PROPERTIES 0
@SET GUESS ATOMIC
@SET EPSSCF 5.E-4
@SET FORCE  5.E-4
&GLOBAL
  FLUSH_SHOULD_FLUSH T
  PREFERRED_DIAG_LIBRARY ELPA
  PRINT_LEVEL LOW
  PROJECT ${PROJECT}
  RUN_TYPE ${RUN}
  WALLTIME ${TIME}
&END GLOBAL

&FORCE_EVAL
  METHOD QS
  &DFT
    BASIS_SET_FILE_NAME BASIS_MOLOPT
    POTENTIAL_FILE_NAME GTH_POTENTIALS
    RESTART_FILE_NAME ${RESFILE}-RESTART.wfn
    SURFACE_DIPOLE_CORRECTION
    SURF_DIP_DIR Z
    &MGRID
      CUTOFF 200
      NGRIDS 5
      #      REL_CUTOFF 50
    &END MGRID
    &PRINT
      &MOMENTS
      &END MOMENTS
      #       &MULLIKEN
      #          FILENAME =${PROJECT}.mulliken
      #       &END
      #       &tot_density_cube
      #         &EACH
      #          QS_SCF 0
      #         &END
      #         ADD_LAST NUMERIC
      #       &END
      &V_HARTREE_CUBE
        FILENAME =${PROJECT}_espot.cube
      &END V_HARTREE_CUBE
    &END PRINT
    &QS
      EXTRAPOLATION PS
      EXTRAPOLATION_ORDER 4
      METHOD GPW
    &END QS
    &SCF
      EPS_SCF ${EPSSCF}
      IGNORE_CONVERGENCE_FAILURE
      MAX_SCF 4
      SCF_GUESS ${GUESS}
      &OT
        LINE_SEARCH 2PNT
        MINIMIZER CG
        PRECONDITIONER FULL_SINGLE_INVERSE
      &END OT
      &OUTER_SCF OFF
        EPS_SCF ${EPSSCF}
        MAX_SCF 10
      &END OUTER_SCF
      &PRINT
        &RESTART
          ADD_LAST NUMERIC
          &EACH
            QS_SCF 50
          &END EACH
        &END RESTART
      &END PRINT
    &END SCF
    &XC
      &XC_FUNCTIONAL
        &PBE
        &END PBE
      &END XC_FUNCTIONAL
      &XC_GRID
        XC_DERIV NN50_SMOOTH
        XC_SMOOTH_RHO NN50
      &END XC_GRID
      #      &VDW_POTENTIAL
      #       POTENTIAL_TYPE NON_LOCAL
      #        &NON_LOCAL
      #          TYPE RVV10
      #          VERBOSE_OUTPUT
      #          KERNEL_FILE_NAME rVV10_kernel_table.dat
      #        &END NON_LOCAL
      #      &END VDW_POTENTIAL
    &END XC
  &END DFT
  &PRINT
    &DISTRIBUTION
    &END DISTRIBUTION
    &FORCES ON
      ADD_LAST NUMERIC
      FILENAME =${PROJECT}.forces
      &EACH
        QS_SCF 0
      &END EACH
    &END FORCES
  &END PRINT
  &SUBSYS
    &CELL
      A 7.50000 0.00000 0.00000
      B 3.75000 6.49518 0.00000
      C 0.00000 0.00000 12.0
    &END CELL
    &KIND B
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q3
    &END KIND
    &KIND N
      BASIS_SET DZVP-MOLOPT-SR-GTH
      POTENTIAL GTH-PBE-q5
    &END KIND
    &KIND H
      BASIS_SET DZVP-MOLOPT-GTH
      POTENTIAL GTH-PBE-q1
    &END KIND
    &KIND O
      BASIS_SET DZVP-MOLOPT-GTH
      POTENTIAL GTH-PBE-q6
    &END KIND
    &TOPOLOGY
      CONNECTIVITY OFF
      COORDINATE XYZ
      COORD_FILE_NAME ${XYZ}
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
