Computational Chemistry A teaser introduction
José R. Valverde CNB/CSIC
© José R. Valverde, 2013
CC-BY-NC-SA Welcome to
the
WORLD
of
TOMORRO W Introduction
Computational chemistry is a branch of chemistry that uses principles of computer science to assist in solving chemical problems.
● Taken from Wikipedia (don't forget your contribution).
Atoms and Molecules
DO
NOT
EXIST
What we believe that might possibly exist:
Space/Time distortions (energy) that concentrate on deep wells (particles) that are more or less likely (wave function) to be found somewhere (orbitals) in Space/Time.
Start Gabedit
http://gabedit.sourceforge.net
Open a terminal and enter the command:
gabedit &
Gabedit main window
Gabedit relies on other programs to do the calculations. Many of these other pograms are also free as well (MPQC, NWCHEM, etc...)
Getting started To begin, we need a molecule to work with. Click on the small icon with a small molecule (labelled “Draw a Geometry” to get started.
Load a PDB molecule
Instead of drawing a molecule, we will just load a small one, aspirin, to save up time. Press the right mouse button in the drawing window to bring up the menu and select “Read a PDB file”. Open a molecule Open a file containing aspirin coordinates: ~/Documents/aspirin/acetylsalicylic_acid.pdb. Note that navigating the directories/folders is easy. And note as well that recently used folders are remembered.
Set atom types
While not strictly needed for many tasks, this is very important. Not all atoms are born equal. Context may be very important even for atoms of the same kind. We should always assign atom types first. Molecular Mechanics
MM treats atoms as charged soft balls and bonds as springs. While not chemically accurate it is fast!. Let us start by optimizing the structure (look for its lowest energy conformation). You can do this
from the menu. MM Gradient options
This is nothing but a mathematical optimization problem. The most commonly used optimization methods are available and you can fine tune their parameters.
Optimized structure
All we need to do is be patient. After a short while, we should have an “optimal” structure.
Minimization
This is a purely mathematical problem.
● optimize potential energy (interatomic interactions) But molecular functions have specific features:
● they are multidimensional ● they yield complex hyperplanes It is possible that the optimization method ends finding a local minimum in the potential energy surface Ironsmithers found a clever way to make good
swords very long ago Conformational Search
We can compute interaction forces and from them: velocities changes with time and energy (temperature) Heating we can exit local wells and search for better
conformations. Conformational search
We will heat the molecule and record the 10 best conformations found. We will also further optimize each of them. Remember to select where to save the results so you can find
them later. Simulated annealing We are interested in heating the molecule to a large temperature to help it escape local minima. You can save the intermediate conformations (trajectory) and calculated properties as well as set a number of
parameters. Gradient options
Remember, we are looking for the best conformation We also need to state which mathematical approach shall be used to detect minima.
The force field
This is just an esoteric name for the set of parameters we use to define interatomic interactions. Amber is likely the most popular one. It defines atom radius, bond flexibility, charges, etc...
A general potential force field
Potential energy is a function of atomic positions V = E + E bonded non-bonded E = E + E + E bonded bond-stretch bond-bend bond-rotation
Non-bonded interactions
Sum of all inter-atomic interactions Van der Waals Electrostatic Hydrogen bonding (optional) Must be computed for each atom against all others (N2) Van der Waals Computed as a Lennard-Jones potential Electrostatic Computed as classical interaction
Heating the molecule
As you can see, the conformational space explored includes all sorts of conformations. The best 10 will be saved.
Final optimization After the heating is finished, each of the saved conformations is successively optimized in turn.
Final geometries
Final results are saved for you to review.
Schröedinger's cat
(Picture removed to avoid injury to sensible persons) Kitty was dead and alive at the same time until someone opened the cage.
We are always in all ways nowhere. Now. Here. (Flight of Icarus)
Electrons are nowhere until the wave function collapses by the active site's interference.
Modern Chemistry
With increased computer power, interest has raised on using more accurate methods. Quantum mechanics considers all electrons and so can provide a better description, but can easily become prohibitively expensive. A middle ground semiempirical methods substitutes as many QM parameters as possible by experimental data, speeding up calculations significantly.
MOPAC Optimization
Click the right mouse button to bring up the menu and select Semi empirical optimization using Mopac. Note that you can use other programs too. MOPAC Options You can now select the quantum parameters to use. Note that you can add additional keywords to fine tune the calculation (e.g. adding solvent) and do not forget to select the working folder and output file. Monitor optimization results
It is always wise to check how did the calculation go You can see each tested conformation clicking on the dots in the energy graph.
SE conformational search
Just like with MM we might have found a local minimum. We can also play heat and seek.
SE General options
Select the number of local minima (best conformers) to keep, where to save the results and whether each conformer should be further optimized and to which extent.
SE Dynamics options
We'll select a short simulation for the tutorial. Quantum mechanics is much more expensive. Model We no longer need a force field, but must state the quantum model to use. You can fine tune it if you want (e.g. to add solvent) Explore the results
Once done, we can explore the conformers selected and their relative energies clicking on the energy graph.
Molecular Dynamics
Once we know we have a good starting structure we can now consider studying its dynamical properties. Typically, we will start by heating to room temperature, then allow the molecule some time to stabilize at the target temperature before starting the collection of data (production). Often we will also want to cool down the structure at the end (do a final optimization) to see if it returns to the original structure (ever fried an egg?) Molecular Dynamics
MD parameters
As you can see, the times for heating, equilibration... have changed. So has the temperature which is more sensible (300K approximates
room temp.). Why MD
Running MD simulations yields lots of valuable information: Average values
● average conformation, viscosity, movility, charge orientation, stability... Dynamic values
● flexibility, movement, changes with different conditions (T, E, V...), intermolecular interactions, etc,..
Point values (maxima, minima, extremes...) MD limitations
Can aspirin stand 1000K? Likely not. MD does not allow for bondbreaking/formation
MD cannot be used to model chemical interactions MD cannot explain reactivity or electronic properties
● But CAN provide very useful insights Atoms DO NOT exist in molecules.
● the electron cloud spreads around in all the space
concentrating in areas close to nuclei. MOPAC
Click on the MOPAC icon to start a new semi empirical quantum mechanics calculation
http://www.openmopac.net Single-Point calculation
A singlepoint calculation only computes the electronic distribution in the defined state.
ergoscf.org
MOPAC input file
You can modify the MOPAC input file to adapt it to your needs.
Save file
Save the file you created so that you can find it later.
Save file dialog
Try to remember the name you give the file. A good name would indicate the compound, the calculation done and its order in your work flow.
Run
Click on the small clockwork icon to run a program.
Running MOPAC
Verify that the program to be run is the one you want.
Output tab Select the output tab by the MOPAC input file to see the results of the calculation. Note that it may take long to finish and not be terminated yet. Update/end
Click on “Update/end” to re-read the output file.
NWchem
Click now the NWchem icon to start a new calculation using a more accurate method (a fully ab initio model). http://www.nwchem-sw.org Do a single-point calculation
Use Pople basis set 3-21G. This is not too accurate but runs fast enough for a first approximation. Normally we would use more accurate (and slower) basis sets afterwards.
Run program from menu
It's the same
Run parameters
Note that you can run programs on remote (and likely more powerful) computers.
Go to the output tab
Press Update/End
This will take longer, you will need to keep updating until the program finishes.
Wait
Ab initio calculations can take a very long time. You know when they end by looking at the end of the output.
You may want to try...
MPQC http://mpqc.org GAMESSUS http://www.msg.ameslab.gov Firefly/PCGAMESS http://classic.chem.msu.su ABINIT http://abinit.org PSI4 http://www.psicode.org
FreeON http://freeon.org ErgoSCF http://ergoscf.org
SIESTA http://www.icmab.es/siesta
ORCA, Octopus, Quantum Espresso, ACES3... Energy
∆ HF : Heat of formation
● Heat of formation of a compound from components in standard natural state ● Commonly used by semiempirical methods Total Energy
● Heat of creation of a molecule from nuclei and electrons ● Commonly used by HF and DFT methods Energy of existing molecules is < 0
Isomer stability
A chemical reaction where each isomer is a product or a reactant
● Isomer1 ↔ isomer2
∆ ∆ ∆ Eisomer = Eisomer2 – Eisomer1
∆E < 0 => isomer 2 is more favorable
Cyclohexane
Open cyclohexane in boat conformation c6boat
● Compute energy Open cyclohexane in chair conformation c6chair
● Compute energy Open cyclohexane in twisted boat conformation c6twboat
● Compute energy K10: sort numerically
● 26.5239 < 23.09753 < 20.35 Balanced reactions
reactant1 + reactant2 … ↔ product1 + product2 …
∆Ε Σ Σ reaction = E product i – E reactant i
∆E < 0 => favorable, exothermic
∆E > 0 => disfavorable, endothermic
Diels-Alder reaction
Cycloaddition Open reactants and compute energy
Open products and compute energy Calculate the difference
Hf = -24.295460 Hf = 29.11399 Activation energy ∆E‡
∆ Σ E‡ = ETS – E reactants TS = Transition State Requires knowledge of transition states
Cycloaddition
Open transition state (ts.mol2) Compute energy
Compute difference between TS and reactants.
Hf = -24.295460 Hf = 29.11399 Hf = 78.88575 Equilibrium constant
Keq = Equilibrium constant
∆ Grxn = Free energy of reaction “rxn” ∆ ( G / R T) Eeq = e R = Gas constant T = Temperature in Kelvin degrees At room temperature (298 ºK), using a. u.
∆ ● (1060 G) Keq = e
Free Energy (∆G)
∆G = ∆H – T ∆S
● ∆ Hrxn = enthalpy of reaction “rxn”
● ∆ ∆ Σ Σ Hrxn = Erxn = E prod i – E react i
● ∆ Srxn = entropy of reaction “rxn”
● ∆ Σ Σ Srxn = Sprod i – S react i ● In many reactions ∆S is negligible and
● ∆ ∆ ∆ G = Hrxn = Erxn ∆ ∆ (1060 G) (1060 E) Keq = e = e Reaction rate constant
Krxn is related to the free energy. If entropy is neglected ∆ ( E‡ / R T) Krxn = (kg T h) e
● kg = Boltzmann's constant ● h = Planck's constant ● ∆E‡ = activation energy At room temperature and with ∆E‡ in a. u. ∆ 12 (1060 E‡) Krxn = 6.2 ∙ 10 ∙ e
Half life (t½)
Amount of time required for the reactant concentration to drop to ½ the original value For a firstorder rate law
Rate = Krxn [ reactant ]
T½ = ln 2 / Krxn = 0.69 / Krxn
Go back to aspirin run
Visualize orbitals/density
Click on Dens/Orb. A new window opens. There use the right mouse button to open a mopac AUX file from the menu. Select molecular orbital
You'll get a listing of molecular orbitals. Select the one you want to visualize (Occ. means occupancy).
Select calculation precision
Define isovalue for surface
We cut the MO surface at a given density value which corresponds to a probability of finding the electron.
Aspirin orbital
Select a different MO
Choose LUMO
LUMO is the first MO with an Occ. value of zero
Aspirin LUMO
Open NWchem output
Select orbital
Note that with NWchem output the HOMO is not automatically selected.
Select HOMO
HOMO is the last orbital with an Occ. value of one.
Aspirin HOMO
Orbitals
Positive or negative amplitudes are rendered in different color Nonbonding
● Confined to a single nucleus Bonding
● Extending over bonds and several nuclei Antibonding
● Expands a bond but contains a node (0 amplitude) splitting it in two regions
Mixed A Molecular Orbital zoo
σ bonding π bonding δ bonding
σ antibonding π antibonding δ antibonding δ orbitals are only seen in transition metals complexes φ (phi) orbitals are conjectured for diuranium U2 MO examples
Methylene: MO1 H2: MO1 non-bonding σ bonding O2: MO4 π bonding
H2: MO2 σ antibonding
O2: MO6
π antibonding Electronic density
Aspirin electronic density
Chemical propensity
Some times you see nothing
Change surface isovalue
Automatically find isovalue
Aspirin Fukui calculation
Visualize MD trajectory
Open a saved trajectory
Play MD trajectory
8-oxo-GTP GTP
HOMO
Computed with ErgoSCF at the 6-31G** level from PDBechem entries 8GT and GTP
LUMO
Thanks
To all of you
● For coming... and not falling asleep To the organizers
● For this wonderful opportunity To CNB/CSIC, EUCOST, CYTED
● For funding
Questions?