! OPTIM input. A line whose first word is "!" is a comment ("!" must be followed by a space).
! Keep comments on their own lines, and none after POINTS (the coordinates).

! Used by PATHSAMPLE CHECKTS: it copies this file to odata.<n> and adds each TS's coordinates after
! POINTS. Each OPTIM job re-converges one TS and follows its path down both sides.
! compare structures allowing identical atoms to be relabelled (all six atoms are N)
PERMDIST

! --- transition-state search: hybrid eigenvector-following (uphill along the lowest mode,
!     L-BFGS downhill in all other directions). No Hessian: ORCA has no cheap analytic one ---
! 100 = max iterations to find the lowest eigenvector; 5 / 15 = tangent-space L-BFGS steps per cycle
! (15 once the eigenvector has settled); 0.01 = eigenvector converged when its RMS change < 0.01;
! 100 = max iterations for the largest-eigenvalue estimate
BFGSTS 100 5 15 0.01 100
! the eigenvalue must also change by < 1 % in the last two iterations (smaller values are noise-limited)
BFGSTSPC 1.0
! finite-difference displacement for curvatures (1e-3 default is for force fields; too small = noise)
SECDIFF 0.01
! never build a Hessian; curvature by finite differences of gradients
NOHESS
! curvature by forward differences (1 extra gradient instead of 2)
USEDIAG 3
! at most this many eigenvector-following steps
STEPS 1000
! TS converged when the EF step < 0.01 and the RMS gradient < 1e-5 (and exactly one negative eigenvalue)
CONVERGE 0.01 1.0D-5
! uphill step along the eigenvector: start 0.2, trust radius 0.2, allowed range 0.005 - 0.3
MAXSTEP  0.2
TRAD     0.2
MAXMAX   0.3
MINMAX   0.005

! --- L-BFGS minimiser (used for minimisations and for the path descents) ---
! converged when the RMS gradient < 1e-5 (DFT grid/SCF noise ~1e-6 Eh makes 1e-6 unreachable)
BFGSMIN 1.0D-5
! at most this many L-BFGS steps
BFGSSTEPS 3000
! L-BFGS memory: main minimiser, tangent space, eigenvector search, NEB
UPDATES 500 100 5 5
! reject a step if the energy rises by > 1e-5 Eh (0.4 = the same for the eigenvector minimiser)
MAXERISE 1.0D-5 0.4D0

! largest L-BFGS step in the path descents 0.05 A; 0.1 in the tangent-space minimiser
MAXBFGS  0.05 0.1

! two structures are "the same" if their energies differ by < 1e-5 Eh and the best-aligned distance < 0.3 A
EDIFFTOL 1.0D-5
GEOMDIFFTOL 0.3D0

! --- path from the TS: push off by 0.2 along +/- the eigenvector (adjusted until the energy drops by
!     > 1e-4, at most 100 tries), then minimise down both sides ---
PUSHOPT 0.2 0.0001 100
! write the path: 1000 frames in path.xyz, -1.0 = no energy filter on the frames
PATH 1000 -1.0
! write every min-TS-min triple to path.info (the file PATHSAMPLE reads)
DUMPALLPATHS

! no normal-mode frequencies at the end (a Hessian would cost ~2 x 3N gradients)
NOFRQS
! spherical container of radius 2000 Angstrom: in effect off
RADIUS 2000.0
! ORCA as the potential: charge 0, multiplicity 1, then the program OPTIM runs for each ORCA call:
! orca_retry.sh (./orca_retry.sh: COPYFILES in pathdata puts a copy in every OPTIM job folder), which runs ORCA and reruns a failed call; method in ORCA.template
! ORCA 0 1 ./orca_retry.sh
! trust mpi for the example!
ORCA 0 1 /usr/local/chemistry/orca/6.1.1/orca

POINTS
