CSC Spring School 2018

Orca 4.0 & Gabedit

Michael Patzschke Institute for Resource Ecology HZDR

14.03.2018

Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de HZDR: Aerial View

Photo: Jürgen-M. Schulter / dresden-luftfoto.de

Page 2 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Non-university public research in Germany • Research organizations • co-funded by Federal government & Federal state governments

• 18 independent research centers • co-funded by Federal government (90%) & Federal state governments (10%)

• Budget (2013): ~3.6 billion € (>30%: third party funding) • ~ 36,000 employees (~12,200 scientists) • Program-oriented research: Energy, Earth and Environment, Health, Aeronautics, Space and Transport, Key Technologies, plus Structure of Matter

Page 3 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Outline Research at HZDR 1,000 HZDR employees conduct research in the sectors Energy, Health and Matter.

• How can energy and resources be utilized in an efficient, safe, and sustainable way? • How can malignant tumors be more precisely visualized, characterized, and more effectively treated? • How do matter and materials behave under the influence of strong fields and in smallest dimensions?

• 8 institutes & 1 dept. of research technology

Page 4 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de OutlineResearch at the Institute of Resource Ecology

… protect humans and the environment from hazards caused by pollutants resulting from technical processes that produce energy and raw materials.

• Ecological risks of radioactive and non-radioactive metals in the context of nuclear waste disposal, the production of energy in nuclear power plants and in processes along the value chain of metalliferous raw materials • Topics: • Long-lived radionuclides in disposal sites and biological systems • Nuclear Reactor Safety • Particle-mediated transport in geosystems • Basic actinide-chemistry research

Page 5 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Input File Distribution

• Updated today • All orca inputs from the slides are available and checked to run with orca 4.0 • Important changes in basis set nomenclature from version 3.0 • For gabedit versions prior to 2.5.0 the following changes have to be made manually • Please replace: DEF2-SVP/J DEF2/J For RIDFT, RIJONX and RIJCOSX ZORA DEF2-SVP ZORA ZORA-DEF2-SVP For elements up to Kr ZORA DEF2-TZVPP ZORA SARC-ZORA-TZVPP For elements heavier than Kr ECP{def2-SVP} def2-ECP All ECP{} deprecated • Please keep: DEF2-SVP/C For MP2, DLPNO-CCSD(T) … • Please use: DEF2-SVP/JK For NEVPT2 with RIJCOSX or RIJK SARC/J For RIDFT with SARC basis

Page 6 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de The Codes

