Troubleshooting and
Frequently Asked Questions

    Downloading, installing, and getting started
    License Issues

    How to do specific types of calculations
    Faults in MOPAC


Downloading, installing and getting started

How to do specific types of calculations

Faults in MOPAC



How is MOPAC2016 related to MOPAC2012?

MOPAC2016 has a robust editing capability for work with biomolecules, and a transition state location/refinement procedure. Other than that, MOPAC2016 is identical to MOPAC2012

MOPAC2012 contains the PM7 and PM7-TS methods.  Other than that, MOPAC2012 is identical to MOPAC2009

MOPAC2009 was MOPAC2007 with the addition of the MOZYME function.
MOPAC2007 was a re-write of MOPAC 6, and included the new method PM6.  It is owned by SCC.  The main differences between MOPAC2007 and MOPAC2002 are:

MOPAC2002 contains MOZYME, the Localized Molecular Orbital method for rapidly calculating the electronic structures of large molecules.  MOPAC2007 did not contain MOZYME.
MOPAC2002 can run MINDO/3, intersystem crossing, and the NDDO method PM5. MOPAC2007 did not contain these functions.

Does MOPAC2016 use any network connectivity?

MOPAC2016 does not use any network connectivity.

If you chose to make the executable available over a network, then you have control of that functionality, but the program itself does not have any built-in network functionality.

MOPAC2016 is designed to be completely "clean" - it does not modify the Register (in WINDOWS) or any parts of the kernel (in Linux or UNIX). This is because MOPAC2016 is intended for use in a wide range of environments and many are very sensitive about security.

What forms of MOPAC2016 manual are there?

The MOPAC2016 Manual exists in only one  form, the on-line manual you are looking at just now.  There are no PDF or hard-copy manuals.  This was a deliberate policy decision: Writing and maintaining more than one manual would involve a lot of work, and the on-line manual should be sufficient for most users.  If you need hard copy - print the individual pages involved.

Are there plans to develop a parallel version of MOPAC2016?


Downloading, installing and getting started

I'm completely new to MOPAC, how do I get started?

Start by running a simple calculation.  Open the page "Geometry Optimization Data Set for Formic Acid.  This describes the MOPAC data set for HCOOH.  Make up a file for this data set either by (A) downloading the data set, (B) highlighting the data set, and copying it into a file called "formic_acid.mop", or (C) open notepad and typing up the data set. Save it as "formic_acid.mop".  Run the data set using MOPAC2016 by following the instructions in RUNNING MOPAC. To see what the results mean, look at Formic Acid output.

Most users prefer to view their data sets and output files using a Graphical User Interface. Several are available at no cost, but of course they are less powerful than the commercial programs.

How do I run MOPAC jobs on a multi-processor machine?

By default, MOPAC will use multi-threading, so a single job will use as many threads as it needs to make the job run faster.  Conventional jobs typically run several times faster but jobs that use MOZYME normally only run a few percent faster. 

If a large number of jobs is to be run, either simultaneously or using a queuing system, the most efficient method is to add keyword THREADS=1 to the data-sets.   When multi-threading is disabled there is less system overhead and as a result normally over 99% of the CPU power will be available for running MOPAC.  If a queuing system is used, set the maximum number of jobs to be run simultaneously to 1 or 2 more than the number of available processors.  The extra one or two jobs can then make use of any unused CPU power when, for example, files are being read or written.

How do I visualize Molecular Orbitals using Jmol?

First, download Jmol, version 11.1.28 or higher, and MOPAC2016, version 7.101 or higher.
Open the Jmol package and put the contents into a folder (call this folder "whateverdirectoryjmolisin")
Run a MOPAC job with keyword GRAPHF.  This will generate a file ending in .mgf (MOPAC Graphics File)


At the DOS prompt, open the .mgf file using the command: whateverdirectoryjmolisin\jmol.jar filename.mgf
Within Jmol, do a left-click so that you can rotate the molecule, then do a right click.
Navigate Surfaces => Molecular Orbitals


In Windows:
Create a utility called Jmol_MOPAC.cmd  The utility contains one line: whateverdirectoryjmolisin\jmol.jar    %1
Right-click on a .mfg file, and browse to Jmol_MOPAC.cmd
Put a check in the option "Always use the selected program to open this type of file"
Click on "OK"
Within Jmol, do a left-click so that you can rotate the molecule, then do a right click.
Navigate Surfaces => Molecular Orbitals
After this is done, a double click on a .mgf will automatically open it.

