Orca

Orca is a free software for all types of QM calculations.
Documentation and tutorials are here: https://www.orcasoftware.de/tutorials_orca

The current version is 5.0.3.
It is installed on Aurora:
module add GCC/11.2.0  OpenMPI/4.1.1 ORCA/5.0.3-static
Then, it is run by
orca input_file >output

Avogadro is a good option to illustrate Orca output



This is a simple sample input file:

! RHF def2-SVP          # Level of theory.
! SP                             # Single-point energy calculation; it is default or
! OPT                          # Geometry optimisation

* xyz 0 1                     # Charge, and multiplicity followed by coordinates in Å (can be changed to a.u. by %coords Units bohrs)
h           1.57623125918282     -1.40098816005358      1.92944524289998
c           3.11804788185000     -1.26044723466300      3.33347664459600
h           4.63927730299500     -2.45475405971100      2.62293967273200
h           3.85126156558200      0.66329382213900      3.40150678020000
h           2.59270405690800     -1.91429242685700      5.21564372964000
*

Alternatively, internal coordinates can be used:
* int 0 2
O 0 0 0 0.0       0.0 0.0
H 1 0 0 0.9903 0.0 0.0
*

Alternatively, an xyz file can be used:
* xyzfile 0 2 hydroxide.xyz

File:
2 # number of atoms; next line blank or title

0
O 0 0 0
H 0 0 0.9903

Alternatively, an pdb file can be used:
* pdbfile 0 2 hydroxide.pdb

Input file is not case sensitive.

Constraints:
%geom
  Constraints           
   {B 0 1 1.25 C}    # Bond length constraint
   end
 end

Cartesian coordinate constraints:
%geom
  Constraints 
    { C 3 C }        # Atom 4 is fixed         
    {C 10:17 C}   # A list of atoms is also allowed
    end
  end

Note that Orca number atoms starting with 0, which may be very confusing in the beginning.

Options

Use RI and RIJCOSX (exchange)
!B3LYP def2-SVP def2/J RIJDX RIJCOSX
In fact, this is default for DFT; to turn it off, use !NORI and !NOCOSX

Dispersion correction
!D3 or !D4

I
ncrease amount printed out (e.g. to print orbitals)
!HF def2-SVP Largeprint

Frequency calculation
!FREQ
!TightOpt or !VeryTightOpt may remove imaginary freqs

Implicit solvent (COSMO is no longer any option)
!CPCM(solvent)
or
%CPCM
 EPSILON 80
 REFRAC 1.33
END
or
%CPCM SMD TRUE
 SMDSolven "solvent"
END

Relativistic corrections
!B3LYP ZORA ZORA-def2-TVP RIJDX SARC/J

DLPNO CC
!DLPNO-CCSD(T) def2-TZVPP def2-TZVPP/C

Change maximum number of geometry steps

%geom
maxiter 1              
end

Cartesian optimisation
! COpt

SCF options
%scf
MaxIter 300
CNVDIIS 1
CNVSOSCF 1
end

Level shift
%scf
 CNVShift true # default = true
 LShift 0.1 # default = 0.25
 ShiftErr 0.1 #default = 0.0
# more convenient:
 Shift Shift 0.1 ErrOff 0.1 end
end

Output options
%output
print[p_mos] true
print[p_basis] 5
end

Paralell calculations
%pal
nprocs 20               #Maximum number of cores of your machine.
end

Point charges with file reference
%pointcharges "pointcharges.pc"

File pointcharges.pc
418 # number of point charges
 0.294300             6.494988     -4.096926     -5.179739  # charge and coordinates
 0.164200             7.320798     -3.807798     -6.874823
 0.164200             6.417509     -5.943188     -4.694079
...
No special ending
Atomic units

Geometry options
%geom
 MaxIter 200
 TS_search EF
 # ! OptTs
 TolE 5e-6
 TolRMSG 1e-4
 TolMaxG 3e-4
 TolRMSD 2e-3
 TolMaxD 4e-3
 inhess GFNFF
end


%MaxCore 2000


QM/MM with Orca
Described in the Orca manual under
8.13 ORCA Multiscale Implementation

You need a prmtop file and a pdb file (and preferably a syst1 file)

1. Make an Orca input file:
!QMMM PBE0 6-31G* D3ZERO

%qmmm
    ORCAFFFilename   "prmtop3.ORCAFF.prms"
    QMAtoms          { 0:33 
                       642:653
                       2238:2239
                       2248:2275
                       4716:4718 } end
    ActiveAtoms      { 0:33 
                       642:653
                       2238:2239
                       2248:2275
                       4716:4718 } end
end

*pdbfile 0 1 pdb3.pdb

Made from the syst1 file, but renumbering to start on 0, changing "-" to ":" and removing link atoms.

2. Convert prmtop file to Orca format
orca_mm -convff -AMBER prmtop
Gives you the file prmtop3.ORCAFF.prms

3. Finally start Orca with
orca orca.in >orca.out

This does additive QM/MM and electrostatic embedding.
You may change the charges around the junction atoms (p. 375). Orca implements the Charge Shift (CS; default), Redistributed charge and dipole (RCD), as well as the Z0, Z1, Z2 and Z3 methods.
%qmmm
   chargeAlgeration RCD
end

4. Output:
FINAL SINGLE POINT ENERGY (MM)      -32.522715848742
FINAL SINGLE POINT ENERGY     -2474.898029955347
FINAL SINGLE POINT ENERGY (QM/MM)    -2507.420745804089


Useful greps
# Greps for all occurrences of convergence parameters in ORCA as they're displayed after each geom opt step
grep -A8 "Geometry convergence"

grep "   MAX gradient"

grep "ENERGY (QM/MM)" $1 | tail -n 1 ;

neb_energies() {
        # Gets the energies of the last step of an ORCA .NEB.log file and creates a temporary path vs energy file.
        # $1: file to grep for QM/MM energies
        tail -n 30 $1 | grep energy | tail -n 1 | sed 's/energy          : //g'| tr -s ' ' '\n' > energies ;
        tail -n 30 $1 | grep distance $1 | tail -n 1 | sed "s/distance        :   //g" | tr -s ' ' '\n' > abscissa ;
        paste abscissa energies > tmp_path_energies ;
        rm -fr abscissa energies ;
}