• Orca – general purpose QC code – Free (download from http://cec.mpg.de/forum/) – Developed by F.Neese et al. in C++ – Precompiled binaries (no sources) • Gabedit – Free (download from https://sites.google.com/site/allouchear/Home/gabedit/download) – Developed by A.-R. Allouche – Sources and Binaries available • Both codes available for Mac, Linux & Windows – Good combination for research & teaching

Page 7 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Learning Outcome

• Draw and import molecular structure • Pre-optimization • Creating input files using the GUI • Writing simple input files • Comparing QC methods (quality and timing) • Running constraint optimizations • Relativistic effect • Visualizing results

Page 8 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Gabedit

• Assuming you have the gabedit executable in your $PATH • Please open a terminal: mkdir qc_lab cd qc_lab gabedit • Have a look around • Open the structure editor

Page 9 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Editing Structures

• Press the pen tool to add atoms • Press the periodic-table button to change the atom (C is standard) • Press the button below that to toggle adding hydrogens • Pre-optimizing self-drawn structures – Important for speedup of real calculations – Avoid for transition metals, lanthanides & actinides – Two methods available: MM or semiempirical calculations • Press “M” button or right-click in drawing window – Choose “Molecular Mechanics” “Optimization”

Page 10 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Editing Structures – Further Points

• Fragments can be used to draw structures • Parts of the molecule can be selected • Atoms and parts of the molecule can be removed • And moved

• Structural parameters can be measured and changed • Measurements can be shown or removed

• For Semi-empirical methods: – Interface to Mopac, Orca & Firefly

Page 11 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Drawing Formaldehyde

• Please try to draw formaldehyde – “Menu-Edit-Delete Molecule” – Add Carbon – Choose Oxygen from periodic table – Replace one hydrogen – Click on the bond to make double bond – Pre optimize using MM

• The result should look like this

• Close the drawing window (“Menu-Close”) (saving possible – not necessary here)

Page 12 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Setting up an Orca calculation

• Gabedit generates input for different QC codes • Choose Orca from the top menu

• The pop-up menu lets you set up the calculation • Change “Job Type” to “Equilibrium Structure Search” • Change “Type of method” to “Meta-GGA and hybrid meta GGA's” • Change “Method” to “TPSS” • Change “Type” to “def2 Ahlrichs basis sets”

Page 13 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Setting up an Orca calculation

• “Basis” will change, leave that choice

• Press “Ok”

Page 14 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Orca Input Files

• Inspect the generated input file # Lines are comments ! Lines contain keywords % Lines start key blocks end lines end key blocks * starts and ends the geometry block • Comments can be inserted like this: ! Opt # this will be ignored # TPSS

• The “output” block is added by gabedit for visualisation, but not necessary

• The “geom” block is wrong (more later) Please remove it!

Page 15 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Running Orca

• Input files can be saved (“File” menu)

• QC codes can be run by Gabedit – Set up run commands in “Settings”-“Preferences” on the “Commands” tab

– Press cogwheels to start a job – Choose “Orca” – Press “Ok” – Click on “NoName.out” tab to see the output

Page 16 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Interlude

• Congratulations, you have hopefully just run your Orca calculation • A few considerations: – Gabedit is useful for drawing simple structures many alternatives exist (have a look at ) – Good to remember basic input file structure – Excellent for visualizing results – The input file can be changed in gabedit – A simple text editor might be easier to use ... • We will visualize the results • Then an editor will be used to set up some more advanced calculations

Page 17 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Looking at Results

• During a run you can – Look at the output file – Update it – Look at geometry convergence – Visualize MO's & Densities from the first step of the calculation – Get data from remote calculations

• After the calculation has finished, press the visualize button

Page 18 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Visualizing Orbitals

• In the window click “M” or right-click • Choose “Orbitals” from the menu • Choose “Orca output file” • Read the “NoName.out” file • An MO selection should appear – Select an orbital – The right part shows its participating AO’s – Change cut-off value here – Click “Ok”

Page 19 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Visualising Orbitals

• Orbitals are calculated in a cube – Select position here – Select size here – Select quality here – Standard choices are ok – Press “Ok”

• After the calculation is finished you can – Change the iso-value – 0.1 should be a good choice – Get a proposition for a certain size – Press “Ok”

Page 20 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Other Things to Visualise

• Take a few moments to look around the menu (“M” or right-click”)

• Geometry optimizations can be visualized from the .trj files • Choose “Animation” and load the .trj file • Press “Play”

• A movie can be made for presentation purposes (using ImageMagick)

Page 21 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Orca Input Help

• Have the orca manual ready (827 pages including theory...) Actually a rather useful textbook as well

• Have a look at https://sites.google.com/site/orcainputlibrary/home – a very good input library

• Under http://cec.mpg.de/forum/ you can join the forum – Very active, fast help – Please read the manual and consult the forum before complaining!

Page 22 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de More Advanced Calculations

• Close gabedit (Press “File”-“Exit” from the main window) • Open your input file using your favourite editor • Edit it to look like this: !Opt TPSS Def2-SV(P) • Change the functional * xyz 0 1 C -1.182146 -0.191818 -11.887076 – For a list see next page H -1.567738 0.546391 -12.590258 H -1.864597 -0.714867 -11.217165 • Change the basis set O 0.022990 -0.429026 -11.844415 – For a list see further down * • Save the input file under a new name • Start orca by issuing at the prompt: “orca filename.inp > filename.out &”

Page 23 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Orca – List of DFT functionals

• Available functionals • Double hybrids are available (MP2 calculation will be performed!) • DFT tries to use the RI approach automatically (NORI to witch of) • Dispersion correction with keyword D3 • Orca 4.0 adds the following range- separated functionals: wB97 , wB97X, B97X , wB97X-D3 , CAM-B3LYP , LC-BLYP

Page 24 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Basis Sets in Orca

• Many different basis sets available some examples: – Ahlrich's good for DFT – Dunning's good for CC – Basis set can be changed for an element: %basis newgto Element "def2-TZVPP” # Specifying the basis set on "Element” end end

• Or for a specific atom in the geometry section: H 0.0 0.0 1.0 newgto "def2-TZVP" end

• To try MP2 use the following line: !Opt RI-MP2 def2-TZVPP def2/J def2-TZVPP/C TightSCF RIJCOSX

• For test purposes here you might want to replace TZVPP by SVP

Page 25 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de RI for HF and Hybrid DFT Nelec Nelec Nelec • Energy expression in WF theory: E = V + h + (J K ) nn i ij ij i=1 i=1 j>i X X X

EDFT = TS[⇢]+Ene[⇢]+J[⇢]+EXC[⇢] • Energy expression in DFT: E [⇢]=(T [⇢] T [⇢]) + (E [⇢] J[⇢]) XC S ee • Both contain a coulomb part (J) and an exchange part (K) • Approximative treatments for these exist for pure functionals (no exact exchange) simple RI is used • For HF three approximation exist: 1. RI for J and K – hard to get to high accuracy 2. RI for J exact treatment for K good for large molecules as K scales linearily 3. Special approximative treatment for J and K • All three need auxiliary basis sets and have different names 1. Do not use! 2. RIJONX with “basis-set”/J 3. RIJCOSX with “basis-set”/J

Page 26 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Your Task – Just an Idea

• Make a small table for the C-O bond length of formaldehyde and computational timings using two or three different methods and two or three different basis sets • Run calculations, fill in the table and compare with experimental data

SVP TZVPP QZVPP Exp r(CO) = r(CO) = r(CO) = BP86 t = t = t = r(CO) = r(CO) = r(CO) = TPSS t = t = t = r(CO) = r(CO) = r(CO) = r(CO) = PBE0 t = t = t = 120.5 pm r(CO) = r(CO) = r(CO) = HF t = t = t = r(CO) = r(CO) = r(CO) = MP2 t = t = t =

Page 27 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Remarks on the Task

• The table is a suggestion only • To run HF simply do: ! Opt def2-SVP

• MP2 TZVPP took 30 s on my laptop • MP2 QZVPP should be feasible • If you want to have fun, try: !Opt def2-TZVPP def2/J def2-TZVPP/C TightSCF RIJCOSX !DLPNO-CCSD(T) NumGrad %maxcore 2000

– This does a numerical CCSD(T) optimisation – Needs a lot of memory – Useful for optimising certain structural parameters (constraint search)

Page 28 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Geometry Specification • Defining charge and multiplicity – first line of geometry block: * int 0 1 first word = form of geometry data (xyz, int or gzmt) first number = charge, second number = multiplicity (1 for singlet, 2 for doublet) • or reading an external file with: * xyzfile 1 2 filename.xyz • One can add dummies (DA), ghosts (Mg:), point charges (Qn.nn) (furthermore isotopes, emebedding potentials and fragments)

• Orca does not use symmetry to speed up calculations – Symmetry can be used to classify MO’s – To do this, add the keyword “UseSym”

• To run orca in parallel add the keyword “PalN” where N is the number of cores • Alternatively use the block: %pal nprocs 4 # any number (posive integer) end • Do not use more than 16 cores • Start orca with the full path to the executable, even if the directory is in your $PATH

Page 29 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Properties: IR & Thermochemistry

• Vibrational frequencies are available for HF, MP2, GGA and hybrid GGA functionals through: !Opt Freq • Speedup through much memory, give per core with the extra line: %maxcore 1000 • For all other methods numerical frequencies possible: !Opt NumFreq • Using at least ’TightSCF’ is recommended for frequency runs • Thermochemistry for different temperatures with: %freq Temp 290, 295, 300 end • Many other properties available – electronic absorption, – NMR – ESR

Page 30 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Solvent Effects

• Solvent effects on structures and frequencies through CPCM • CPCM or SMD, – in command line for CPCM: ! CPCM(solvent) – Or in case you need COSMO: ! CPCMC(solvent) – As input block for SMD: ! CPCM(solvent %cpcm smd true solvent “solvent” end

• SMD (solvent model density) is recommended • A list of available solvents (179 different solvents) can be found on the manual pages 680-681

Page 31 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Relativity

• Two ways to include scalar relativistic effects (SO only in multi-reference calc.): • For elements heavier than Kr one can include ECP’s with: ! BP def2-SVP def2/J def2-ECP printbasis where printbasis prints the basis, in order to check that ECP and basis set fit (this is not so important in orca 4.0 as ECP and basis are defined in two steps) • Other choices for ECP exist for example def-SD or SDD for actinides (see manual pp.31) • All electron ZORA or DKH2 calculations: ! BP86 ZORA ZORA-def2-SVP def2/J TIGHTSCF printbasis ! BP86 DKH2 DKH-def2-SVP def2/J TIGHTSCF printbasis • For SARC basis sets the auxilliary J sets are called SARC/J • Defining a special basis set requires: U 0.0 0.0 1.0 newgto ”SARC-ZORA-TZVP" end Useful for combining SARC with ZORA-def2 basis sets • If there is no auxilliary basis you can create one with the command AutoAux

Page 32 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de ECP’s for Actinides

• Problem: The Stuttgart ECP’s for actinides have !def2-TZVPP ECP{def2-TZVPP} !NoIter PrintBasis been removed starting from version 4.0 %scf guess=hcore end • ECP’s and basis sets can be read in * xyz 2 1 • Basis set is in format, U 0.0 0.0 0.0 O 0.0 0.0 1.8 ECP is in format O 0.0 0.0 -1.8 • This is confusing – but there is a solution *

• In orca 3.x.x run a calculation ! B3LYP RIJCOSX TightSCF def2-SVP autoaux with the following input: %basis NewGTO U (use the elements you need…) S 3 1 12098.0820000000 0.0288416845 • Copy the ecp and basis set 2 1833.7573000000 0.2180092033 3 351.6863200000 0.8395192276 and use in orca 4 input: S 1 1 104.3142600000 1.0000000000 • Use autoaux for auxillary basis-sets S 3 1 60.9058220000 0.0933850481 2 35.5150860000 -0.4593840999 3 20.8912270000 1.3555082796

Page 33 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Relativity and RI

• For ZORA and DKH calculation special care has to be taken to increase the integration accuracy in approximative schemes • For RIJCOSX GridXn has to be changed ! ZORA B3LYP ZORA-def2-SVP SARC/J • For RIJONX not needed ! TightSCF RIJCOSX GridX9 Opt • For many applications special grids in DFT are needed for %Method heavy atoms SpecialGridAtoms 92 SpecialGridIntAcc 10 • If ommited this will happen: End

* xyz 2 1 U 0.0 0.0 0.0 newgto "SARC-ZORA-TZVPP" end O 0.0 0.0 1.8 O 0.0 0.0 -1.8 *

Page 34 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Constraints %geom Constraints { B 0 1 1.25 C } { A 2 0 3 120.0 C } • Useful for optimisations end end • Freeze parts of the molecule during optimisation: Constraining bond distances : { B N1 N2 value C } Constraining bond angles : { A N1 N2 N1 value C } Constraining dihedral angles : { D N1 N2 N3 N4 value C } Constraining cartesian coordinates : { C N1 C }

• Wildcards to freeze all bonds/angles/torsions to certain atoms • Giving no value takes that value from the geometry section

• Just optimize hydrogens (useful for structures):

%geom opmizehydrogens true end

Page 35 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Hydrogen Optimisation

• A simple example ! TPSS KeepDens PrintBasis Def2-SV(P) Opt • One hydrogen is moved %geom opmizehydrogens true end * xyz 0 1 C -1.137634 0.702379 0.000000 C -1.137634 -0.702379 0.000000 N 0.000002 -1.415106 0.000000 C 1.137633 -0.702378 0.000000 C 1.137633 0.702380 0.000000 N -0.000001 1.415106 0.000000 H -2.180421 1.269265 0.000000 H -2.080418 -1.269269 0.000000 H 2.080422 -1.269260 0.000000 H 2.080419 1.269264 0.000000 *

Page 36 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Constrained Scans

• Scan energy along bond expansion, optimise all steps:

! RKS BP SV(P) TightSCF Opt %geom Scan B 0 1 = 1.35, 1.10, 12 # scan C-O distance end end * int 0 1 C 0 0 0 0.0000 0.000 0.00 O 1 0 0 1.3500 0.000 0.00 H 1 2 0 1.1075 122.016 0.00 H 1 2 3 1.1075 122.016 180.00 * • Took 1,5 min on my laptop • File filename.allxyz contains optimized geometries for all steps • File filename.relaxscanact.dat contains energy data (visualize with e.g. gnuplot)

Page 37 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Static vs. Dynamic Correlation

= N (1s 1s ) • Dynamic correlation related to movement of electrons u u A B – Angular correlation – Radial correlation • Static correlation related to degenerated molecular orbitals – Also known as left right correlation

– See e.g. bond breaking in H2 • MO diagramme familiar (, but often wrong …)

– Bonding and antibonding orbitals are of the same energy at g = Ng(1sA +1sB) infinite distance – The HF wave function is:

= = N( 1s ↵1s + 1s ↵1s + 1s ↵1s + 1s ↵1s ) 0 | g g| | A B | | B A | | A A | | B B | – Ok at equilibrium, but at infinite distance the ionic terms are problematic • The use of excited configurations: – Double excitation puts both electrons in the antibonding orbital:

= = N( 1s ↵1s + 1s ↵1s 1s ↵1s 1s ↵1s ) D | u u| | A B | | B A | | A A | | B B | – Adding the two configurations gets rid of ionic terms (HF+D = CID = CISD)

Page 38 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de HF vs. CISD

! CISD TZVPP TightSCF %paras R = 0.5,5,100 end *int 0 1 H 0 0 0 0.0 0.0 0.0 H 1 0 0 {R} 0.0 0.0 *

• To see the effect of static correlation perform a series of CISD calculations • Input is straightforward • The energy for HF and CISD can be found in Name.trjscf.dat and Name.trjmdci.dat • Remove or comment out the first line in these • Plot with e.g. gnuplot

• Density difference CID-HF is also interesting Blue: posive Red: negave

Page 39 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de An Advanced Example

• Reminder: static vs. dynamic correlation • For static correlation Orca offers CASSCF or MRCI calculations • Try this example, rotation of the double bond in ethylene:

! RHF def2-SVP def2-SVP/C ! SmallPrint NoPop NoMOPrint %casscf nel = 2 norb = 2 mult = 1,3 nroots = 2,1 TrafoStep RI switchstep nr end %paras R= 1.3385 Alpha=0,180,37 end * int 0 1 C 0 0 0 0 0 0 C 1 0 0 {R} 0 0 H 1 2 0 1.07 120 0 H 1 2 3 1.07 120 180 H 2 1 3 1.07 120 {Alpha} H 2 1 3 1.07 120 {Alpha+180} *

Page 40 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de An Advanced Example

• With UHF the lowest singlet and triplet look like this:

• Things to note around 0°: • Singlet energy too high • Triplet energy too low • Around 90°: • Singlet convergence issues • Orca reuses orbitals from previous runs

Page 41 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de An Even More Advanced Example

!DKH DKH-DEF2-TZVPP AutoAUX TIGHTSCF NoFrozenCore

%rel picturechange 2 end • SO coupled NEVPT2 calculation %casscf nel 4 • Simple example: Carbon atom norb 4 mult 5,3,1 • Active space 2s2p with 4 electrons nroots 1,3,6 bweight = 0.1,0.3,0.6 3 3 3 1 1 • Possible states P2, P1, P0, D2, S0 actconstraints 0 5 1 3 trafostep rimo And excited S2 from 2s 2p switchstep nr • SO coupling needed to get the states printwf true nevpt2 true • Play around with: nevpt D4Tpre 1e-13 – Basis set: try QZVPP and SVP end – Active space: try (2,3) – carefully check rel the requested multiplicities dosoc true 5 does not work for (2,3)! gtensor true printlevel 3 end end

*xyz 0 3 C 0.000 0.000 0.000 *

Page 42 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de An Even More Advanced Example

• Results: Experiment (NIST):

Eigenvalues: cm-1 eV 0: 0.0000 0.0000 1: 14.4779 0.0018 2: 14.8227 0.0018 3: 14.9298 0.0019 4: 43.7680 0.0054 5: 43.7747 0.0054 6: 44.1329 0.0055 7: 44.2342 0.0055 8: 44.3222 0.0055 9: 11408.3180 1.4145 10: 11409.5997 1.4146 11: 11410.4608 1.4147 12: 11411.4755 1.4148 13: 11411.5279 1.4148 14: 24076.7674 2.9851 15: 32170.5841 3.9886 16: 32170.5841 3.9886 17: 32170.5841 3.9886 18: 32170.5841 3.9886 19: 32170.5841 3.9886

• More Eigenvectors: Weight Real Image : Block Root Spin Ms information STATE 0: 0.0000 0.167460 0.409213 0.002094 : 1 0 1 1 available: 0.164830 -0.001348 -0.405990 : 1 2 1 1 0.315500 -0.000000 -0.561694 : 1 1 1 0 0.167460 0.409213 -0.002094 : 1 0 1 -1 0.164830 -0.001348 0.405990 : 1 2 1 -1 Page 43 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de For Courageous Users ! DKH DKH-DEF2-TZVPP AUTOAUX NOITER PrintBasis %pal nprocs 16 end

%basis • SO coupled NEVPT2 for PuF6 NewGTO Pu "SARC-DKH-TZVPP" end • Generate starting orbitals from end – UNO MP2 calculation %casscf – Single iteration CAS nel 2 norb 7 • Here simple (2,7) calculation mult 3,1 nroots 21,28 just the f-orbitals bweight = 0.461500, 0.538500 • printwf true This is too small for serious end results! *xyz 0 3 Pu 0.000 0.000 0.000 F 1.971 0.000 0.000 F -1.971 0.000 0.000 F 0.000 1.971 0.000 F 0.000 -1.971 0.000 F 0.000 0.000 1.971 F 0.000 0.000 -1.971 *

Page 44 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de ! DKH DKH-DEF2-TZVPP AUTOAUX NoFrozenCore TIGHTSCF moread

%basis NewGTO Pu "SARC-DKH-TZVPP" end For Courageous end Users %moinp "puf6.gbw" %rel picturechange 2 end

%casscf nel 2 • norb 7 SO coupled NEVPT2 for PuF6 mult 3,1 nroots 21,28 • Generate starting orbitals from bweight = 0.461500, 0.538500 – UNO MP2 calculation actconstraints 0 trafostep rimo – Single iteration CAS switchstep nr actorbs forbs • Here simple (2,7) calculation printwf true nevpt2 true just the f-orbitals nevpt D4Tpre 1e-13 • This is too small for serious end rel results! dosoc true gtensor true • Read in orbitals in real calculation printlevel 3 end using moread & moinp end

• Please don’t run this now *xyz 0 3 Pu 0.000 0.000 0.000 (54 min on 16 cores…) F 1.971 0.000 0.000 F -1.971 0.000 0.000 F 0.000 1.971 0.000 F 0.000 -1.971 0.000 F 0.000 0.000 1.971 F 0.000 0.000 -1.971 *

Page 45 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de NEVPT2 vs. MRMP2

2 2 3 3 3 1 1 • We look once more at our example C: 2s 2p – P0 , P1 , P2 , D2, S0 • Orca can also perform MRCI (Multi-Reference Configuration Interaction) and MRMP2 (Multi-Reference MP2) calculations – this example: MRMP2

! ROHF ZORA Def2-QZVPP TIGHTSCF Energy stabilization: -29.39746 cm-1 %MRCI Eigenvalues: cm-1 eV 300.000 K CIType MRMP2 0: 0.0000 0.0000 1.28e-01 NewBlock 3 * 1: 14.5378 0.0018 1.19e-01 Nroots 3 2: 15.0961 0.0019 1.19e-01 Refs 3: 15.2258 0.0019 1.19e-01 CAS(4,4) 4: 43.8069 0.0054 1.04e-01 End 5: 44.1719 0.0055 1.03e-01 End 6: 44.3084 0.0055 1.03e-01 NewBlock 1 * 7: 45.5132 0.0056 1.03e-01 Nroots 6 8: 45.5167 0.0056 1.03e-01 Refs 9: 10132.1883 1.2562 1.01e-22 CAS(4,4) 10: 10210.4434 1.2659 6.91e-23 End 11: 10452.1545 1.2959 2.17e-23 End 12: 10537.0432 1.3064 1.44e-23 SOC 13: 10572.2401 1.3108 1.22e-23 DoSOC True 14: 21785.5216 2.7011 5.38e-47 End End *xyz 0 3 C 0.0 0.0 0.0 *

Page 46 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Excitation Energies

!PBE def2-TZVPP CPCMC(Water) • Excitation energies are available from %maxcore 2000 OEM-CC, CAS, NEVPT2, MRCI, CISD %tddft nroots 20 and TDDFT maxdim 200 end • Here TDDFT as an example * int 0 1 – Number of excitations C 0 0 0 0.000000 0.000 0.000 O 1 0 0 1.200371 0.000 0.000 – Exp. Space 5-10 times number of excitations H 1 2 0 1.107372 121.941 0.000 H 1 2 3 1.107372 121.941 180.000 – Maybe add “FinalGrid 6” and “TightSCF” *

• Output: ------TD-DFT/TDA EXCITED STATES (SINGLETS) ------

STATE 1: E= 0.145815 au 3.968 eV 32002.6 cm**-1 7a -> 8a : 0.999627 (c= -0.99981361) STATE 2: E= 0.275780 au 7.504 eV 60526.7 cm**-1 7a -> 9a : 0.985017 (c= -0.99248046) STATE 3: E= 0.321444 au 8.747 eV 70548.9 cm**-1 7a -> 10a : 0.986447 (c= 0.99320040) STATE 4: E= 0.335918 au 9.141 eV 73725.4 cm**-1 5a -> 8a : 0.993819 (c= 0.99690458)

Page 47 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Excitation Energies

• Spectrum can be visualized with Gabedit

• Density differences (excited state – ground state) can be visualized with orca_plot

Page 48 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Excitation Energies • For Hybrid functionals speed up calculations (dramatically) with RIJCOSX: ! B3LYP def2-TZVP def2/J RIJCOSX Grid5 FinalGrid6 TightSCF

• If an excitation consists of many contributions, %tddft maxdim 300 use NTO (natural transition orbitals) nroots 50 – If NTOStates is not given, all are treated DoNTO true NTOStates 1,2,3 end

• Optimising excited states !PBE0 RIJCOSX def2-TZVPP def2/J KeepDens Opt – Choose state to optimise %maxcore 2000 %tddft nroots 5 – Check carefully that state-order maxdim 200 does not change IRoot 1 end – Check if you reached a true * int 0 1 minimum! Not the case here !!! C 0 0 0 0.000000 0.000 0.000 O 1 0 0 1.200371 0.000 0.000 H 1 2 0 1.107372 121.941 0.000 • Things to consider: H 1 2 3 1.107372 121.941 180.000 * – Check different functionals – Check for CT transitions – Increase memory (!)

Page 49 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Excitation Energies • For Hybrid functionals speed up calculations (dramatically) with RIJCOSX: ! B3LYP def2-TZVP def2/J RIJCOSX Grid5 FinalGrid6 TightSCF

• If an excitation consists of many contributions, %tddft maxdim 300 use NTO (natural transition orbitals) nroots 50 – If NTOStates is not given, all are treated DoNTO true NTOStates 1,2,3 end • Optimising excited states – Choose state to optimise – Check carefully that state-order does not change – Check if you reached a true minimum! Not the case here !!!

• Things to consider: – Check different functionals – Check for CT transitions – Increase memory (!)

Page 50 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Excitation Energies for Large Systems • The very fast approximative methods sTDA and sTDDFT are now available (Grimme et al.) - suitable for very large systems (several 1000 atoms) • Example here formaldehyde with CAM-B3LYP • Computational time in ! cam-b3lyp grid5 nofinalgrid def2-TZVPP nori – TDDFT module: 95 s ! Tightscf nososcf smallprint printgap nopop

– sTDDFT module: 0.25 s %maxcore 5000

%tddft Mode sTDDFT Ethresh 20.0 PThresh 1e-4 PTLimit 40 maxcore 20000 end

%method runtyp energy end

* int 0 1 C 0 0 0 0.000000 0.000 0.000 O 1 0 0 1.200371 0.000 0.000 H 1 2 0 1.107372 121.941 0.000 H 1 2 3 1.107372 121.941 180.000 *

Page 51 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de NMR calculations • Since orca 4.0 NMR calculations with

GIAO’s are possible ! PBE0 SVP DEF2/JK NMR RIJCOSX Opt • Straightforward only for diamagnetic * xyz 0 1 NMR (closed shell molecules) Si 0.000000000 0.000000000 0.000000000 H -1.739978328 -0.484162302 -1.739978328 • Chemical shielding tensors are available H -0.484162302 1.739978328 1.739978328 • To compare with experiment the H 1.739978328 -0.484162302 1.739978328 H 1.739978328 1.739978328 -0.484162302 experimental reference has to be optimised C 1.090776281 1.090776281 -1.090776281 and shielding tensors for the necessary H 1.739978328 0.484162302 -1.739978328 H 0.484162302 1.739978328 -1.739978328 elements calculated C 1.090776281 -1.090776281 1.090776281 1 13 H 0.484162302 -1.739978328 1.739978328 • For H and C this is e.g. TMS H 1.739978328 -1.739978328 0.484162302 C -1.090776281 1.090776281 1.090776281 • Of the shielding tensor (3x3 matrix) only H -1.739978328 1.739978328 0.484162302 the trace (isotropic shielding) is necessary H -1.739978328 0.484162302 1.739978328 C -1.090776281 -1.090776281 -1.090776281 in solution H -0.484162302 -1.739978328 -1.739978328 • Atoms of interest can be chosen in the H -1.739978328 -1.739978328 -0.484162302 * eprnmr block: Nuclei = all C {shi} (all carbons) %eprnmr GIAO_1el = giao_1el_analytic Nuclei = 1,5 {shi} (atom 1 and 5) GIAO_2el = giao_2el_rijk • g-Tensor and HFC data available end Simulate EPR spectra with EasySpin (Mathlab program)

Page 52 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de ! PBE0 SVP DEF2/JK NMR RIJCOSX Opt

* xyz 0 1 NMR calculations C -1.22692181 0.24709455 -0.00000000 C -0.01354839 -0.54677253 0.00000000 H -2.09280406 -0.41333631 0.00000000 H -1.24962478 0.87541936 -0.88916500 H -1.24962478 0.87541936 0.88916500 O 1.09961824 0.30226226 -0.00000000 • Example: Ethanol H 0.00915178 -1.17509696 0.88916500 • Output for TMS: H 0.00915178 -1.17509696 -0.88916500 H 1.89207683 -0.21621566 0.00000000 Nucleus Element Isotropic Anisotropy * ------0 Si 406.163 0.001 1 H 31.299 9.883 %eprnmr 2 H 31.299 9.883 GIAO_1el = giao_1el_analytic 3 H 31.299 9.883 GIAO_2el = giao_2el_rijk 4 H 31.299 9.883 end 5 C 193.358 7.378 and Ethanol: Nucleus Element Isotropic Anisotropy ------0 C 176.453 23.298 1 C 136.963 57.695 • Shift = Reference – Sample 193.358 ppm – 176.453 ppm = 16.9 ppm 193.358 ppm – 136.963 ppm = 56.4 ppm • No coupling constants obtainable with Orca • No SO coupling for rel. effects yet

Page 53 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Energy extrapolation

• We would like to know energies at the basis set limit – Computationally not feasible – Extrapolation procedures exist for different basis set families (cc, aug-cc, cc-core, ano, saug-ano, aug-ano, def2) X p – Orca uses for HF: ESCF = ESCF1 + A exp ↵ X AAACQXicbVA9bxNBEJ1L+Ajmy5CSZkSECEJYd2kgBVKiKIgyCEyMvI61t56zV9nbu+zOoVink/gNiP9Dwy+g4wfQUACipWFtpwCHJ4309N7M7sxLS6M9x/GXaGX1wsVLl9eutK5eu37jZvvW7de+qJyiripM4Xqp9GS0pS5rNtQrHck8NXSYHu/N/MO35Lwu7CueljTI5djqTCvJQRq23+wf1b1mWItc8sTl9cu9Z02DT3F/STqqhbYZTxt8iLso6LQUhjLexEcopCknEoU/cRzeQuH0eMIPhu2NuBPPgedJckY2du5/eP8OAA6G7c9iVKgqJ8vKSO/7SVzyoJaOtTLUtETlqZTqWI6pH6iVOflBPY+gwXtBGWFWuFCWca7+PVHL3PtpnobO2Vl+2ZuJ//P6FWdPBrW2ZcVk1eKjrDLIBc7yxJF2pNhMA5HK6bArqol0UnFIvRVCSJZPPk+6W53tTvIihLEFC6zBHbgLm5DAY9iB53AAXVDwEb7Cd/gRfYq+RT+jX4vWlehsZh3+QfT7D3aUsm8=sha1_base64="FISitpU8vTcoq3VqeooBOLUjQ2Y=">AAACQXicbVBNb9NAEF0X6Ef4aKC99TJqhShCRHYvwAGpVVXEsRUNDcqm0XozTlZZr83uGGFZ/hMV/4cLv4AbPwCp4kARVy5skh4g7ZNGenpvZnfmxblWjsLwW7Bw4+atxaXllcbtO3fvrTbvP3jrssJKbMtMZ7YTC4daGWyTIo2d3KJIY40n8Xh/4p98QOtUZo6pzLGXiqFRiZKCvNRvvjs4rTp1v+KpoJFNqzf7r+oaXsLBnHRacWUSKmt4AnvA8WPONSa0DU+BC52PBHD33pJ/C7hVwxE97je3wlY4BVwl0SXZ2n306axcO18/7De/8kEmixQNSS2c60ZhTr1KWFJSY93ghcNcyLEYYtdTI1J0vWoaQQ0PvTKAJLO+DMFU/XeiEqlzZRr7zslZbt6biNd53YKS571KmbwgNHL2UVJooAwmecJAWZSkS0+EtMrvCnIkrJDkU2/4EKL5k6+S9k7rRSs68mHssBmW2QbbZNssYs/YLnvNDlmbSfaZfWc/2UXwJfgR/Ap+z1oXgsuZNfYfgj9/AdY8s3c=sha1_base64="dqB1a+L38gy1n0JLcu8RS84ctjw=">AAACQXicbVBNTxsxEPXS8tG00LQ9chk1qkSFiHa5lB4qUSEQRxBNSRWHyOvMJhZe79aerRqt9rf10l/AjR/ApQdAXLnghBwg9EkjPb03Y8+8ONfKURieB3PPns8vLC69qL18tbzyuv7m7XeXFVZiS2Y6s+1YONTKYIsUaWznFkUaazyOT3fG/vEvtE5l5huNcuymYmBUoqQgL/XqP3ZPynbVK3kqaGjT8mhnr6rgC+zOSCclVyahUQXr8BU4/s65xoTWYAO40PlQAHc/Lfm3gFs1GNLHXr0RNsMJ4CmJpqTBpjjo1c94P5NFioakFs51ojCnbiksKamxqvHCYS7kqRhgx1MjUnTdchJBBR+80ocks74MwUR9OFGK1LlRGvvO8Vlu1huL//M6BSVb3VKZvCA08v6jpNBAGYzzhL6yKEmPPBHSKr8ryKGwQpJPveZDiGZPfkpam83PzegwbGxvTtNYYqvsPVtjEfvEttk+O2AtJtkfdsEu2VXwN/gXXAc3961zwXTmHXuE4PYOs82wYg== ⇣ ⌘ XEX Y EY – corr corr And for the correlation part: Ecorr1 = AAACZ3icfVHPSxwxGM1MW7Wj1elPCl5ipSCIy4yX6kFYEKFHBbeu7IxLJpvZDWYyQ/KNMITgf+iht5568tK/opldUbtKPwg83nvfl3wvWSW4hij65fkvXr5aWFx6HSyvvFldC9+++6HLWlHWo6UoVT8jmgkuWQ84CNavFCNFJthZdnnY6mdXTGleylNoKpYWZCx5zikBRw3D66MLk3CZQ2OHJikITFRhaKmUtfgAJ7ki1PSdJWNALD6a91yYvsU7+Px/jnNrH0bs3FstxjgIhuFm1ImmhZ+C+A5sdrd/33QRQsfD8GcyKmldMAlUEK0HcVRBaogCTgWzQVJrVhF6ScZs4KAkBdOpmQZl8VfHjHBeKnck4Cn7uMOQQuumyJyzXULPay35nDaoId9LDZdVDUzS2UV5LTCUuE0dj7hiFETjAKGKu7diOiEuXHB/04YQz6/8FPR2O/ud+MSFsYtmtYTW0Re0hWL0DXXRd3SMeoiiW2/Z++B99P74of/J/zyz+t5dz3v0T/kbfwFZxb3Tsha1_base64="cEu8oYLk3hGC4vJUoWBBT1g1m8o=">AAACZ3icfVFNSyQxFEy3rh/jqu3XIuwlKgsL4tDtxfUgCCJ4nIUdHZkeh3QmrcF0ukleLwwh+A89eNOLF734K0zPiKvj4oNAUVXvJa+SFIJrCMNbzx8b/zIxOTVdm/k6OzcfLCwe67xUlDVpLnLVSohmgkvWBA6CtQrFSJYIdpJcHlT6yV+mNM/lH+gXrJORc8lTTgk4qhtcHZ6ZmMsU+rZr4ozAhcoMzZWyFu/hOFWEmpazJAyIxYejnjPTsngLn37mOLX234itV6vFGNdq3WAjrIeDwh9B9AI29jfvr6PG3UOjG9zEvZyWGZNABdG6HYUFdAxRwKlgthaXmhWEXpJz1nZQkozpjhkEZfEPx/Rwmit3JOAB+7bDkEzrfpY4Z7WEHtUq8n9au4T0V8dwWZTAJB1elJYCQ46r1HGPK0ZB9B0gVHH3VkwviAsX3N9UIUSjK38Eze36bj367cLYRsOaQt/ROvqJIrSD9tERaqAmoujRm/GWvRXvyQ/8b/7q0Op7Lz1L6F35a88B67/Ssha1_base64="hf/jlQR5fNGCaWwbbNp/nNrW2uI=">AAACZ3icfVFda9swFJXdbuuSfXjrVgZ70RYGe0mw87LuYVAogT2m0DQJcRJkRW5EZNlI14UgRP/j3voD+tJfUTkJXZuMXRAczjn3SvcoKQTXEIY3nr+3/+z5i4OXtfqr12/eBu/eX+i8VJT1aC5yNUiIZoJL1gMOgg0KxUiWCNZPFqeV3r9iSvNcnsOyYOOMXEqeckrAUdPgujMxMZcpLO3UxBmBucoMzZWyFv/CcaoINQNnSRgQizvbnokZWNzEw/85htb+HdF8sFqMca02DRphK1wV3gXRBjTQprrT4E88y2mZMQlUEK1HUVjA2BAFnApma3GpWUHoglyykYOSZEyPzSooi785ZobTXLkjAa/Yxx2GZFovs8Q5qyX0tlaR/9JGJaTHY8NlUQKTdH1RWgoMOa5SxzOuGAWxdIBQxd1bMZ0TFy64v6lCiLZX3gW9dutnKzoLGyftTRoH6DP6ir6jCP1AJ+g36qIeoujWq3sfvI/enR/4R/6ntdX3Nj2H6En5X+4BMaO7ew== X Y – Simple example: ! RHF MP2 CCSD(T) Extrapolate(2/3,cc) TightSCF Conv Bohrs * int 0 1 O 0 0 0 0 0 0 H 1 0 0 1.81975 0 0 H 1 2 0 1.81975 105.237 0 *

Page 54 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Energy extrapolation

• Simple example: ! RHF MP2 CCSD(T) Extrapolate(2/3,cc) TightSCF Conv Bohrs * int 0 1 O 0 0 0 0 0 0 H 1 0 0 1.81975 0 0 H 1 2 0 1.81975 105.237 0 *

SCF energy with basis cc-pVDZ: -76.026430944 • Results for 2/3, 3/4, SCF energy with basis cc-pVTZ: -76.056728252 SCF energy with basis cc-pVQZ: -76.064381269 SCF energy with basis cc-pV5Z: -76.066641010 and 4/5 cc: Extrapolated CBS SCF energy (2/3) : -76.066581429 (-0.009853177) Extrapolated CBS SCF energy (3/4) : -76.066687152 (-0.002305884) Extrapolated CBS SCF energy (4/5) : -76.066641010 ( 0.000000000) • Energy differences MDCI energy with basis cc-pVDZ: -0.201959607 MDCI energy with basis cc-pVTZ: -0.261813159 MDCI energy with basis cc-pVQZ: -0.283155611 2/3 and 3/4: MDCI energy with basis cc-pV5Z: -0.291878932 Extrapolated CBS correlation energy (2/3) : -0.296787763 (-0.034974604) – E(HF): 0.277 kJ/mol Extrapolated CBS correlation energy (3/4) : -0.298349078 (-0.015193467) – E(Corr.): 4.099 kJ/mol Extrapolated CBS correlation energy (4/5) : -0.301031270 (-0.009152337) Estimated CBS total energy (2/3) : -76.363369192 – E(Total): 4.376 kJ/mol Estimated CBS total energy (3/4) : -76.365036230 Estimated CBS total energy (4/5) : -76.367672280 • 4/5 Takes 17 min on one core… Page 55 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Visualising Without Gabedit

• Orca can produce input files • After the calculation is finished, write at the prompt: orca_2mkl basename –molden

• Orca has an “interactive” program to produce cube files – Orbitals and densities are available – Excited state density differences possible – Different formats available • Start at the prompt with: orca_plot filename.gbw -i

Page 56 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Explore! • Use the forum, online library and manual to learn • Many fascinating things possible • One final teaser – vibrational broadening of absorption spectra (with orca_asa) 2+ • Here for UO2(H2O)5 experiment and calculation (signal shifted):

Page 57 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de Calculating other Properties

• Different programs can be interfaced • Common file format molden • Molden input files can be converted to .wfn files for AIM, MultiWFN, NCIplot – more on Friday

Page 58 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de The End

• Have fun with Orca • Thank you for your attention!

Page 59 Member of the Helmholtz Association Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de