Troubleshooting or
Frequently Asked Questions

    MOPAC2016
    Downloading, installing, and getting started
    License Issues

    How to do specific types of calculations
    Faults in MOPAC

MOPAC2016

Downloading, installing and getting started

License Issues

How to do specific types of calculations

Faults in MOPAC

 


MOPAC2016

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.

Is MOPAC2016 public domain software?

No.  MOPAC2016 is owned by Stewart Computational Chemistry.  Executables are made available at no cost to academic users, and source code will be made available to selected groups.

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.

Can I get the source code for MOPAC2016 so I can compile it?

In general, the answer is, "No!"  Currently, MOPAC2016 is made available in executable form for use on Windows, Macintosh, and Linux platforms only. 

Only in exceptional circumstances will source code be made available for this type of work. Most executables must originate from OpenMOPAC.net in order to ensure that all executables are up-to-date and have undergone quality assurance testing. 

If a specific compilation is needed, and are the resources required are provided to SCC, and attempt will be made to do the port.  The resources required are: a computer, running the target operating system, and an installed and working FORTRAN 90 compiler.  If the port is successful, and MOPAC2016 is validated for that OS, then it will be maintained on OpenMOPAC.net along with the other operating systems it currently runs on. Because this procedure obviously involves a significant expense, before any action is taken, please discuss this with SCC.

Why is my application refused with the message: "Remote host said: 554 refused mailfrom because of SPF policy"

This message will be sent if the ISP for OpenMOPAC.net has reason to believe that your E-mail address might not be legitimate.  See http://www.openspf.org/FAQ/What_is_SPF for more information.  If your application for a license key was refused because of that message, please send an E-mail to MrMOPAC@ATT.net .

Are there plans to develop a parallel version of MOPAC2016?

Done!


Downloading, installing and getting started

I've requested a license key, but nothing happened.  What has gone wrong?

When you request a license key, an E-mail message will be automatically sent to the address you used in the form.  If you do not get an acknowledgment message after submitting the form, then there is a problem with the E-mail address you provided.  No E-mail help can be given on this, since messages cannot be sent to you.

When MOPAC is run, it gives the message "Password invalid," what's wrong?

MOPAC will only work after the password has been correctly recognized.  The "Password invalid" message is given when both:

(A) The password has not been installed, and
(B) The name of the data set being run is not <password>.mop

To correct this fault, make a data set called <password>.mop, e.g., if your password is 1234567a12345678 then make a data set called 1234567a12345678.mop, and open it with the MOPAC executable.  MOPAC should produce a black screen with white text.  Press <return> two times, followed by a space the the word "yes" (without the quotation marks). then press <return> once more. Exit from MOPAC.  The password should now be installed.

Why does MOPAC gives the message "permission denied" on my Linux machine.

MOPAC needs to read the license key, which is stored in the same subdirectory as the MOPAC2016.exe executable.  If the directory or the license key are protected against reading, then the "permission denied" message will be seen.  To correct this, the subdirectory and file must have read and write permission.  Use the "chmod" command to set the permissions, the simplest is "chmod 777 /opt/mopac/".  If the "chmod" command cannot be used, put MOPAC in a subdirectory you have control over, see the next question.. 

I can't put MOPAC into the default location.

By default, the MOPAC executable should be put in the Windows folder C:/Program Files/MOPAC or the Linux or Macintosh subdirectory /opt/mopac.  If necessary, the executable can be put somewhere else.  If that is done, then the location of the MOPAC2016 license key must be defined using the environmental variable MOPAC_LICENSE.  If MOPAC_LICENSE is not defined, then MOPAC behaves as if it was defined as "C:\Program Files\MOPAC\"  or "/opt/mopac/" 

Windows:

(start) => Settings => Control Panel => System => Advanced => Environmental Variables => User variables for <user> => New => Variable name = MOPAC_LICENSE Variable value = C:\Program Files\MOPAC\ => OK => OK => OK

Linux:

Edit  .bashrc to add the line(s):

export MOPAC_LICENSE=/home/mydirectory/
alias mopac='/home/mydirectory/MOPAC2016.exe'

or

Edit .cshrc to add the line(s)

setenv MOPAC_LICENSE /home/mydirectory/
alias mopac '/home/mydirectory/MOPAC2016.exe'