The result should look like this:  CH2O

When I install a new version of MOPAC, why does the Version Number not change?

Every version of MOPAC has a unique version number.  The first few lines of the output should look like this:

 ** Site#: nnnn           <TextTextTextTextTextText>           Version 7.263W **
 ** Cite this work as: MOPAC2016, James J. P. Stewart, Stewart Computational  **
 ** Chemistry, Version 7.263W web: HTTP://   Days remaining: nnn **

The version number is near the end of line 2 of the output, and should  be of form n.nnnW (for Windows platforms) or n.nnnL (for Linux platforms). The decimal part of the version refers to the Julian date when the executable was made.  In this example, the version was built on the 263rd day of the year 2007. When a new executable is downloaded, the ZIP file will have the version number in the name of the file. Before opening a distribution ZIP file, look at the version number in the file name - make sure it is correct.  In some instances, the version number printed by the executable will be higher than that in the ZIP file - this is not a fault - it just indicates a minor, undocumented, bug-fix has occurred since the last official release.

A  problem sometimes occurs when a new version is installed but after it is installed and MOPAC is run, the resulting output shows that the old version is still being used. To fix this problem, first delete the old executable before opening the ZIP file containing the new MOPAC.  Then try to run MOPAC2016.  If MOPAC2016 still executes, then you have two or more old copies of the executable of MOPAC on your machine, and when you run MOPAC, it's one of these old versions that's running.

To correct this problem, delete every copy of the MOPAC2016 executable until it will no longer run.  Then install the new executable from the ZIP file.

How to do specific types of calculations

What are the defaults if no keywords are used?

If no keywords are supplied, then the following options are used:

PM7 (Default method)
Singlet or doublet (Default spin states)
Geometry optimization (Not a single point)
T=2D (Default time: 2 CPU days)
DUMP=2H (Checkpoint files (.res and .den) written every two hours)

How do I orientate the system in a special way?

The simplest way to set up the system so that it is orientated the way you want it, is to use Cartesian coordinates.  An alternative is to use three dummy atoms at the start of an internal coordinate Z-matrix, one at the origin, one along the "x" axis, and one along the "y" axis:

 XX  0.0 0  0.0 0  0.0 0
 XX  1.0 0 90.0 0  0.0 0 1 0 0
 XX  1.0 0 90.0 0 90.0 0 2 1 0

and then use internal coordinates to position the real atoms relative to the dummy atoms.  This is not as easy as using Cartesian coordinates.

Can the output be sent to a different directory?

The output is always sent to the directory that the data set was in. To send the output to a different directory, use the following procedure:

(A) Copy the data files to the directory where you want the output to go to. If the data sets were in directory A and you want the output to be in directory B, copy the data sets from A to B. Do not move the data sets - copy them - so there are two sets of data files, one in A and one in directory B.
(B) Run the data sets in directory B using MOPAC.
(C) Delete the data sets in B. Now the output of the data sets in directory A will be in directory B.

How do I run a batch job?

To run a batch job, make up a command file, e.g. MOPAC2016_Batch_job.cmd, and paste in the following lines:

REM  How to run several MOPAC2016 jobs with one command.
REM  Use the program "MOPAC2016 for all windows" version of MOPAC.
REM  Do NOT use the program "MOPAC2016 for WINDOWS XP" - if you do
REM  it will request a finish dialogue ("Program finished with exit code 0.
REM  Exit Window?) 
REM  Use commands of the following type to run all the jobs.
 call MOPAC2016.exe job1
 call MOPAC2016.exe job2
 call MOPAC2016.exe job3
 call MOPAC2016.exe job4
How do I get the atomic orbital coefficients of the HOMO or LUMO?

Add keyword VECTORS to the data set. From the output, identify the number of occupied levels. The atomic orbital coefficients of the HOMO are then given by the eigenvector with that number on the line "Root No." in the "EIGENVECTORS" array. The LUMO is the next higher eigenvector. For example, if formaldehyde (CH2O) is being calculated, then there are 6 doubly occupied levels. The sixth eigenvector is the HOMO and the seventh eigenvector is the LUMO.

