IQmol User Guide
IQmol User Guide
1 Introduction 4
1.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Building Molecules 7
4 Analyzing Results 15
2
4.8 Vibrational Frequencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5 Appearance 27
5.3 Shaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6 Sample Images 30
3
1 Introduction
IQmol is an open-source molecular editor and visualization package that runs under
Windows, Mac OS X and Linux. It can read a variety of chemical file formats including
xyz, cml, pdb, mol, fchk, cube data and Q-Chem input/output. It also includes a free-
form molecular builder that allows arbitrary molecular structures to be created. These
structures can be optimized using molecular mechanics force fields and symmetrized to
ensure the structure has the correct point group symmetry. A library of molecules and
functional groups also exists, and these can be used to facilitate building more complicated
molecules.
IQmol can operate as a stand-alone package, but has also been written to work seam-
lessly with the Q-Chem (http://www.q-chem.com) computational chemistry package. A
comprehensive input file generator, the Q-Chem User Interface (QUI), provides access
to most of the available options in Q-Chem, and these options are presented in an in-
tuitive, hierarchical fashion. The generated input files can be submitted to either local
or remote servers that have the Q-Chem software installed. In particular, a publicly ac-
cessible server is available that allows small (limited to approximately 10 mins) quantum
chemistry calculations to be run without having to purchase and install Q-Chem.
1.1 Installation
http://iqmol.org/downloads.html
For Mac (OS X) a disk image file is provided. After downloading, Simply double-click
the disk image to mount it and copy the application to the Applications directory, or any
other desired location.
For Windows an installer is provided that will guide you through the installation process
and will also create a shortcut to the application on your desktop.
For Linux .deb and .rpm packages are now available that can be installed using either
dpkg or yum:
4
The second command is required to resolve the dependency on the Qt libraries, which
you may not have installed.
1.2 Overview
The main IQmol window is shown in Fig. 1.1 and comprises the following main parts:
• The Viewer is the main part of the window and is where you can view and interact
with your molecule.
• The Toolbar at the top provides access to common commands and allows selec-
tion between different viewer modes including manipulation , selection and
building.
• The Model View panel provides a hierarchical view of the data that are available
for the molecule.
• The History panel in the lower left shows a list of the most recent actions than can
be undone, either by clicking on them or by using the Edit I Undo menu option.
5
The Model View (MV) provides control over what objects are displayed in the Viewer,
and also allows access to configuration options for these objects. Visibility is controlled
by the associated check-box. Unchecking a check-box causes the item and all its children
to become hidden. If an item does not have a check-box, for example a bond, then its
visibility can only be controlled by items higher in the hierarchy.
The appearance of many objects can be configured by double-clicking the item in the MV.
For example, double-clicking the molecule name brings up the Configure Molecule dialog
which allows you to change the appearance of the molecular structure:
Note that several molecules can be viewed concurrently in the same Viewer and the
appearance of each can be configured separately.
Figure 1.2: Rendering styles for molecular structures: balls and sticks, wire frame, space
filling, tubes and plastic.
6
2 Building Molecules
By default, IQmol opens in build mode. This is indicated by a red border around the
button in the Toolbar. The default build atom is indicated by the button and can
be changed by clicking on this button. A pop-up periodic table will appear from which
the desired element type can be selected.
Clicking in the empty Viewer window will create an atom of the current build element.
Additional atoms can be added by clicking on an existing atom and dragging the mouse.
This creates a new atom bonded to the first. To create a disconnected atom, hold down
the alt modifier key when clicking in the Viewer window. (Note that some Linux window
managers use the alt modifier for other purposes. This behavior can be changed using
System Settings I Keyboard I Short-cuts menu).
Bond orders can be increased by clicking and dragging between two existing atoms. If no
bond exists between the two atoms, one is created. Otherwise the bond order is increased.
To decrease the bond order, the bond must first be deleted and a new bond created.
Functional groups can be added by clicking the button, ensuring the Functional Group
radio button is clicked and selecting the desired group from the menu. Groups are added
in the same way as atoms, i.e. clicking and dragging from an existing atom. The empty
valence is indicated by the yellow bond and shows where the group will be connected.
Entire molecules can also be added to your system by clicking the button, ensuring
the Molecules radio
button
is clicked, and selecting the desired molecule from the menu.
Be sure to click Select or the build selection will not be updated. Unlike the other build
modes, clicking anywhere in the viewer window will add the selected molecule (no mouse
modifier is required). This allows several molecules of the same type to be added quickly,
(e.g. for solvation), but changes the usual mouse behavior. If you accidentally add too
many molecules, use the Edit I Undo menu option. When adding molecules, if you click
and hold it is possible to alter the local orientation of the newly added molecule before
being added to the global frame.
7
Figure 2.2: The build fragment pop-up that appears when the add fragment button is
clicked.
Once the backbone of the molecule has been drawn, the Add Hydrogens button can
be clicked to automatically add hydrogen atoms to any unfilled valencies.
The builder in IQmol is free-form, so your initial structure may look a bit wonky. To
improve the geometry, click the button. This optimizes the geometry using a molecular
mechanics (MM) force field. The default force field is the Universal Force Field (UFF)[2]
which has the advantage of being defined for almost all of the periodic table. However,
the UFF does not perform well for systems that contain hydrogen bonds and, in these
cases, it is recommended that the force field be changed using the Build I Select Force
Field menu option.
8
2.3 Symmetrizing Structures
If your molecule has symmetry, the MM optimization is unlikely to find a structure with
the desired symmetry. If this is the case, a nearly symmetric structure can be symmetrized
using the Build I Symmetrize Molecule menu option. Finding very high symmetry may
require relaxing the tolerance using the Build I Set Symmetry Tolerance menu option.
Relaxing the tolerance allows the program to move the nuclear coordinates more in order
to find a symmetric structure.
IQmol uses a modified version of the Symmol[1] program written by Tullio Pilati and
Alessandra Forni to symmetrize molecular structures.
Specific values for geometric parameters can be set by first selecting the atoms involved
and using the Build I Set Geometric Constraint menu option. A dialog will appear that
allows the parameter to be either set, constrained or scanned. Constrained parameters
apply to any subsequent MM optimization and are also passed through to the Q-Chem
input file, if a optimization job is requested. Scan options are also passed through to
Q-Chem for scan jobs.
Active constraints are visible in the Viewer and can be deactivated by clicking the adjacent
check-box in the MV.
9
2.5 Manipulating and Selecting Molecules
IQmol has been designed to work best with a three-button mouse or track pad. If you
are using a track pad on a Mac, it is recommended that you enable the secondary click
by going to System Preferences I Trackpad.
Manipulate mode is activated by clicking the button in the Toolbar, and implements
the following mouse functionality:
It is also possible to manipulate part of the molecule independently from the rest. To do
this, make a selection and press and hold the ctrl modifier (command key on Mac). The
mouse movements will affect only the selected atoms as follows:
• Left click and drag: Rotate the selected atoms about their center.
If only a single bond is selected, then the mouse movements have the following effects
• Left click and drag: Rotate around the axis of the bond.
Select mode is activated by clicking the button in the Toolbar, and implements the
following mouse functionality:
• Click and drag: Creates a selection rectangle, all atoms and bonds within the
selection rectangle are added to the selection.
It is also possible to select all, select none and invert the selection via the options under
the Edit menu.
10
2.6 Adding Additional Conformers
For setting up jobs that use the Freezing String Method (FSM), two conformers are
required corresponding to the initial and final geometries of the string. Having built the
first geometry, a second geometry can be added to the molecule by right-clicking the
molecule name in the MV. This brings up a context menu with the option ‘Duplicate
Geometry’. Selecting this menu option creates a Geometries item in the MV with two
(identical) geometries. The second of these can be modified by selecting it in the MV and
manipulating selected atoms in the viewer using the ctrl (command on Mac) modifier key.
If ‘Freezing String’ is chosen for the Calculate option in the QUI (see the next section)
then both geometries will be included in the $molecule section of the input deck, separated
by ****.
11
3 Running Q-Chem Calculations
IQmol has a built-in input file generator for Q-Chem calculations, the QUI, that can be
accessed via the Calculation I Q-Chem Setup menu.
The left hand side of the QUI dialog contains controls for setting up the calculation. These
are presented in a hierarchical fashion so that most commonly used options are presented
in the top part of the panel, with other relevant options appearing in the lower section
depending on what type of job is selected. More advanced options can be accessed via
the Advanced tab. The generated input file is echoed in the panel on the right hand side
of the QUI.
Clicking the Submit button will start the job running on the selected server. Once the job
has completed you will be prompted to copy the results (for remote servers) before they
are automatically loaded into IQmol. The icon appears next to the molecule name in
the MV when the molecule has been updated with the results of a calculation.
12
Figure 3.2: The Job Monitor dialog. Right-clicking on a selected job brings up a context
menu with additional options.
Submitted jobs can be monitored via the Calculation I Job Monitor menu option. This
brings up the Job Monitor dialog that provides information on the progress of jobs. Right-
clicking a row in the Job Monitor brings up a context menu which allows running jobs to
be killed or queried, and finished jobs to be opened.
If a job has the Error status, hovering the mouse over the status will show the error
message. Alternatively, double clicking the job will open the output file, if available, and
may provide additional information about why the job failed. Double-clicking a completed
job will copy the results from the server (if they have not already been copied) and reload
them into the main IQmol window.
Additional servers can be configured to access other computers that have the Q-Chem
software installed. These computers can be either local servers (i.e. the same machine
as the one running IQmol) or remote servers that can be connected to via SSH. To add
13
Figure 3.3: The server configuration dialog.
an additional server, go to the Calculation I Edit Servers menu option and click the
button.
The information required to configure a server depends on its type, but default options
exist for each case. The following indicates the minimum that should be considered:
• Local: Set the Queue System to ‘Basic’ unless you know you are running queuing
software on the machine. Be sure the QC and QCSCRATCH variables are set to their
correct values in the Run File Template, which is accessed by clicking the Configure
button.
• SSH: The host name and account on the target machine will be required in order to
connect via SSH. Set the Authentication combo-box to ‘Password Prompt’ unless
you have set up an alternative authentication protocol. Depending on how the
target host has been set up, the Run File Template may require some editing to get
it to work, but this will differ from machine to machine.
• HTTP: The default options should be suitable. Note that on Windows HTTP
should be used (and is the default in v2.8) whereas for Mac and Linux HTTPS can
be used and will be the default in future versions.
14
4 Analyzing Results
IQmol reads in a wide variety of file types and allows the user to visualize many of the
results they contain. Individual files can be opened via the File I Open menu option, or
alternatively by dragging and dropping the file onto the Viewer window. Directories can
also be opened via the File I Open Dir menu option, or by dragging and dropping the
directory onto the Viewer.
Opening directories allows more than one file associated with a molecule to be loaded
together, such as a Q-Chem output file and a formatted checkpoint file. The directory
name determines the base name for the molecule and IQmol loads all files contained
within the directory that have a matching base name.
Figure 4.1: Example: Opening the Aniline directory will load the Aniline.ESP.cube,
Aniline.FChk, Aniline.inp and Aniline.out files into the one molecule in the MV. The
notes.txt file will be ignored as it has a different base name.
Several molecular surfaces can be generated without first performing a quantum chemical
calculation. These include: van der Waals, pro-molecule and superposition of ionic den-
sities (SID). The SID surface is similar to the pro-molecule surface except that it scales
the densities based on the atomic charges of the atoms and may provide a more accurate
representation of the density of charged systems.
To plot one of these pseudo-density surfaces, double-click the ‘Surfaces’ item in the MV
associated with the molecule.
15
4.2 Plotting Molecular Orbitals From a Checkpoint File
Plotting molecular orbitals (MOs) requires a formatted checkpoint file (.fchk file exten-
sion) which is generated by default when running Q-Chem calculations from IQmol
(GUI rem variable should be set to 2). After opening the fchk file, a ‘Canonical Orbitals’
item will appear in the MV under the Surfaces item. Double-clicking this brings up the
Add Surface dialog:
Figure 4.2: The Add Surface dialog allows MOs and (spin-)densities to be plotted.
The Add Surface dialog allows MOs, total densities, and spin densities to be computed.
Several surfaces can be queued and computed at the same time, which is more efficient
as the shell data only need to be computed once. The quality, colors and opacity of
the surfaces can be be set in the dialog, and changes to these settings are saved to the
preferences as default values for any subsequent surfaces generated.
Note that each tick on the quality scale corresponds to roughly four times the number
of grid points as the previous one, and will therefore take roughly four times as long to
compute. Also note that densities require evaluating shell-pair values and are significantly
more expensive to compute that MOs, which only require shell values. For most purposes,
the pseudo densities (such as the pro-molecule density) available by double-clicking the
Surfaces item provide an almost identical density surface, but at a much cheaper cost.
Once computed, the individual surfaces appear as sub-items in the MV, and these can be
further configured by double-clicking the item in the MV.
The Add Surface dialog also contains an interactive energy level diagram on the right-
hand side panel. The vertical scale can be zoomed in and out using the scroll wheel
16
Figure 4.3: An example molecular orbital for aniline.
(or equivalent) on the mouse. The scale can also be translated by a left click-and-drag.
Individual orbitals can be selected with a left-click and this will cause the energy of the
selected orbital to appear below the diagram, as shown in Fig. 4.2.
Orbitals and densities other than those based on the canonical orbitals can also be vi-
sualized, if the appropriate calculation has been performed. Localized orbitals, natural
transition orbitals, natural bond orbitals and attachment/detachment densities are all
possible.
Dyson orbitals can be also displayed, either from the checkpoint file (requires Q-Chem
17
≥ v5.1) or from the output file using an older version of Q-Chem. In the latter case, the
PRINT GENERAL BASIS option should be set to true in order for IQmol to generate
the basis function data.
$rem
METHOD = EOM_CCSD
BASIS = cc-pVTZ
EOM_EA_BETA = [1,1,1,0]
CC_DO_DYSON = TRUE
GUI = 2
PRINT_GENERAL_BASIS = TRUE ! Ony required for QChem < v5.1
$end
If available, Dyson Orbitals appear under the Surfaces item in the Model View and behave
similarly to the Canonical Orbitals.
Each surface requires the generation of data on a 3D grid and these data are stored
internally so that subsequent calculations of the same surface (with different isovalues,
for example) are much faster. To see what grid data is being stored, right-click on the
MO Surfaces item in the MV to bring up the context menu. Selecting the Show Grid Info
menu brings up the Grid Information dialog:
Figure 4.5: The Grid Information dialog shows what data is being stored and offers the
option of exporting the data in a cube file format.
From this dialog it is possible to export cube files containing the grid data. Right-clicking
on the desired grid brings up a context menu with the Export Cube File option. The
Switch Phase option swaps the sign of the data, and may be useful when comparing
different MOs where the (arbitrary) phases differ. Cube files can be saved for future
18
plotting to avoid having to recompute the data, or for reading into another plotting
package. This is described in the following section.
Cube files contain volumetric data such as electron densities, molecular orbitals or elec-
trostatic potentials (ESP). Because the data has been pre-computed, generating surfaces
using them is very quick. After opening a cube file, a Cube Data item will appear in the
MV, double-clicking this item brings up the Add Surface dialog which allows an isovalue
surface to be requested (Fig. 4.6). The Signed check-box causes two isosurfaces to be
generated corresponding to ± the specified isovalue, and this should be checked for data
such as MOs and spin densities.
Figure 4.6: The Add Surface dialog for cube data files
Cube file data can also be used to color a surface. This will require either two cube files
(one containing the surface data and the second containing the property used to color the
surface) or a cube file and a checkpoint file. In either case, two files need to be loaded
into the one molecule using the File I Open Dir menu option, described above.
After creating a surface, double-clicking the surface item will cause the Configure Surface
dialog to appear:
The Property combo-box will have the cube data as one of the options, and selecting this
will cause the surface to be colored according to the data in the cube file. The gradient
colors can be altered by clicking inside the gradient box.
19
Figure 4.7: Configure Surface dialog showing the Cube Data as an option for the property.
Figure 4.8: Electron density plot of aniline colored according to the electrostatic potential.
Orbital animations can be created e.g., for watching the evolution of the frontier orbitals
during a reaction, or watching the relaxation of an orbital during a self-consistent field
(SCF) calculation. Key frames should be saved as cube file data in a single directory.
The base name of the cube files needs to match the directory name, e.g.
relaxation/relaxation.Frame.1.cube
relaxation/relaxation.Frame.2.cube
Open the directory, as described in Sec. 4, and right-click on the first cube file item which
appears in the MV, this will allow you to access the Surface Animator dialog:
20
The dialog is shown in Fig. 4.9 and can be used to adjust the key frame order and the set-
tings for the animation, including the numberof interpolation
frames (higher values give
smoother results, but take longer). Pressing Calculate generates each frame and indi-
vidual frames can be accessed in the MV. Use the playback options to run the animation,
recording it with the button, if desired.
21
4.7 Potential Energy Surfaces
Several calculation types provide information about the potential energy surface (PES).
These include geometry optimizations, PES scans, reaction pathways and transition state
searches. On opening a Q-Chem output file containing one of these job types a Geometries
item appears in the MV and can be double-clicked to bring up the Geometries dialog.
The pathway can be animated in the viewer using the play button, and individual frames
can be selected from either the table or by selecting a dot on the energy plot. The Viewer
window will be automatically updated with the corresponding structure. As with the MO
energy diagrams, the energy plot can also be zoomed and scrolled.
Pathways can also be read in from an XYZ file. The format for this is simply a concate-
nation of regular XYZ files:
5
-291.77177
Si 0.71979 -0.08082 -0.76577
H 0.73262 -1.27801 0.22990
H 1.10451 0.93673 0.34825
H -1.32980 0.23894 -0.28240
H -1.22713 0.18317 0.47002
5
-291.76961
Si 0.67218 -0.07483 -0.72935
H 0.73053 -1.29428 0.22634
H 1.10815 0.95270 0.34714
H -1.29502 0.23567 -0.33016
H -1.19409 0.17584 0.49156
22
....
The first line gives the number of atoms, the second (comment) line must have the cor-
responding energy and then the following lines have the xyz coordinates of each atom in
the system. This pattern repeats for as many frames as you have available.
Vibrational frequencies can be read in from a Q-Chem output file and appear as a
Frequencies item in the MV. Normal mode vectors can be visualized by selecting the
associated frequency item in the MV.
This dialog contains an impulse spectrum showing the positions and relative intensities of
the frequencies. Individual modes can be selected on the spectrum by clicking the hollow
circles, and this will also update the Viewer window with the selected mode. The impulses
can be broadened using either Gaussians or Lorentzians to give a more realistic looking
spectrum, and the image can be exported by righ-clicking on the spectrum to bring up a
context menu.
The horizontal scale of the spectrum can be zoomed (using the scroll wheel on the mouse)
and translated (left-click and drag) to give greater detail.
IQmol makes it easy to set up isotopic substitution loops for a Q-Chem vibrational
frequency calculation. First select the atoms you wish to substitute in the Viewer and
23
Figure 4.12: The Vibrational Frequencies dialog.
then select the Build I Set Isotopes menu option. A dialog will appear that allows you
to change the isotope for the selected atoms, along with the ability to change the pressure
and temperature used for calculating the thermochemical data.. Once the masses have
Figure 4.13: Isotope substitution dialog allowing non-default masses to be specified for
the selected atoms. Note that only one non-default mass is allowed for each element type.
been selected, click OK and an Isotopes item appears in the MV containing the substi-
tution information. This can be edited or checked by double-clicking on the appropriate
Substitution item in the MV. Different substitutions can be set up by selecting different
atoms in the Viewer and/or different masses and these will be looped over in the Q-Chem
frequency calculation. Each substitution loop only requires a re-weighting of the Hessian
before diagonalization and so multiple loops can be obtained very quickly once the Hessian
has been calculated.
24
4.9 NMR Spectra
NMR shieldings and chemical shifts can be visualized using IQmol. A Q-Chem calcu-
lation (JOB TYPE = NMR) must first be run and the output file loaded into IQmol.
Shielding constants can be displayed as atom labels in the viewer by selecting the Display
I Atom Labels I NMR option.
An NMR item will appear on in the MV and double-clicking this brings up the NMR
Spectrum dialog.
Various spectra can be displayed (1 H, 13 C etc.) and if a reference is available (e.g. TMS) for
the given level of theory, chemical shifts can also be displayed. Selecting rows in the table
will also highlight the corresponding atoms in the viewer for easy identification. If impulses
25
are plotted, then these can also be selected to identify which atoms are responsible for
the selected signal.
As with the vibrational frequencies spectra, NMR spectra can be exported by right-
clicking on the image to bring up the context menu.
26
5 Appearance
When viewing a molecule, the coordinates of the atoms and surfaces are fixed in the world
reference frame. When manipulating the molecule using the mouse (see § 2.5) it is actually
the camera that changes position and orientation. If more precise control of the camera is
required (e.g. for reproducing a particular image), then the camera can be configured via
the Display I Camera menu option. By default the camera uses a perspective projection
to give better depth perception, but an orthographic projection can also be selected, if
required.
Figure 5.1: The Configure Camera dialog allows precise control over position and orien-
tation of the Viewer camera.
A Global clipping plane is available and can be viewed by enabling the Clipping Plane item
under Global in the MV. Clipping planes can be useful for showing surface information
without obscuring the underlying molecular structure. While selected, the clipping plane
can be arbitrarily translated and rotated using the manipulate selection mode described
in § 2.5. Alternatively, a precise orientation of the clipping plane can be set by double-
clicking the Clipping Plane item in the MV to open the configuration dialog.
Individual surfaces can be clipped, by selecting the Clip check-box in in the surface config-
urator dialog (see Fig. 4.7) for each surface. Once a surface has been clipped, the clipping
plane remains active even if hidden by unchecking the Clipping Plane item check-box in
the MV.
27
Figure 5.2: Image showing a clipped density surface allowing the underlying molecular
structure to be more easily seen.
5.3 Shaders
IQmol uses GLSL shaders to enhance the appearance of the Viewer. Shaders can be made
active by going to the Display I Appearance menu option, and selecting the Shader panel.
28
5.4 Exporting POV-Ray Files
IQmol can generate scene files (.pov) for use with an external POV-Ray package. POV-
Ray uses ray tracing algorithms to generate images of very high quality and resolu-
tion. POV-Ray is open source, but several official and unofficial packages exist with
pre-compiled binaries, in particular testing was done using the Mac version of MegaPOV.
Binaries can be downloaded from the following sites:
• Mac: http://megapov.inetart.net/povrayunofficial_mac
• Windows: http://www.povray.org/download
To export a scene file use the Edit I Generate POV-Ray Input menu option. Scene files
are plain text with instructions for the POV-Ray program, and can be edited by the user
for fine tuning before processing. IQmol can apply several effects (e.g. surface textures)
to the molecule, and these can be configured by opening the Appearance dialog (Display
I Appearance menu option).
Figure 5.4: Appearance dialog showing Options for POV-Ray scene files.
Note that IQmol attempts to generate a scene file that matches as closely as possible
what is shown in the Viewer window. However, there may be slight variations in lighting,
color and camera angle, and some trial and error may be required to obtain a pleasing
image. In particular, the Gamma value may need experimenting with, and changes to the
ambient and diffuse lighting (via the shader options) may be required depending on if a
light or dark background is selected for the scene.
29
6 Sample Images
Here are some examples of the kinds of images that can be generated using IQmol’s
shader and rendering options. Most of these are simply screen shots, however, tiles 3, 4
and 5 in the middle row were obtained by running POV-Ray on the IQmol generated
scene file.
30
References
[1] Pilati, T., and Forni, A. Symmol: a program to find the maximum symmetry
group in an atom cluster given a prefixed tolerance. J. Appl. Cryst. 31 (1998), 503.
[2] Rappe, A. K., Casewit, C. J., Colwell, K. S., Goddard III, W. A., and
Skiff, W. M. Uff, a full periodic table force field for molecular mechanics and
molecular dynamics simulations. J. Am. Chem. Soc. 114 (1992), 10024.
31