# OPTIM + ORCA: minimise N2 (wB97X-D3/cc-pVDZ)

The smallest OPTIM-ORCA run: L-BFGS minimisation of N2 with ORCA energies and gradients.
Run: `sbatch job.sh` (under a minute on 2 cores). Output: `OPTIM.out`, `converged.xyz`.
Expected: CONVERGED after ~3 gradient calls; "Final energy is -109.50227566..." in OPTIM.out; r_e ~ 1.10 A.
Every line of `job.sh` and `odata` is commented. One OPTIM job: `--ntasks` = `%PAL NPROCS` (job.sh checks this).

ORCA and MPI: job.sh swaps the Open MPI 5.0.5 of module orca/6.1.1 for 4.1.7 (5.0.5 now and then segfaults inside
ORCA; the "reloaded with a version change" message in slurm-*.out is expected) and turns core binding off.
The ORCA line of odata runs `./orca_retry.sh`, which runs ORCA and reruns a failed call (up to 3 times); failures are
logged in `orca_failures/failures.log`, and job.sh prints a NOTE if that file exists. A hung call is not caught.

`expected_output/`: OPTIM.out and converged.xyz from a run of this folder (Pat, 5 Nov 2026).
