&GLOBAL
  FLUSH_SHOULD_FLUSH
  PRINT_LEVEL low
  PROJECT cell_opt_direct_cg_gold
  RUN_TYPE cell_opt
  WALLTIME 600
&END GLOBAL

&MOTION
  &CELL_OPT
    EXTERNAL_PRESSURE [bar] 0.0
    KEEP_ANGLES no
    MAX_DR 0.001
    MAX_FORCE 0.0001
    MAX_ITER 200
    OPTIMIZER CG
    PRESSURE_TOLERANCE [bar] 1.0
    RMS_DR 0.0003
    RMS_FORCE 0.00003
    &CG
      &LINE_SEARCH
        TYPE gold
      &END LINE_SEARCH
    &END CG
    &PRINT
      &CELL
        &EACH
          GEO_OPT 1
          MD 1
        &END EACH
      &END CELL
    &END PRINT
  &END CELL_OPT
  &PRINT
    &CELL off
      &EACH
        MD 1
      &END EACH
    &END CELL
    &RESTART off
      ADD_LAST NUMERIC
      BACKUP_COPIES 0
      &EACH
        MD 10
      &END EACH
    &END RESTART
    &RESTART_HISTORY off
    &END RESTART_HISTORY
    &STRESS
      &EACH
        MD 1
      &END EACH
    &END STRESS
    &TRAJECTORY
      &EACH
        MD 1
      &END EACH
    &END TRAJECTORY
    &VELOCITIES off
      &EACH
        MD 1
      &END EACH
    &END VELOCITIES
  &END PRINT
&END MOTION

&FORCE_EVAL
  METHOD Fist
  STRESS_TENSOR ANALYTICAL
  &MM
    &FORCEFIELD
      &CHARGE
        ATOM Cr
        CHARGE +3.0
      &END CHARGE
      &CHARGE
        ATOM O
        CHARGE -2.0
      &END CHARGE
      &NONBONDED
        &BUCK4RANGES
          A [eV] 11272.6
          ATOMS O O
          B [angstrom^-1] 1/0.1363
          C [eV*angstrom^6] 134.0
          R1 [angstrom] 1.2
          R2 [angstrom] 2.1
          R3 [angstrom] 2.6
          RCUT [angstrom] 10.4
        &END BUCK4RANGES
        &WILLIAMS
          A [eV] 1204.18
          ATOMS O Cr
          B [angstrom^-1] 1/0.3165
          C [eV*angstrom^6] 0.0
          RCUT [angstrom] 10.4
        &END WILLIAMS
        &WILLIAMS
          A [eV] 0.0
          ATOMS Cr Cr
          B [angstrom^-1] 0.0
          C [eV*angstrom^6] 0.0
          RCUT [angstrom] 10.4
        &END WILLIAMS
      &END NONBONDED
      &SPLINE
        EMAX_ACCURACY [hartree] 0.02
        EMAX_SPLINE [hartree] 1.0E4
        EPS_SPLINE [hartree] 1.0E-7
        R0_NB [angstrom] 0.1
      &END SPLINE
    &END FORCEFIELD
    &POISSON
      &EWALD
        ALPHA [angstrom^-1] 0.35
        EWALD_TYPE spme
        GMAX 32 32 32
        &RS_GRID
          DISTRIBUTION_TYPE automatic
        &END RS_GRID
      &END EWALD
    &END POISSON
    &PRINT
      &FF_INFO OFF
        SPLINE_DATA
        SPLINE_INFO
      &END FF_INFO
    &END PRINT
  &END MM
  &PRINT
    &FORCES off
    &END FORCES
    &GRID_INFORMATION
    &END GRID_INFORMATION
    &PROGRAM_RUN_INFO
      &EACH
        GEO_OPT 1
      &END EACH
    &END PROGRAM_RUN_INFO
    &STRESS_TENSOR
      &EACH
        GEO_OPT 1
      &END EACH
    &END STRESS_TENSOR
  &END PRINT
  &SUBSYS
    &CELL
      A 4.95100000 0.00000000 0.00000000
      B 2.47550000 4.28769177 0.00000000
      C 0.00000000 0.00000000 13.56560000
    &END CELL
    &COORD
      SCALED
      Cr      0.000000    0.000000    0.152340  Cr2O3  1
      Cr      0.000000    0.000000    0.347660  Cr2O3  1
      Cr      0.000000    0.000000    0.652340  Cr2O3  1
      Cr      0.000000    0.000000    0.847660  Cr2O3  1
      Cr      0.333333    0.333333    0.014327  Cr2O3  1
      Cr      0.333333    0.333333    0.319007  Cr2O3  1
      Cr      0.333333    0.333333    0.514327  Cr2O3  1
      Cr      0.333333    0.333333    0.819007  Cr2O3  1
      Cr      0.666667    0.666667    0.180993  Cr2O3  1
      Cr      0.666667    0.666667    0.485673  Cr2O3  1
      Cr      0.666667    0.666667    0.680993  Cr2O3  1
      Cr      0.666667    0.666667    0.985673  Cr2O3  1
      O       0.305100    0.000000    0.083333  Cr2O3  1
      O       0.000000    0.694900    0.083333  Cr2O3  1
      O       0.694900    0.305100    0.083333  Cr2O3  1
      O       0.000000    0.305100    0.250000  Cr2O3  1
      O       0.694900    0.000000    0.250000  Cr2O3  1
      O       0.305100    0.694900    0.250000  Cr2O3  1
      O       0.305100    0.000000    0.416667  Cr2O3  1
      O       0.000000    0.694900    0.416667  Cr2O3  1
      O       0.694900    0.305100    0.416667  Cr2O3  1
      O       0.000000    0.305100    0.583333  Cr2O3  1
      O       0.694900    0.000000    0.583333  Cr2O3  1
      O       0.305100    0.694900    0.583333  Cr2O3  1
      O       0.305100    0.000000    0.750000  Cr2O3  1
      O       0.000000    0.694900    0.750000  Cr2O3  1
      O       0.694900    0.305100    0.750000  Cr2O3  1
      O       0.000000    0.305100    0.916667  Cr2O3  1
      O       0.694900    0.000000    0.916667  Cr2O3  1
      O       0.305100    0.694900    0.916667  Cr2O3  1
    &END COORD
    &PRINT
      &CELL
      &END CELL
      &KINDS
      &END KINDS
      &MOLECULES OFF
      &END MOLECULES
      &SYMMETRY
      &END SYMMETRY
    &END PRINT
    &TOPOLOGY
      CONNECTIVITY off
    &END TOPOLOGY
  &END SUBSYS
&END FORCE_EVAL
