Interface mopac

Interface to the MOPAC package version 2016 (, free for academic use). MOPAC implements wide range of semiempirical methods and features the linear scaling algorithm MOZYME[1] (see Example 2).

Other versions

Older versions starting with MOPAC 2009 will work with the interface but some features might not be available.

It is possible to use the public domain version, MOPAC 7, but the support by the interface is very limited. This mode has to be switched on using the mopac_version keyword. So far, only single-point AM1 calculations were tested. Moreover, MOPAC 7 can not read cartesian geometry for small molecules, therefore the interface supports only molecules with at least 4 atoms.

Native optimization support

The mopac interface supports the native_opt protocol which allows offloading a geometry optimization to MOPAC. The optimization can be then controlled only by the native mopac keywords accessible from the cuby input using mopac_keywords.

COSMO2 solvation model

COSMO2 is a reparametrization of the COSMO model including a SASA-dependent non-polar term, parameterized to a large database of solvation energies in water.[2] It substantially reduces the error of calculated solvation energies with respect to the experiment. It is available for PM6 and PM7. When the keyword solvent_model is set to COSMO2, cuby automatically loads all the method-specific parameters and passes them to MOPAC. This default setup should reproduce the published results.


  1. Stewart, J. J. P. Application of the PM6 Method to Modeling Proteins. J. Mol. Model. 2008, 15, 765–805.
  2. Kříž, K.; Řezáč, J. J. Chem. Inf. Model. 2019, DOI: 10.1021/acs.jcim.8b00681

Methods and capabilities

The interface implements following methods (specified by keyword 'method'):

The interface implements following solvent models (keyword 'solvent_model'):

The interface implements following atomic charge types (keyword 'atomic_charges'):

Keywords used

Keywords specific for this interface:

Other keywords used by this interface:


The following examples, along with all other files needed to run them, can be found in the directory cuby4/interfaces/mopac/examples

# Mopac example 1: energy calculation, configuration

# AM1 calculation of energy
job: energy
interface: mopac
method: am1

# Water molecule, geometry taken from Cuby's internal database
geometry: A24:water
charge: 0

# Interface configuration
# Path to the MOPAC executable should be provided. Cuby assumes that the licence
# key for mopac is located in the same directory.
# This configuration is usually done not in the input file, but in a config file
# ~/cuby4_config.yaml

mopac_exe: /home/rezac/bin/MOPAC2016/MOPAC2016.exe
# Provide the actual path on your system here
# Mopac example 2: geometry optimization using the MOZYME acceleration

# Geometry optimization using the default setup:
job: optimize

# PM6 method in MOPAC
interface: mopac
method: pm6

# To accelerate the calculation, the MOZYME algorithm is used in MOPAC. It is
# not useful in such a small model system but becomes important in large
# molecules. (see MOPAC documentation:
mopac_mozyme: yes
# By default, MOPAC, provides only approximate gradients, make them more accurate:
mopac_precise: yes

# Geometry: ethylene molecule, inline input
geometry: |
  H    1.203731531   0.859887516   0.021875673
  H    1.240940213  -0.805287804   0.003291164
  H   -1.203735676  -0.860016038  -0.021615723
  H   -1.240948438   0.805422295  -0.003486081
  C    0.669000000   0.015000000   0.006800000
  C   -0.669200000  -0.015000000  -0.006800000

# In some cases (not here, the ethylene is used only as a demonstration),
# MOPAC fails to guess the Lewis structure of the molecule needed in the MOZYME
# calculation. This can be remediated by a manual input of either atomic charges
# or specification of pi bonds.

# In this case, we define the double bond between the carbons (atoms 5 and 6)
  - 5;6

# and the charge of the first atom (hydrogen)
  1: 0

# Mopac example 3: COSMO solvation and custom input

# Energy calculation in the COSMO solvent model. Additional option not
# accessible through cuby input is set using the mopac_keywords keyword.

# PM6 calculation in MOPAC
job: energy
interface: mopac
method: pm6

# Geometry: water molecule from the database
Geometry: A24:water

# Solvation
solvent_model: cosmo
solvent_epsilon: 80.0

# Extra setup: solvent radius (see
# This option can not be set using a cuby keyword. However, any MOPAC options
# can be passed to the calculation. The value of the following keyword is
# appended to the header of the mopac input file constructed by cuby:
mopac_keywords: "RSOLV=1.20"
# (multiple options can be set, separated by spaces, as in the mopac input)
# Mopac example 4: Atomic charges

# Calculation of Mulliken atomic charges

# PM6 calculation in MOPAC
job: atomic_charges
interface: mopac
method: pm6

# Atomic charges method (mopac interface provides only this one)
atomic_charges: mulliken

# Geometry: water dimer from the database
Geometry: A24:water_dimer

# Mopac example 5: Corrections for noncovalent interactions

# Calculation of interaction energy in water dimer with PM6 augmented with
# various versions of corrections for dispersion and hydrogen bonding, and
# with PM7:
# * PM6 without modifications
# * PM6-DH2
# * PM6-DH+
# * PM6-D3H4 (the latest version, most recommended)
# * PM7

# Multiple calculations are executed using the multistep job
job: multistep
# These are names of the steps:
steps: pm6, pm6-dh2, pm6-dh+, pm6-d3h4, pm7

# Setup shared by all the clculations - definition of PM6 interaction
# energy calculation
  job: interaction
  geometry: S66:01 # Water dimer
  interface: mopac
  method: pm6
  charge: 0
    charge: 0
    charge: 0

# Each step has its own subsection named calculation_stepname

# PM6: Subsection not needed, common setup is used

# PM6-DH2: corrections implemented in MOPAC are used
  mopac_corrections: dh2

# PM6-DH+: corrections implemented in MOPAC are used
  mopac_corrections: dh+

# PM6-D3H4: corrections implemented in cuby are used as modifiers
  modifiers: dispersion3, h_bonds4

# PM7: Specifying PM7 method overrides the common setup
  method: pm7