Can MOZYME calculations give eigenvalues and eigenvectors?

Yes, if EIGEN and VECTORS are both present..  The operation to generate eigenvalues  and eigenvectors uses matrix algebra, and therefore will need a lot of CPU time and memory for large systems such as proteins.  Do NOT use this pair of keywords as the default.

How do I freeze an atom's position during a geometry optimization?

There are two ways to do this, depending on what is meant by "freeze."

To freeze the Cartesian coordinate of an atom.
To do this, the atom's position must be defined using Cartesian coordinates.
Consider the following entry in a Z- matrix::
H -1.31 1   0.12 1   1.89 1
The atom's position is defined using Cartesian coordinates, because there is no connectivity given.  In this entry, the hydrogen atom is located at Cartesian coordinate: (-1.31, 0.12, 1.89), and the three "1"s on this line mean "Optimize the X, Y, and Z coordinates of the atom."  If you want to freeze the position of the atom, change the three "1"s to zeros, e.g.:
H -1.31 0   0.12 0   1.89 0

To freeze a bond-length, angle, or dihedral:
Consider the following entry in a Z-matrix::
 H 1.092   1 120.615   1 179.979  1 10 9 11
In this entry, the hydrogen atom is 1.092 Angstroms from atom 10, makes an angle of 120.615 degrees with atom 9, and a dihedral of 179.979 degrees with atom 11.
The three "1"s on this line mean "Optimize the bond length, angle, and dihedral."  If you want to fix the bond-length at 1.092 Angstroms, then the entry would be:
 H 1.092   0 120.615   1 179.979  1 10 9 11
To optimize only the angle, the entry would be:
H 1.092   0 120.615   1 179.979  0 10 9 11

When a bond length, angle, or dihedral angle is frozen, the atom must be in internal coordinates.  This does not mean that the other atoms in the system must also be in internal coordinates - they can be in internal or Cartesian coordinates, as the user chooses.  The only requirement is that the atoms used in the connectivity are specified before the atom whose coordinates are frozen is specified.

For more information, see Optimization Flags.

When should I use C.I. and when should I use UHF?

The following generalizations should be used as a guide:  Use C.I. when modeling excited states or when there is a need for spin quantization.  Use UHF when optimizing geometries, doing reaction paths, calculating normal modes, etc.

Considerations: UHF is normally significantly faster than SCF-C.I., and the gradients are mathematically more stable.  So where the geometry is important - ground state or transition state - vibrational frequencies, DRC or IRC, unless there is an overriding reason to use ROHF (RHF-C.I.), it's best to avoid it.  In organic chemistry, particularly in biochemistry, UHF is best for modeling odd-electron systems, i.e., radicals. In inorganic chemistry, RHF-C.I. is often the preferred method, particularly when the electronic state is important, thus in octahedral chromium-III complexes, the ground state, 4A2g, should be defined using the OPEN(3,3) keyword. RHF-C.I. also allows high and low spin to me modeled.

In a DRC calculation, what is the relationship of kinetic energy and temperature?

For a system at the equilibrium geometry, the kinetic energy in a DRC calculation is equal to the enthalpy or internal energy of the system, or  ΔHf(T) - ΔHf(0), where "T" is the temperature of the system.

Normally, the system is not at the equilibrium geometry, so the previous statement can be generalized to:
The kinetic plus potential energy of a DRC system is equal to 
ΔHf(T) - ΔHf(0), where "T" is the temperature of the system.

So, if you know the heat of formation of the system (that is, the heat of formation of the optimized geometry) and the total energy in a DRC calculation (Heat of formation plus potential plus kinetic energy) then the internal energy can be readily calculated as the difference of these two quantities.

The temperature of the system can then be worked out by running a THERMO calculation, and finding what temperature corresponds to the enthalpy of the system in the DRC.  Consider formaldehyde:  If, in a DRC calculation using PM6, the potential plus kinetic energies equals 2.403 kcal/mol, then the temperature of the system would be 298K.  If a THERMO calculation were to be run on formaldehyde, the enthalpy at 298K would be 2.403 kcal/mol.

Why does MOPAC sometimes have difficulties with geometry optimization?

Sometimes a geometry optimization goes wrong, and MOPAC starts to give messages of the type:


