Basic Chemistry on the GNOME Desktop
I've realized I've missed out on a huge area of computational science—chemistry. Many packages exist for doing chemistry on your desktop. This article looks at a general tool called avogadro. It can do computations of energy and gradient values. Additionally, it can do analysis of molecular systems, interface to GAMESS and import and export from and to several file formats. There also are lots of options for generating pretty pictures of your totally new molecule that you hope will revolutionize the chemical industry.
When you first start avogadro, it opens up a new project consisting of one tab for a view of the molecule. Within this window, you can create a molecule in several different ways. If you want, you can build your molecule step by step, one atom at a time. You can click on the pencil at the top or press F8 to select the draw tool. With this, you can click and drag to draw atoms and bonds. To select different elements or different bond types, click on the Tool Settings button to get a second panel with those options available. To draw, click with the left mouse button. To erase, click with the right mouse button.
Figure 1. When you open avogadro, you get an empty view window in a new project.
You also have the option of building it up from molecule fragments. Under the Build menu item, select Insert→Fragment. This pops up a window where you can select from among molecule fragments, such as carboxylic acids, ketones, alkanes or amino acids. You even can build a buckminsterfullerene with a single click.
Figure 2. You can choose from a large list of chemical fragments in order to build your molecule.
As you build up the molecule, it appears in the view window. You also can insert a fragment by entering a SMILES text string. SMILES is the Simplified Molecular Input Line Entry Specification. Check the Wikipedia entry for more details on its format.
Figure 3. Here's what a water molecule would look like.
There is also a peptide builder under the menu entry Build→Insert→Peptide. This dialog window lets you build up a peptide by selecting the amino acids, the terminating fragments and the structure of the peptide. The available structures are straight chain, alpha helix and beta sheet.
You can make global adjustments to your molecule by adjusting the hydrogen bonds. You can do a global replacement of changing hydrogens to methyl groups. You also can change the number of hydrogen atoms based on the pH of the molecule.
You can save this molecule in several different formats, including CML, GAMESS Input, Gaussian Input, MDL SDfile, PDB, NWChem Input, Sybyl Mol2 and XYZ.
Once you are done building your molecule, one of the first things you may want to do is get an idea of what it actually looks like. As a first approximation, you can use the Optimize Geometry function, located under the Extensions menu item. This actually goes through your molecule and adjusts the bond lengths and the bond angles to optimize your molecule's physical geometry. You can select what force field is used to do this calculation. Under the menu item Extensions→Molecular Mechanics→Setup Force Field, a new window pops up letting you choose which force field you want to use, along with the number of steps to take, the algorithm to use (either Steepest Descent or Conjugate Gradients) and the convergence threshold. Depending on your molecule's complexity, some settings may work better than others. For example, the MMFF94(s) field is good for organic chemistry and drug-like molecules. If you try to optimize the geometry and get odd-looking results, checking these options should be your first step. You can see the calculation's progress by clicking on the Messages tab at the bottom of the window.
Once you have optimized your geometry, you can calculate your molecule's energy by selecting Extensions→Molecular Dynamics→Calculate Energy.
There is a limited amount that you can do directly in avogadro in terms of actual quantum-level calculations. But, that's okay, because lots of really good programs exist that already do that very well. You can use avogadro to output files that can be used by these other programs as input files to do such higher-level computations. Under the Extension menu item you will find entries to build input files for GAMESS, Gaussian, MOLPRO, MOPAC, NWChem and Q-Chem. Each of those entries pops open a new dialog window where you can select the extra options for the to-be-created input file. This includes things like the number of processors to use, the type of calculation to do or the theory to use, for example. A preview window shows you what this export file will look like, so you can be sure you're getting what you were expecting. Once you're happy, click on the generate button at the bottom of the window to generate the input file for the external program of interest.
Once these calculations are done, you can import them back into avogadro to do some analysis. You can import trajectory files or vibration files. Once that data is imported, functions are available to graph this data in order to extract information and see what's happening. For files that contain molecular vibration information, you even can graph the results as a movie. You have some options in terms of the frame rate and so on, and once you are satisfied, you can save it as an AVI file.
You also can import data from experiments too. When studying chemicals, one common experiment is to look at the spectra of the chemical of interest. To start, click on the menu item Extensions→Spectra. This pops open a new window in which to do the analysis. At the bottom of the screen, you can click on Load Data. This lets you import data in two formats: either PWscf IR data or Turbomole IR data. You can select how this data is displayed, including producing publication-quality graphics.
Figure 4. Here I'm ready to upload spectral data from actual experimental measurements.
Hopefully, this short introduction gives you some ideas for getting started. Lots of other chemistry programs exist that you can look at to offer more functions and calculations. Now you're ready to go out and do some quantum chemistry.