Macintosh:

Edit  .profile to add the line(s):

export MOPAC_LICENSE=/home/mydirectory/
alias mopac='/home/mydirectory/MOPAC2016.exe'

 

A re-boot might be necessary in order for the environmental variable to be recognized.

Why will MOPAC not run even though the password was installed correctly?.

When MOPAC2016 is run, the message 'File "C:\Program Files\mopac\password for MOPAC2016" is currently inaccessible' appears.  The license key is correctly installed, but MOPAC2016 does not have permission to read the license key file.  Change the permissions on the file "C:\Program Files\mopac\password for MOPAC2016" so that you can open it using, e.g., notepad.

My Linux OS  is 64 bits.  MOPAC does not run.  Why?

Most likely you will need to install the 32-bit glibc and gcc libraries.

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 on several machines?

A single calculation cannot be run on more than one machine.  The code in MOPAC only allows a single processor to be used for a single calculation.  However, if several calculations are to be run, then each calculation could be started on a different machine.  That is, MOPAC jobs can be run in coarse-grain parallel mode; this is 100% efficient.  In order for MOPAC to work on a machine, the license key must exist on that machine.  Copy the folder that contains the license key from the original computer to the same position in each of the other computers in the cluster. 

If Windows, then copy "C:\Program Files\MOPAC" from the original computer to each of the other computers in the cluster.

If Linux or Macintosh, then copy "/opt/mopac" from the original computer to each of the other computers in the cluster.

Administrative point:  If all the machines are permanently connected together, then delete all copies of MOPAC2016.exe or MOPAC2016.out, except one.  Use the single remaining executable on all the machines.  That way, if you need to update the executable you only need to update the single file. Note, however, that the license key file must exist on each machine.

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)
Then:

EITHER:

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

OR

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://OpenMOPAC.net   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.
 

License Issues

Who can I share my license key with?

Each academic license key is valid for all users at the educational site.  Everyone at the site can install MOPAC2016 on their computers at the site and at home.  Please do NOT request separate license keys, because issuing each key requires some work.  The keys may NOT be freely distributed off-site.

My license is for a year. What happens when it expires?

The original plan was that users were encouraged to stay up to date with their copy of MOPAC.  To encourage this, each new version would re-set the expiry date to one year from the date of creation of the new program.  But the number of errors reported and found during testing has been less than expected (not enough testing?) so the re-set of the expiry date has been discontinued.  Users are still encouraged to stay up-to-date with their copy of MOPAC2016 even though all recent changes have only been minor bug-fixes or enhancements.  By staying up-to-date you can be sure that all the bugs that have already been reported have been fixed.

All licenses are for at least 8 months.  Long before they start to run out, a new policy will be in place. 

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:

PM6 (Default method)
RHF (Not UHF)
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
REM  How to run several MOPAC2016 jobs with one command.
REM
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
REM  Use commands of the following type to run all the jobs.
REM
 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:

NUMERICAL PROBLEMS IN BRACKETING LAMDA

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.

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

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.

A utility "Wait.exe" 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:
echo off
call M:\utility\MOPAC.cmd Test_1
call M:\utility\MOPAC.cmd Test_2
call M:\utility\MOPAC.cmd Test_3

and the MOPAC.cmd would look like this:

M:\utility\wait.exe G:\ MOP 2
call start /b /low M:\utility\Not_XP\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 contains just one line:

~/bin/wait.exe "/Users/name" MOPAC 2; nice -n 20 ~/bin/MOPAC2016.exe "$1" &

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

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

What does, "Internal Error-Unexpected error file "E:\forrtl\build\qwnbuild\qwgswc.c", line 1051"  mean?

This error is caused by a fault in Microsoft's FORTRAN compiler. It affects QuickWin programs only. There are two workarounds:

First, if the output file is okay, ignore the error message.    When you get the message, "Program Terminated with exit code 0," that indicates a normal exit.  Click on the "yes" button.

Second, replace your MOPAC executable with the "all windows" executable.  The fault you mention will not occur with the "all windows" form.

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:


0.3333333333333333
0.3333333333333333
0.3333333333333333

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

0.333333
0.333333
0.333333

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 MrMOPAC@ATT.net describing the bug, and include a data set that illustrates the bug, and output from that data set, as attachments