The commonest cause of this is the "big ring" problem - the data set is in internal coordinates and the system contains large rings.  Small changes in internal coordinate angles or dihedrals make large changes in the distances of some pairs of atoms that should be bonded together.  If a calculation gives this message, the easiest way to correct it is to add keyword "XYZ"  Do not use this keyword if you are using keyword SYMMETRY or if any coordinates are not marked for optimization.

How do I do a geometry optimization and force constant calculation in one run?

Before a force calculation is run, the geometry must be optimized.  This is most easily done in two steps: The geometry is optimized in one calculation, then the FORCE calculation is run using the optimized geometry, in a second calculation.  Both calculations are run in one job.  This is best illustrated by the following example.  In this, the geometry of formaldehyde is first optimized, then the force calculation run.  Keyword OLDGEO instructs the FORCE calculation to use the geometry from the previous calculation.

 SYMMETRY precise
Formaldehyde (Geometry optimization)

O 0.0 0     0.0 0     0.0 0
C 1.2 1     0.0 0     0.0 0   1 0 0
H 1.0 1   122.0 1     0.0 0   2 1 0
H 1.0 0   122.0 0   180.0 0   2 1 3

3 1 4
3 2 4

oldgeo force
Formaldehyde (using optimized geometry from the previous step)
Last line of data set.

How can the re-orientation of a molecule be prevented in a polarizability calculation?

By default, a molecule in a polarizability calculation is rotated so that it is oriented along the principal moments of inertia.  To prevent this re-orientation being done, add keyword LET.

Batch jobs and Queues: How do I run multiple jobs, with a pre-set maximum number of jobs running at any one time?

There are two ways to do this: (1) A simple batch file that runs one job until it finishes, then it runs the next job, and (2) A simple batch queue system that runs a a pre-set number of jobs at the same time.  When a job ends, and there are more jobs to be run, another job starts.

Simple batch file

Write a command script (.cmd in windows, .csh in Linux and Mac) to run each job in turn.  For example, to run jobs "test_1.mop", "test_2.mop", and "test_3.mop", the following Windows script might be used:

"C:/Program Files/MOPAC/MOPAC2016.exe" test_1.mop
"C:/Program Files/MOPAC/MOPAC2016.exe" test_2.mop
"C:/Program Files/MOPAC/MOPAC2016.exe" test_3.mop

This would run test_1, then when it finished, it would run test_2, then when that finished it would run test_3.

Simple batch queue system

A utility "Wait.exe" (Download Windows and Mac versions) has been written.  It runs continuously but uses very little CPU time. While Wait.exe is running, it blocks the next instruction, here a call to run a MOPAC job, until the number of MOPAC jobs running has dropped below a pre-set limit.  For Windows, the batch file would look like this:

call C:\Users\jstewart\Utility\MOPAC.cmd Test_1
call C:\Users\jstewart\Utility\MOPAC.cmd Test_2
call C:\Users\jstewart\Utility\MOPAC.cmd Test_3

and the MOPAC.cmd would look like this:

ECHO off
REM Command file to run MOPAC jobs.
REM A maximum of n jobs, where "n" is an integer, that are allowed to run at any given time.
REM Here, n = 4, and is on the line that begins with the word "call"
REM Replace "Windows_ " with whatever the executable is called. The name can be shortened from the right to any unique string.
REM Replace "G:\" with a folder where temporary files created by wait.exe can be stored.
echo %1
call C:\Users\jstewart\Utility\wait.exe G:\ Windows_ 2
REM Only when the number of MOPAC jobs running drops below "n" will
REM wait.exe terminate, at which point the MOPAC job can start and control
REM reverts to the calling file
echo Starting job %1
start " " "C:/Program Files/MOPAC/MOPAC2016.exe" %1


In this example, Test_1 and Test_2 would start running, but Test_2 would be prevented from running until either of the MOPAC jobs that were currently running finished.

For Mac, the batch file would look like this:

~/utilities/run_MOPAC.csh "Test_1"
~/utilities/run_MOPAC.csh "Test_2"
~/utilities/run_MOPAC.csh "Test_3"

where run_MOPAC.csh would look like this:

