Mod:Second Year Modelling Workshop

From ChemWiki
Revision as of 08:50, 12 October 2010 by Rzepa (Talk | contribs) (Using ChemBio3D)

Jump to: navigation, search

Forward to coursework or directly to NMR Karplus for expt 1S.

Introduction

This workshop comprises a single 2 hour session which serves as an introduction to a technique known as molecular mechanics modelling. The course consists of the following components

  1. A short introduction to the molecular modelling programs Ghemical
  2. An opportunity for you to try these programs out on up to a set of mini-projects, each on a slightly different theme (do as many as you can in the workshop time. You should target doing at least the first five).
  3. At the end of the workshop, you will have produced numerical answers to questions posed in each problem.
  4. The idea is that you will then use such techniques whenever the opportunity arises during the course of lectures, labs and tutorial problems (but unfortunately not, yet, examinations!).

ChemBio3D

A Site License for a program system called ChemBio3D is available for you to install on your own computer.

What does the ChemBio3D Program Do

The Program is found from the Windows Start menu in the folder ChemBioOffice 2010, as ChemBio3D Ultra 12.0. It loads up with two side-by-side windows. To the right, you will recognise the familiar ChemDraw Window. To the left is a version of the molecule to which three dimensions have been added. Initially, the third dimension is added using very simple rules inferred from the Chemdraw structure drawing, coupled with the stereochemical notation you may have used. This structure can then be refined using a technique called Molecular mechanics.

  1. This defines a mechanical model of a molecule based in essence on Hook's law. This specifies how much energy it takes to distort a spring (in this case a bond or angle) from its equilibrium position. ChemBio3D has built-in force constants for various types of bond (and angle). Together with other terms, this collection is called a force field, and the total energy calculated using this field is called the strain energy.
  2. This energy is then minimised using standard algorithms by adjusting the values of the bond lengths, angles, torsions (and non-bonded terms), producing an optimised geometry. Any given geometry represents only one minimum of potentially many. There is no easy way of finding the lowest minimum of all, often called the global minimum, and you have to use your knowledge of chemistry and molecules to search for this.
  3. One feature characteristic of molecular mechanics models is that once defined, a bond cannot break (Hook's law, a quadratic function, predicts the energy rises to ∞ as the distance increases). This has an advantage: you decide what atoms are connected, by which type of bond, and they remain so! The disadvantage is that reactions cannot be studied using this methodology.
  4. Currently, the ChemBio3D can handle only (some) combinations of the common elements. It does not handle metals and most of the 'left-hand-side of the periodic table.

Using ChemBio3D

Toolbar1.jpg
Place the mouse cursor in the rhs Chemdraw Window, and sketch your molecule.
  1. Trace over a bond twice for double, thrice for triple.
  2. Use the hash and wedge keys to impart stereochemical information, including stereochemistry at ring junctions.
  3. Use the A item in the Chemdraw menu to change carbons to eg Br, Cl, etc.
  4. Show the configuration of chiral atomic centres by a right mouse click in the drawing area, and from the menu selection that appears, select object and then show stereochemistry. The R/S notation for each centre appears. Check its correct by focusing on the lhs 3D window, select the rotate icon (to the right of the little hand in the second row) and orientating the lowest priority group at any given chiral atom away from your viewpoint, assign the priorities of the remaining three groups.
  5. Use the templates to deposit fragments into the ChemDraw window. Learn how to join fragments together by either atoms or bonds.

Once the basic drawing is complete, focus on the 3D window.

  1. Use icon labelled 3 to set mouse-driven rotation of the molecule. Inspect it in 3D.
  2. To move an atom (for example to change a hydrogen from pointing up to pointing down) firstly select it using icon 2, then set move using icon 5, then drag the atom from where it is, to where you want it to be.
  3. Once you have a structure that is approximately correct, its time to invoke the Molecular-mechanics based tidying of the 3D coordinates. From the top menu, invoke calculations/MM2/Minimise energy. This will take about 2-20 seconds. A total (steric) energy is printed in the information box at the bottom (in kcal/mol). Record this energy.
  4. Using the editing buttons, make appropriate changes (such as moving atoms, or, in the Chemdraw Window, changing the stereochemistry), and repeat the minimisation. Compare the two energies, and decide on that basis which isomer is the most stable.
  5. Hint1: If you want to move an atoms (say to change a conformation from chair to boat), firstly delete on the hydrogens on it, then move it, then (via structure/rectify) re-add the hydrogens, and finally reminise. If you do not remove the hydrogens first, the moved atom is quite likely to spring back to where it originally came from.
  6. Hint2: To change the conformation about a single bond by adjusting the dihedral angle, proceed as follows:
    1. Using the atom select tool (arrow, first icon on left above) and (pressing the shift key after the first selection), select the four atoms defining the dihedral (for example, Br, C, C, Cl).
    2. Pull down menu Structure/Measurements/Display dihedral measurement' produces a measurement box. In the box labelled Actual, type the value of the dihedral you want to set and press the return key. It should "take", and the new conformation will be displayed.
    3. Re-minimise the conformation

To start a new molecule, use the capture tool (in Chemdraw) to select all of what you have, press delete, and start again.

Avogadro

This is the successor to the Ghemical program, currently under development by Geoff Hutchison. Whilst based on the same opensource libraries as Ghemical, it implements a more modern and extensible interface, which can take a little while to get used to. We hope to replace Ghemical with Avogadro during 2009-2010 when it comes out of beta testing, but if you want to take a peek at it, please fee free to do so.

What does the Avogadro program do?

It does all that Ghemical does, but extends in in several significant aspects. The most important is that it implements the UFF (Universal force field), which allows a much wider range of elements to be incorporated into your model (including inorganics). Another obvious change is the geometry optimiser, which can run constantly during the process of building and editing a molecule (often also called the rubber-band mode, since you can tug at individual atoms and have them snap back into place under the influence of the optimizer).

Using the Avogadro program

  1. Main panel of Avogardo program. Click on the little icon to the right of this text to expand any image
    The program is invoked by clicking on the icon on the desktop with the name Avogadro. This opens up the display shown on the right.
  2. The most important controls are shown bounded by a red box in the graphic on the right. If you hover the mouse over each icon, an explanation of its function will appear on the screen.
  3. The left most (of the nine icons) is the build/draw mode. The atom type and bond type currently in force for building are shown in the menu which appears when this icon is selected. It also includes a fragment library which you can use for building.
  4. The next icon along is the Navigation or viewing tool. If you click with the mouse anywhere except on an atom, moving the mouse will rotate the molecule. If you do click on an atom, that is used as the centre of origin for the rotation. A right mouse click will translate the molecule, whilst Zoom is achieved with the scroll (middle) button.
  5. The third icon is a bond-centric manipulation and information tool. Most simply, press (and keep pressed) the mouse on an atom or bond, and information about this will be displayed.
  6. The 4th icon can be used to manipulate (move) the position of individual atoms, as for example to change a trans relationship to a cis relationship. Click on an atom, and whilst keep the mouse depressed, move it to where you want it to appear.
  7. The 5th icon is a selection tool. Multiple selections are invoked by pressing the shift key.
  8. The 6th icon is an auto-rotation tool
  9. The 7th icon (gearwheel) is the auto-optimization tool. Here you can select the force field (the default, Ghemical, is fine for most organic molecules) and the algorithm used to minimise the energy calculated using this force field (conjugate gradients is fine here). Once you start the otpimization, it will remain in force for the rest of your session (unless you stop it using this menu). This if you go back to the build menu, the positions of extra atoms will be optimized on the fly as you add them. With optimization on, you will find using the 4th icon (manipulation) is an interesting battle between you and the optimizer (the rubber-band effect!).
  10. The 8th icon is the measure tool. You really do not want the optimizer on whilst you use this one! Click on two or more atoms to display distances/angles between them.
  11. The final icon is an align tool.

You will also need to use some of the other (pull down) menus.

  1. In the Build top row menu, you can add and remove hydrogens, with an interesting option of specifying the pH at which hydrogens will be added (or ionized).
  2. In the extensions/Molecular mechanics, you can display the current energy.
  3. In the extensions module, you can also create a Gaussian input file.
  4. In the File/Import/Molecule section, you can import coordinates specified in virtually any known format.


Follow ups to this Course

The molecular mechanics procedure is quick and simple, but not always accurate. Different molecular mechanics force fields also vary in their accuracy.

A proper molecular model must also take into account electrons, as noted above. But solving the necessary equations takes much more computer time. In the accompanying symmetry course in 2nd year, you will be shown how to use a programs such as Gaussview. This is the front end to a Quantum mechanical modelling program Gaussian, which you will use in earnest in the third and fourth year, along with courses which deal with the theory and practice in much more detail.

Further Documentation, Reading and Viewing

  1. Ghemical Manual gives more advanced options, but be aware it relates to an earlier version of Ghemical.
  2. Second year modelling experiment on the thermal expansion of MgO.
  3. Third year modelling experiment undertaken in the third year organic chemistry laboratory.
  4. Third year modelling lab on Inorganic Chemistry, including three advanced individual projects on Mo(CO)4L2, boron based acids and Gold interactions with Water.
  5. A local third year course on organic molecular modelling with a number of more elaborate case studies illustrating the application of molecular modelling.
  6. Some further local examples of molecular models deriving from first and second year problem classes and tutorials.
  7. The Wikipedia page on molecular modelling, a short summary which gives some good further leads.
  8. The Wikipedia page on molecular graphics, a technique that goes hand in hand with molecular modelling.
  9. A Wikibook on organic chemistry
  10. The grand Daddy of all molecular models, invented at Imperial College around 1860, and now in the archives of the Royal Institution. These models are the source of the familar colour scheme now used, i.e. Hydrogen=White, Oxygen=Red, Nitrogen=blue, etc.
  11. Another father of molecular modelling, but only on paper!, also achieved in 1861. Loschmidt constructed these models in the same sense that Watson and Crick did for DNA, as proposals, and not representing structural proof in any way.
  12. For an interesting way of presenting scientific genealogies of scientists, see J. Andraos, Scientific genealogies of physical and mechanistic organic chemists, Can. J. Chem./Rev. Can. Chim., 2005, 83, 1400-1414. DOI:
  13. The preception of the 3D character of many molecules can be enhanced by viewing using stereoscopic systems. One such system is available for student use, and lecture theatre C is equipped with stereoscopic projection.

Running Ghemical and other modelling programs on your own Computer

  1. Get Ghemical from here. It installs on either Windows XP or MacOS X. For installation notes see here
  2. Get Avogadro from here. It is available for Windows, OS X and Linux.
  3. The department also has a Site License for a program system called ChemBio3D, the terms of which allow individual undergraduates to acquire a copy of the program and to install it on their personal computer. The license is an annual one.

Submitting more accurate calculations to the Departmental SCAN Cluster

Export from Ghemical
The Chemistry department runs a SCAN (Supercomputer at Night) system, whereby teaching computers which would otherwise only idle in the middle of the night, can be used to run more time consuming calculations than is possible interactively on a single computer whilst sitting in front of it.

One far more reliable and quantitative way of modelling a molecule is to subject it to quantum mechanical modelling using Density Functional theory. In practice, this is implemented here using a program called Gaussian 03. The procedure to submit such a job is as follows:

Creating an Input file

  • After you have optimised your sketched molecule using Ghemical, as described above, right click in the black display window. This will produce the floating menu, from which you select file and then Export. Select Gaussian 98/03 Cartesian Input for the type and type a name for the file (make sure that the name of the file ends with .gjf). It will be saved in your H: drive by default.
  • Typical Gaussian input
    The file will have to be edited before it can be submitted. You can do this either with Gaussview as the program, but a much simpler method is to open the file (pentahelicene.gjf in this example) using eg the Windows Wordpad editor. This is invoked simply by double clicking on the file. Remove any existing lines starting with % or # and replace them with one of the following single lines (the second example also results in the vibrational frequences and from these the entropy being computed, and hence the zero-point and free-energy corrected value, ΔG). This latter option will take significantly longer however.

# B3LYP/6-31G(d) opt
or
# B3LYP/6-31G(d) opt freq
to produce a file that looks like the one shown on the right.

  • For a molecule the size of e.g. pentahelicene, the calculation will take about 4-5 hours overnite. If for some reason, your molecule is taking longer, you can always reduce the size of the basis set to e.g. B3LYP/3-21G*, or submit the job on a Friday, when it will have the entire weekend available to it. If you want greater accuracy (but for longer computing time), try e.g. # B3LYP/cc-pVTZ opt freq.

Submitting the Input file

  • Create a new job
    You will have to login as yourself. You can submit as many jobs as you wish through this mechanism, but you must prepare the input (.gjf) file for each first. The SCAN operates during the period 23.00-07.30 overnight. If a job is not completed during this period, it will be scheduled to run again (from the beginning) the next night. For this reason, you should only schedule jobs that can complete in an 8 hour window. In practice this means submitting molecules only a little bit larger than pentahelicene.
  • Create a project
    Select a pool
    After you are logged in you should organise your jobs by project. Create a suitable new project, then select New job, the Application (currently only Gaussian) the Project, and press continue.

  • Upload your input file
    You now have to find the Gaussian input file, as prepared above. You should Browse to drive H: to find this file. Add a description which will help you identify the job.
  • The Chemistry Condor Pool
    The job will be added to your list of jobs, andyou can view its status (but this depends on there being a vacant machine in the Condor pool).

  • Viewing the outputs
    When the job has completed, click on the Job List link. This will show all available outputs. Download the program Log file (this will help you chart whether the calculation was successfull) or the Gaussian Formatted Checkpoint file onto the desktop of the computer you are using, and the file should open up Gaussview, where the molecule can be viewed and checked. You can use the latter file to e.g. plot molecular orbitals for the molecule, view vibrational modes, etc. Full details of these procedures are described in the Gaussview manuals.

Archiving the output into a digital repository

Depositing an entry in DSpace
A very recent innovation is the Institutional digital repository, a resource for permanently archiving calculations, spectra and crystal structures. You can get a flavour of this by archiving your own calculation in the SPECTRa digital repository. To the right of the Portal display is a link termed Publish. If you click on this, and the calculation is actually in a state to be published (it may for example have failed for some reason) then appropriate metadata for the calculation is collected, and the collection deposited into the repository. From here, it can be retrieved in future.

About this wiki: Opencourseware

This course is presented as a wiki. This differs from conventional hand-outs or web pages in several aspects.

  1. Anyone (who has a valid Imperial College login and password) can edit it, for the purpose of correcting errors, clarifying ambiguities, and even adding more examples, or references to existing examples. However, this activity is not anonymous; you can see who has done what by inspecting the history of the article. If you are considering making changes, go read these rules first.
  2. You may notice that some terms appear in red. This is because the original author has enclosed the term thus: [[red]], acting as a suggestion or hint that someone may wish to pick up this term, and expand it into something informative. If you think you can add something helpful to others, please go ahead: click on the red section and starting editing! If the result contains inaccuracies, someone may come along and correct them. If you are dubious that this scheme works, just go visit Wikipedia. The idea behind this is that we produce joined up courses and not just isolated islands of information and knowledge.
  3. You can also hit the edit button if you want to find out how any particular effect is achieved. You do not have to actually change anything.
  4. This is an experiment! If you have any comments on the experiment, or suggestions for improvements, go instead to the discussion page and say something there. Do however remember that anyone in the world (!) can see this (it is opencourseware, go read this stimulating and provocative view of how knowledge may be owned and disseminated in the future), so remember not to write anything inappropriate. You cannot do so anonymously!

Forward to coursework