chemistry of porphyrin cations and dicationsmpeeks.mit.edu/sites/default/files/images/mopac...
TRANSCRIPT
MOPAC workshop
Martin Peeks
21st April 2016
Course outline
2
Day one
1. What is MOPAC?(a) QM intro(b) What can you do with MOPAC?
2. Anatomy of a MOPAC job
3. Worked example: benzene: geometry, orbitals and vibrations
If time:4. Worked example: butane coordinate scan.
Day two
More advanced techniques:- Coordinate scans- Atomic charges- Transition states- Implicit solvent- Electronic spectra (UV)- Visualisation- FullMonte
The compchem hierarchy
3
Molecular mechanics
Semi-empirical
DFT
WFT
AMBER
OPLSMM+
MMFF94
HyperChem
MacromodelMolecular dynamics
RM1
AM1
Huckel
PM6
INDO
ZINDO
MOPAC
HyperChem
Gaussian
UFF
HFMP2
CASSCF
CCSD(T)
MNDO
DFTB
CISDB3LYP
PBE
M06-2X
wB97X-D
BP86
BLYP
Gaussian Turbomole OrcaGAMESS QChem NWChem
Molecular mechanics
4
Estr C-C Estr C-H Estr C-F Estr C-Cl
Ebend F-C-H Ebend F-C-C Ebend H-C-H (many) Ebend Cl-C-C
Ebend Cl-C-H Etor F-C-C-Cl Etor F-C-C-H Etor H-C-C-Cl
Etor H-C-C-H 1,3-/1,4- VdW VdW VdW
F = ma
Quantum mechanics
5
Born Oppenheimer approximation:Decouple electronic and nuclear motion
Electronic wavefunction described by QM: gives forces on nuclei, which then respond according to classical mechanics.
Hartree-Fock theory describes motion of electrons without reference to other electrons: electron correlation is neglected.
Coulomb and
exchange
Geometry optimisation
6
Solve SCF
Low forces on
atoms*?
Move atoms
Converged!Yes
No
* And predicted displacements
Semi-empirical methods
7
Replace many costly two-electron integrals in HF theory with parameters
Parameters from experimental and high-level calculations
Good parameters can give solutions with accuracy of HF theory
DFT and post-HF methods include more electron correlation, so are more accurate
Ignore core electrons: only consider valence electrons
Just because the computer gives you an answer, does not mean it’s the right answer!
Semi-empirical good for: Semi-empirical bad for:
Heavy atomsTransition metals (generally)Open-shell systemsSmall systems (DFT cheap)(Intermolecular interactions)
Quick geometry screeningBig systems before DFTCompromise: properties instead of DFT for big molecules
Semi-empirical methods
8
AM1(Austin)
Earliest model
Superseded by PM3 (then 6,7)
RM1(Recife)
Good for organics
Lacks heavier atoms (e.g. Si)
PM6(Parameterisation)
Heavily parameterised model. Wide applicability. Includes TMs Has dispersion and H-bond optimised versions
Bad for sp2 nitrogen planarity
PM7 Improvement on PM6
Nitrogens in amino acids still bad
ZINDO/S(Zerner’s intermediate neglect of differential overlap)(Hyperchem)
Good for electronic spectra: may beat B3LYP in many cases!
Bad for geometriesOften good to add empirical parameters for π and s overlap.
Semi-empirical methods
9
INDO/X New method (2014) for electronic spectroscopy
doi: 10.1021/ct500717u
OMx Improved accuracy: explicit orthogonalisation includes effects of Pauli exchange repulsion, improving conformational properties, non-covalents, and excited states
Limited parameters. For info see Thiel 2014 and refs
DFTBDensity functional tight binding
Approximate DFT. 100-1000 times faster than DFT. Minimal basis. Software: DFTB+. Can do periodic structures and electron transport
Bad for H-bonding, but can be corrected
HF-3c(v) HF theory in minimal basis with several empirical corrections
Available in CRYSTAL14 (see Grimme 2014 and refs)
Grimme 2014: 10.1021/jz5021313 (good comparison of performance for non covalents)
Thiel 2014: 10.1002/wcms.1161
Elstner, PCCP 2014 14368 (DFTB argument)
Some nice figures
10Grimme 2014: 10.1021/jz5021313
Practical considerations
11
1. Look for examples in the literature
2. Benchmark to known properties or higher-level theory
3. Try different methods: see if the result is robust (and how much your choice matters)4. Avoid, or correct, known deficiencies in models
Balance your “tuning” effort against what you hope to learn: don’t spend so much time trying to match a DFT benchmark that you could have done a series of DFT calculations in the time.
HAVE CLEAR GOALS AND A HYPOTHESIS
Remember, the computer is stupid. It might give an answer,
but you need to decide if that answer is correct.
MOPAC
12
MNDOAM1PM3PM6RM1MNDO-dPM7
Software by James J. P. Stewart
Free for academic use
Actively developed
Widely used
Good manual
Solvent effects
Symmetry
Electrostatic methods
Powerful SCF convergers
Vibrations
Orbitals
Thermochemistry
Electronic excitations (caveat)
Transition states
Proteins
Issues:Some methods not implemented“Black box”
Anatomy of a MOPAC job
13
PM7 EF GNORM=0.01 XYZ
Water
For workshop
O 0.000000 +1 0.000000 +1 0.000000 +1
H 0.758602 +1 0.000000 +1 0.504284 +1
H 0.758602 +1 0.000000 +1 -0.504284 +1
Job instructionswater.mop
Comment linesCan be blank
Molecule coordinates (Cartesian, Gaussian zmat, Turbomole, or
internal)
Essential blank line! Atom type
zx y
Optimisation flag:+1: optimise
+0: freeze-1: Use as reaction coordinate (see later)
If you omit the flag, +1 is default
MOPAC files
14
Input file: water.mop MOPAC
water.arcArchive file: job results and final coords
water.outOutput log file: shows calculation input, progress,
results and errors
water.resRestart file: written for long jobs; can restart job by passing ”restart” command in original job input file
water.endThis file is empty. If you put text into it, MOPAC will
save restart and density files and will stop the calculation
water.mgfGenerated with GRAPHF keyword, and gives orbitals
which can be viewed in Jmol.
water.auxGenerated with AUX keyword. Gives extra info which can be viewed with some visualisers (e.g. GABedit)
water.denDensity file: contains density matrix You’ll never need
this
A practical example
Goal: optimise the geometry of benzene using MOPAC, calculate the vibrational frequencies, and view the frontier orbitals using Jmol
15
Huckel theory
benzene.mop
PM7 EF GNORM=0.01 GRAPHF ESP
C -4.461121 1.187057 -0.028519
C -3.066650 1.263428 -0.002700
C -2.303848 0.094131 0.041626
C -2.935547 -1.151550 0.059845
C -4.330048 -1.227982 0.034073
C -5.092743 -0.058655 -0.010193
H -1.203506 0.154419 0.062012
H -2.568481 2.246445 -0.017380
H -5.063248 2.109543 -0.063538
H -2.333618 -2.074158 0.094513
H -4.828415 -2.210938 0.048462
H -6.193085 -0.118286 -0.030823
Check the output file
16
CYCLE: 19 TIME: 0.000 TIME LEFT: 2.00D GRAD.: 0.007 HEAT: 22.95651
GRADIENT = 0.00727 IS LESS THAN CUTOFF = 0.01000
In a few minutes we’ll look at the orbitals and ESP, but first let’s calculate the vibrations
Geometry optimisation takes us to a location on the 3N-6 dimensional potential energy surface where the gradient is low.
But this point isn’t necessarily a minimum. A FORCE calculation gives us the vibrations and tells us about the shape of the potential energy surface
The FORCE calculation provides the Hessian matrix, which is the second derivative of energy w.r.t. atomic displacement (cf. gradient is first derivative).
Running force calculation
• Open benzene.arc
• Save as.. benzene-force.mop
• Delete frontmatter until job line and coordinates, and change job line to:
17
PM7 FORCE
C (……)
Force output
18
NORMAL COORDINATE ANALYSIS (Total motion = 1 Angstrom)
Root No. 1 2 3 4 5 6 7 8
1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 A
349.1 349.5 593.9 600.3 600.5 759.4 901.9 902.3
Let’s open this in Jmol to see the vibrations:• Right click in Jmol window, File>Load>Open Local File…• Find .out file, open it. Admire benzene.• Right click, model 1/31 > (choose a vibration)• Right click, Vibration>On• Look at other vibrations
All vibrations are positive, so we’re at a minimum in the 3N-6 dimensional surface
Force output: a counter example
• Run the MOPAC job benzene-disp.mop.
• One C-H bond has been arbitrarily lengthened (we need the LET keyword because we’re not at a region of low gradient, so MOPAC doesn’t (quite rightly) want to do the FORCE calculation). LET tells it to trust that we know what we’re doing.
19
PM7 FORCE LET GRAPHF
C (……)
NORMAL COORDINATE ANALYSIS (Total motion = 1 Angstrom)
Root No. 1 2 3 4 5 6 7 8
1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 A
-1093.6 356.2 402.4 593.6 601.1 606.3 789.2 885.1
Open benzene-disp.out in Jmol and look at the imaginary (negative) vibrational mode
It corresponds to the un-optimised C-H bond.
If you have an imaginary frequency after geom. opt., the vibrational mode suggests which atoms to move to resolve it. Often a manual movement is necessary. Or the explicit vibrational matrix (Hessian) can be used in optimisation with the RECALC=n keyword.
Looking at the benzene orbitals
• Right click in Jmol and load the (original) benzene.mgffile
• Right click, Surfaces>Molecular electrostatic potential (range ALL)
• Consider what this means with reference to C-H π bonding, and π-π stacking (offset-stack)
• Right click, Surfaces>Off
• Right click, Surfaces>Molecular Orbitals(…) – Look at the occupied (2.0) and unoccupied (0.0) orbitals.
Notice that the orbital energy is given by the eigenvalues. You can see which are degenerate (same energy) orbitals. Compare to the Huckel picture on an earlier slide.
20
n-butane conformational scan
• Optimise n-butane – Add PM7 EF GNORM=0.01 to top of XYZ
coordinates. Check blank lines!
• Convert XYZ to internal coordinates– Take optimised geometry from .arc file, and use
job line: 0SCF INT in a new job
• Take internal coordinates from .arc file, and create a new job file. Choose coordinate for optimisation (-1), and use PM7 EF GNORM=0.01 STEP=10 POINT=36
21
A quick look at internal coordinates and scans
22
PM7 EF POINT=36 STEP=10
C 0.00000000 +0 0.0000000 +0 0.0000000 +0 0 0 0
C 1.52900685 +1 0.0000000 +0 0.0000000 +0 1 0 0
C 1.53604856 +1 112.2754272 +1 0.0000000 +0 1 2 0
C 1.52890789 +1 112.2729499 +1 -70.0119025 -1 3 1 2
H 1.10665225 +1 109.8084276 +1 -122.3909147 +1 1 2 3
H 1.10700465 +1 109.5858133 +1 121.7969671 +1 1 2 3
H 1.09540072 +1 111.1872638 +1 179.7201334 +1 2 1 3
H 1.09552157 +1 111.4078034 +1 -60.2155832 +1 2 1 3
H 1.09566835 +1 111.4985953 +1 59.8005705 +1 2 1 3
H 1.10577596 +1 109.6659220 +1 52.4123128 +1 3 1 2
H 1.10777503 +1 109.4390512 +1 168.0924601 +1 3 1 2
H 1.09532734 +1 111.2167199 +1 179.0356396 +1 4 3 1
H 1.09533828 +1 111.3620139 +1 -60.8698033 +1 4 3 1
H 1.09579159 +1 111.5045425 +1 59.1256365 +1 4 3 1
+0 = Do nothing+1 = Optimise-1 = Scan: do 36 points in 10 unit (degree, here) integrals.
DistanceA-B
Angle ABC Torsion ABCDA B C D
1
2
3
4
5
6
7
8
9
10
11
12
13
14
The result
• List of geometries at each step in .out
• Then energies vs. coordinate at end. Plot that in Excel (or similar) to get torsion profile
23
POINTS ON REACTION PATH
AND CORRESPONDING HEATS
-70.01190250 -60.01190250 -50.01190250 -40.01190250 -30.01190250 -20.01190250
-27.44919287 -27.21056585 -26.79589606 -26.25478124 -25.63120502 -25.03018671
9.98809750 19.98809750 29.98809750 39.98809750 49.98809750 59.98809750 69.98809750 79.
-24.56061695 -24.98003323 -25.58139116 -26.24270245 -26.83699398 -27.26119750
89.98809750 99.98809750 109.98809750 119.98809750 129.98809750 139.98809750 149.98809750 159.
-27.21915750 -26.93590742 -26.70516254 -26.62856640 -26.75059520 -27.04844007
169.98809750 179.98809750 189.98809750 199.98809750 209.98809750 219.98809750 229.98809750 239.
-28.10805101 -28.20323473 -28.09606365 -27.81314828 -27.42827277 -27.03920458
249.98809750 259.98809750 269.98809750 279.98809750
-26.72085983 -26.96632388 -27.26072586 -27.45857030
Was our start structure a minimum?
Was it the global minimum?
Take-home message
• Every torsion adds to the conformational space which must be sampled to find the global minimum.
• With lots of rotors, a “conformational explosion” results
• Quick screening of torsions in MOPAC can be powerful. More sophisticated tools (using MOPAC) exist. Can also use MM.
• Your geometry optimisation might complete, but you still need to check:– Is it a minimum? Always do a force calculation– Is it a global minimum? Consider checking torsions.
24
What next?
• Play around with MOPAC
• Try examples for your own curiosity. Maybe dissociation of methyl iodide (lengthen the C-I bond and look at the energy profile). Or anything
• Try to fix problems yourself: use the MOPAC website and manual http://openmopac.net/manual/
25
Other visualisation methods
1. MOLDEN: popular tool for visualising results. Very powerful, but weird interface. Installation on OS X is not for the faint of heart. Windows is easy. ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/bin
2. Jmol: powerful and portable program for visualisation of results. Actively developed. Lots of features. At time of writing, MOPAC support is poor (.arc and .aux files can’t be opened, symmetry in .mgf files is ignored, and there’s a 256 atom limit). I’ve reported the bugs and have fixed the 256 atom limit myself, locally. Overall, though, is it the best tool at the moment for most users http://jmol.sourceforge.net/
3. Avogadro 2 (> v 0.9): lots of potential and somewhat-actively developed. However, doesn’t yet have a full feature-set. Avogadro 1 is impossible to use with MOPAC in my experience: it’s as buggy as an entomology lecture. http://www.openchemistry.org/
4. Chimera, Pymol, Crystalmaker: good for making pretty pictures from xyz files. They can each do much more too!
26
(all of this is ”just my opinion”: decide for yourself which you prefer!)
Important acronyms
27
SCF Self consistent field: used to calculate electronic wavefunction
RHF Restricted Hartree Fock: formulation of HF theory where all electrons pair (spin-up/spin-down)
UHF Unrestricted Hartree Fock: spin-up and spin-down (alpha and beta) electrons and orbitals treated separated. Used to open shell systems and complex cases
EF Eigenvector Following: geometry optimisation method
ESP Electrostatic potential
XYZ Cartesian coordinates (.xyz file)
ZMAT Z-matrix: another way of representing atomic coordinates