# Run a MOPAC job.
# The job will start as soon as there are fewer than a preset number of jobs already running
# "wait.exe" checks every few seconds to see how many jobs are running.
# While wait.exe is running, it uses almost no time.
if [ -f "$1" ]
export dataset="$1"
export dataset="$1".mop
if [ ! -f "$dataset" ]
echo " "
echo Input data-set \""$1"\" does not exist
echo " "
sleep 1
/Users/jstewart/Wait/Wait.exe "/Users/jstewart/Wait" mopac2016 2
echo $datestamp " " Starting \"$dataset\"
nice open -ga /Applications/ "$dataset"

If you don't want to use MOPAC as an Application, then replace the previous line with

nice /opt/mopac/MOPAC2016.exe "$dataset"

Of course, change the paths to suit local conditions. For more details on Wait.exe, run it at the command prompt, without arguments.

There had been a fault in the MacOS that caused the computer to panic and re-boot when a lot of MOPAC jobs that used MOZYME were run simultaneously.  This fault was traced to certain read/write operations that involved hard drives or SSD's.  The fault was fixed by using scratch files instead. Also, reduce the frequency of dumps by adding DUMP=2D.  Now multi-processor Mac computers can run 50 or more jobs simultaneously for weeks at a time.

For both Windows and Mac machines, if multiple jobs are run simultaneously, so that the computer is running at its maximum rate, add keyword THREADS=1.  Without this keyword, each copy of MOPAC will try to use several threads, and the different MOPAC jobs will compete for resources, so the computer's operating system will work hard to decide which process gets which thread.  This wastes valuable CPU time.

Can you help me with my research?

No.  A small amount of research is done, but that work is restricted to investigating how well or how badly MOPAC performs in certain types of simulations. Almost all the work at SCC is directed towards making MOPAC2016 a better tool for research.    If your request has a side-effect of improving MOPAC, including improving the manual, then help might be provided, otherwise  if you really want help, contract work can be done, but be warned this is expensive because it takes time away form the primary task!  The best analogy is that the objective of SCC is to make a good television, not to produce the show that is seen on the set.  

Faults in MOPAC

Why does the gradient sometimes increase suddenly during a geometry optimization?

Sometimes, particularly during a geometry optimization, the gradient will unexpectedly increase then drop back down again.  Why does this happen?  The accurate answer is, I don't know.  There are two possibilities: (A) The geometry optimizer changed the geometry by a large amount in an energetically unfavorable direction.  This resulted in both the gradient and ΔHf increasing.  The information obtained from that faulty step then allowed the geometry optimizer to block that specific direction for future steps.  (B) There is a bug in the calculation of gradients.   If the bug is in the gradient calculation, it would be very difficult to find.

If the gradient and ΔHf  both rise then fall back, and the rest of the geometry optimization looks okay, then ignore the fluctuation.

Why do net charges not add to exact integer values?

In general, when the net atomic charges on all atoms are added, the result is not an exact integer, but instead is in error by an integer multiple of 10^(-6).   This is a consequence of the way number are represented in files.

All numbers printed in MOPAC are ill-defined in the last decimal.  Consider a regular triatomic system with net charge of +1.  Using double precision (16 significant figure precision) the charge on each atom would be:


In the NET ATOMIC CHARGES section, this would be printed as:


for a total charge of 0.999999, i.e., an error of -0.000001, or -1x10^(-6) for 6 figure precision.  If the charges were printed to 8 significant figures, the error would be -1x10^(-8), and if to 3 figures, the error would be -1x10^(-3).

Using the standard rules for addition of real numbers of finite precision, an error of a small integer times 10^(-6) for a net charge for a neutral system of n atoms would be completely reasonable.  Conversely, an error in the net charge of n times 10^(-6) would be impossible.

Why is  the sign of the gradient different from that of the forces in, e.g., Gaussian 03?

The sign of the forces is the negative of the sign of the gradient.  Gradient is ΔE/Δx, force is -ΔE/Δx. Gradient is the slope of the potential energy surface, force is in the downhill direction.

Why cannot the precision of the gradients in the AUX file be increased?

They can.  See PRECISION in AUX.

I've found a bug in MOPAC. How do I report it to get it fixed?

First, make sure that your copy of MOPAC is up-to-date.  If it's not, then download a new copy and check that the bug is still present.  If it is, then please send an E-mail to describing the bug, and include a data set that illustrates the bug, and output from that data set, as attachments