orcagabedit manual
DESCRIPTION
Both codes available for Mac, Linux & Windows– Good combination for research & teachingPress the pen tool to add atoms• Press the periodic-table buttonto change the atom (C is standard)• Press the button below that totoggle 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”TRANSCRIPT
-
Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
CSC Spring School 2015
Quantum Chemistry Workshop Basics
Orca & Gabedit
Michael Patzschke Institute for Resource Ecology
HZDR
11.03.2015
-
Member of the Helmholtz Association Page 2 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
-
Member of the Helmholtz Association Page 3 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
An example follows on Friday Visualizing results
Much more on Thursday using VMD
-
Member of the Helmholtz Association Page 4 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
-
Member of the Helmholtz Association Page 5 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
-
Member of the Helmholtz Association Page 6 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 Semiempirical methods:
Interface to Mopac, Orca & Firefly
-
Member of the Helmholtz Association Page 7 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)
-
Member of the Helmholtz Association Page 8 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
-
Member of the Helmholtz Association Page 9 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
-
Member of the Helmholtz Association Page 10 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!
-
Member of the Helmholtz Association Page 11 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
-
Member of the Helmholtz Association Page 12 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 Avogadro)
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
-
Member of the Helmholtz Association Page 13 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
-
Member of the Helmholtz Association Page 14 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Visualizing Orbitals
In the visualization 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 AOs Change cut-off value here Click Ok
-
Member of the Helmholtz Association Page 15 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
-
Member of the Helmholtz Association Page 16 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)
-
Member of the Helmholtz Association Page 17 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Orca Input Help
Have the orca manual ready (532 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!
-
Member of the Helmholtz Association Page 18 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: Change the functional
For a list see next page Change the basis set
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 &
!Opt TPSS Def2-SV(P) * xyz 0 1 C -1.182146 -0.191818 -11.887076 H -1.567738 0.546391 -12.590258 H -1.864597 -0.714867 -11.217165 O 0.022990 -0.429026 -11.844415 *
-
Member of the Helmholtz Association Page 19 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
keywords vdw10 or vdw10bj
-
Member of the Helmholtz Association Page 20 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
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-TZVPP/J def2-TZVPP/C TightSCF RIJCOSX
For test purposes here you might want to replace TZVPP by SVP
-
Member of the Helmholtz Association Page 21 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
BP86 r(CO) = r(CO) = r(CO) =
r(CO) = 120.5 pm
t = t = t =
TPSS r(CO) = r(CO) = r(CO) = t = t = t =
PBE0 r(CO) = r(CO) = r(CO) = t = t = t =
HF r(CO) = r(CO) = r(CO) = t = t = t =
MP2 r(CO) = r(CO) = r(CO) = t = t = t =
-
Member of the Helmholtz Association Page 22 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-TZVPP/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
-
Member of the Helmholtz Association Page 23 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Further Remarks Defining charge and multiplicity first line of geometry block:
* int 0 1 first word = form of geometry data (xyz or int) first number = charge, second number = multiplicity (1 for singlet, 2 for doublet)
or reading an external file with: * xyzle 1 2 lename.xyz
One can add dummies (DA), ghosts (Mg:), point charges (Qn.nn) and many more
Orca does not use symmetry to speed up calculations Symmetry can be used to classify MOs 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 (posidve integer) end
Do not use more than 16 cores
-
Member of the Helmholtz Association Page 24 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Properties 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 (!)) Not part of the basic tutorial
-
Member of the Helmholtz Association Page 25 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Solvent Effects
Solvent effects on structures and frequencies through COSMO Treatment differs for MP2 from Turbomole, different results possible Two ways to specify,
in command line: ! COSMO(solvent) As input block: ! COSMO
%cosmo epsilon 78 end
The more recent SMD (solvent model density) is also available: %cosmo smd true solvent DMF end
-
Member of the Helmholtz Association Page 26 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Relativity Two ways to include scalar relativistic effects (no SO!):
For elements heavier than Kr one can include ECPs with: ! BP def2-SVP def2-SVP/J ECP{def2-SVP,def2-SVP/J} printbasis where printbasis prints the basis, in order to check that ECP and basis set fit
Manually define ECPs for certain elements: ! ECP{TZVP=Hf-Hg} ! ECP{TZVP=[Ag,Pt,Au]}
All electron ZORA or DKH2 calculations: ! BP86 ZORA def2-SVP def2-SVP/J TIGHTSCF printbasis ! BP86 DKH2 def2-SVP def2-SVP/J TIGHTSCF printbasis
Very important: ZORA/DKH2 and basis set definitions have to be on the same line!
Defining a special basis set requires: U 0.0 0.0 1.0 newgto "ZORA-def2-TZVP" end
-
Member of the Helmholtz Association Page 27 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Constraints
Useful for optimisations Freeze parts of the molecule
during optimisation:
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 crystal structures):
%geom Constraints { B 0 1 1.25 C } { A 2 0 3 120.0 C }
end end
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 }
%geom opdmizehydrogens true end
-
Member of the Helmholtz Association Page 28 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Hydrogen Optimisation
A simple example One hydrogen is moved
! TPSS KeepDens PrintBasis Def2-SV(P) Opt %geom opdmizehydrogens 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 *
-
Member of the Helmholtz Association Page 29 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Constrained Scans
Scan energy along bond expansion, optimise all steps:
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)
! 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 *
-
Member of the Helmholtz Association Page 30 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 SV(P) SV/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 1C 0 0 0 0 0 0C 1 0 0 {R} 0 0H 1 2 0 1.07 120 0H 1 2 3 1.07 120 180H 2 1 3 1.07 120 {Alpha}H 2 1 3 1.07 120 {Alpha+180}*
-
Member of the Helmholtz Association Page 31 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
-
Member of the Helmholtz Association Page 32 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 e.g. Dunning's and ANO basis sets
Orca uses for HF:
And for the correlation part:
Look at a 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 *
-
Member of the Helmholtz Association Page 33 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
Visualising Without Gabedit Orca can produce molden 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 lename.gbw -i
-
Member of the Helmholtz Association Page 34 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
-
Member of the Helmholtz Association Page 35 Dr. Michael Patzschke I Institute for Resource Ecology I www.hzdr.de
The End
Have fun with Orca Thank you for your attention!