Skip to content

New keywords

Juvenal Yosa edited this page Nov 29, 2026 · 6 revisions

Keywords that Barranquilla MOPAC adds to MOPAC 23.1.2, and existing keywords whose behaviour it changes, described in the manner of the MOPAC manual, which covers every other keyword. All of them work in the CPU build as well as in the GPU build. The descriptions follow the source code of release v1.2.1-gpu (commit 7a46bebf).

Keyword Description
BUSSI, BUSSI=n.nn Bussi thermostat in a DRC calculation (constant temperature, NVT)
EDIIS Damped start and adaptive level shift in the conventional SCF (experimental)
HB-SMOOTH Smooth form of the PM6-DH+ and PM7 hydrogen-bond correction
HMTR Search of dihedral angles before the BFGS optimizer (experimental)
MM_CHARGES="file" Embed a MOZYME calculation in point charges read from a file
SEED=n Seed of the random numbers used by TEMPERATURE and BUSSI
SMEAR, SMEAR=n.nn Fermi–Dirac occupations with kT = n.nn eV (conventional SCF)
SWIG Smooth COSMO surface (switching/Gaussian)
TEMPERATURE=n.nn Start a DRC calculation from Maxwell–Boltzmann velocities at n.nn K
TRUST Trust-region L-BFGS geometry optimizer

Existing keywords with a changed behaviour: DRC and IRC, FORCE, FORCETS and THERMO with MOZYME, LET, NOGPU, SHIFT=n.nn in solids. Not a keyword, but new: the input chemistry check. Environment variables are on the page Running on the GPU.


BUSSI, BUSSI=n.nn

In a DRC calculation that starts with TEMPERATURE=t, BUSSI keeps the system at t K with the stochastic velocity-rescaling thermostat of Bussi, Donadio and Parrinello,1 which samples the canonical ensemble (NVT). After every integration step the velocities are multiplied by one factor, drawn so that the kinetic energy relaxes towards its canonical distribution with the time constant n.nn femtoseconds. BUSSI without a value sets 100 fs; values below 1 fs are raised to 1 fs. A small time constant couples the system tightly to the bath.

The energy that the thermostat takes out of the system or puts into it is not an error of the integration. It is added to the reference total energy, so the ERROR column of the DRC output still measures the integration error alone. The accumulated exchange is printed every 50 integration steps, after the instantaneous temperature and its mean since the start:

          TEMPERATURE: STEP      50  TIME(FS)     5.005  T(K)   194.04  <T>(K)   240.18  ENERGY TO BATH (KCAL/MOL)    -18.4783

A positive ENERGY TO BATH is energy taken out of the system; a negative one is energy put in. In the run above (chignolin, TEMPERATURE=300 BUSSI=10, started from an optimized structure) the system had cooled, as explained under TEMPERATURE, and the thermostat had put 18.5 kcal/mol into it.

From an energy minimum the temperature first falls to about half of t, and the thermostat restores it with an effective time of about twice the time constant (with BUSSI=100, crambin was still at 199 K after 100 fs). Equilibrate with a tight coupling, for example BUSSI=10, and then sample with a looser one or without a thermostat.

BUSSI requires TEMPERATURE=; without it the job stops with BUSSI AND NO TEMPERATURE. The random numbers are set by SEED=n.

PM7 MOZYME DRC TEMPERATURE=300 BUSSI=100 T-PRIORITY=0.5 CYCLES=200 GEO_DAT="protein.pdb"

See also TEMPERATURE, SEED, and in the MOPAC manual DRC, T-PRIORITY, KINETIC. Examples: molecular dynamics.

  1. G. Bussi, D. Donadio, M. Parrinello, J. Chem. Phys. 126, 014101 (2007), doi:10.1063/1.2408420.

EDIIS

Experimental. EDIIS changes the first iterations of the conventional SCF (not MOZYME, which ignores it). While the density change PL is above 0.01, and for at most the first six iterations, the new density matrix is mixed with the previous one, P = (1 − α) Pold + α Pnew, with α = 0.003/PL kept between 0.10 and 0.50. Without PULAY, the virtual levels are also shifted by an amount that is reduced in two steps, as PL falls below 0.1 and below 0.01, and is then zero. Pulay's converger is not switched on by EDIIS; add PULAY for it. Despite the name, this version does no energy-DIIS interpolation.

Solids (Tv) already start with this damped mixing by default (see SHIFT), and their level shift is the one of the solid SCF, so EDIIS adds nothing there.

EDIIS is not part of the benchmarks of this version. On the hydrogen-terminated graphene flake C192H38 (PM7, CPU of a laptop) EDIIS without PULAY converged only after MOPAC had forced all its convergers on (ALL CONVERGERS ARE NOW FORCED ON), after more than an hour, 0.03 kcal/mol above the PULAY result; with PULAY the SCF took less than a minute.

See also PULAY, SHIFT, ITRY in the MOPAC manual.

HB-SMOOTH

The hydrogen-bond correction of PM6-DH+ and PM7 is built from pieces that meet in kinks and steps: the larger of two cosines, absolute values, "no hydrogen bond if a cosine is negative", the choice of the reference neighbours of the donor and acceptor by distance, a torsion that is undefined when an angle is 180°, PM7's switch on the difference of two X–H distances, and the end of the pair list at 7 Å (PM7) or 10 Å (PM6-DH+). A geometry optimization can stop on such a kink with a large gradient that the energy does not follow, FORCE differentiates across them, and in dynamics they break energy conservation.

HB-SMOOTH replaces each piece by a smooth function: smooth maxima and absolute values of width 0.02, a smooth ramp instead of the cut at zero, both orders of two nearly equidistant neighbours mixed by a tanh of their distance difference (width 0.01 Å; all six orders for three neighbours), the torsion weighted by 1 − exp(−((180° − angle)/5°)²), PM7's switch replaced by a tanh of width 0.02 Å, and the energy switched off over the last ångström of the pair list. Far from the kinks the smooth functions approach the original ones: the hydrogen-bond energy of chignolin changed from −42.99 to −42.90 kcal/mol, that of a DNA dodecamer from −172.21 to −171.63 kcal/mol.

Both corrections of these methods also take bonds from interatomic distances at hard cut-offs, so their energy steps where a bond forms or breaks. The H-bond correction keeps an H bond only while X–H < 1.4 Å (and, of X–H···Y and Y–H···X, the one whose X comes first in the atom list), and counts the atoms bonded to the donor and the acceptor at 4/3 of the sum of their covalent radii (N–H 1.373, O–H 1.267, C–O 1.840 Å). The dispersion gives a carbon with four bonds the C6 of an sp3 carbon, and during a calculation those bonds are updated only every ten gradients. In a QM/MM scan of the attack of Ser195 on the carbonyl C of Lys15 in trypsin-BPTI, the energy stepped by −0.32 kcal/mol when the proton of Ser195 crossed 1.373 Å from N of His57, and by 0.19–0.21 kcal/mol at whichever gradient updated the bonds of that carbon; minimizations stopped pinned on the steps. The atoms that set the angles and torsions are also chosen by their distance from H, and the mixing above covers the order of the neighbours kept but not which ones are kept (the third of four, or the neighbour of an acceptor's only neighbour): in the same scan the energy stepped by 0.05 kcal/mol where HB3 and the link atom on CB of Ser195 were equally far, 4.512 Å, from the amide H of Lys15.

HB-SMOOTH switches each of these decisions smoothly over ±0.05 Å of its cut-off (for a choice by distance, of the difference of the two distances). An H bond with a bond or a choice in that range is computed with each outcome, and the two are weighted; the dispersion counts the bonds of each carbon from the current geometry at every call. Beyond 0.05 Å from every cut-off the energy is that of the standard correction (to 10⁻⁶ kcal/mol in that scan). Across the cut-offs it has no step, and the gradient of the switched terms agrees with central differences to 6·10⁻⁴ kcal/(mol Å) (0.011 across a choice by distance). Along all the straight lines between neighbouring points of the five maps of that scan (QM region alone, steps of 0.01 Å), the change of the energy agreed with the integral of the gradient to 0.016 kcal/mol or better; without the switching, one map alone had 26 places where they differed by more than 0.005 kcal/mol, up to 1.04. This part acts on isolated systems only (not on solids).

HB-SMOOTH acts only with PM6-DH+ and PM7; other methods, the H4 term of PM6-D3H4 included, are unchanged. With it, these two corrections run on the CPU; MOPAC_HB_SMOOTH_BONDS=0 keeps the smooth angular terms only, which also run on the GPU. The QM/MM interface to OpenMM always uses it, and so does scripts/mozyme_md_workflow.py. Without the keyword the corrections are the original ones.

PM7 MOZYME TRUST HB-SMOOTH CYCLES=200 GEO_DAT="protein.pdb" PDBOUT

See also DISP in the MOPAC manual. Examples: geometry optimization, molecular dynamics.

HMTR

Experimental. HMTR (Hierarchical Memetic Trust-Region) searches the dihedral angles before the BFGS optimizer starts. A population of 32 sets of dihedral angles (one at the input values, the others changed at random by up to ±2.5°) moves for at most 50 generations by a particle-swarm update (inertia 0.7, cognitive and social weights 1.6, at most 20° per generation), and after each evaluation every member takes one step along the negative gradient in its dihedral angles (radius 3° to start, between 0.01° and 30°, kept when the energy falls). The best set found is the starting point of BFGS. All other coordinates stay at their input values.

HMTR acts only when the BFGS optimizer is used (BFGS, DFP or FLEPO, or a single variable); with the default L-BFGS or with TRUST it does nothing. It varies only the dihedral angles of atoms given in internal coordinates that are flagged for optimization; with atoms in Cartesian coordinates (XYZ or PDB input) there are none, and the output says HMTR: no dihedral angle to vary (atoms in Cartesian coordinates); skipped. The members are evaluated one after the other, about 3 000 energy and gradient evaluations in all; on the GPU the swarm update runs on the device.

Until commit 8221d864 HMTR did not work: every evaluation received a wrong geometry, and the job stopped with TWO ATOMS ARE COINCIDENT or did not end. Test after the fix: PM7 n-hexane in internal coordinates, started with the backbone dihedrals at 70°, −60° and 80° (+84.15 kcal/mol): after HMTR and one BFGS cycle the heat was −35.27 kcal/mol, against −8.95 kcal/mol after one BFGS cycle without it; the all-anti conformer is at −36.68 kcal/mol.

PM7 BFGS HMTR

followed by a geometry in internal coordinates. See also BFGS in the MOPAC manual.

MM_CHARGES="file"

Embeds a MOZYME calculation in fixed point charges (electrostatic embedding, as in QM/MM). The file, named in double quotes, holds one charge per line: x, y and z in ångströms and the charge in electrons, separated by blanks, for example a TIP3P water:

  20.0  0.0  0.0  -0.834
  20.6  0.8  0.0   0.417
  20.6 -0.8  0.0   0.417

The charges enter the one-electron matrix of the QM atoms through the semiempirical two-centre integrals between each atom and a point charge, and their interaction with the cores is added to the heat of formation. The electrons are therefore polarized by the charges, and the heat of formation includes the QM–MM electrostatic energy. With GRADIENTS the gradient includes the forces of the charges on the QM atoms; for up to 2000 charges the output also gives the QM–MM electrostatic energy and the gradient on every charge (MM_GRAD lines). The output reports what was read:

 QM/MM:        3 MM point charges, total charge      0.0000 from 'charges.txt'

Check that number: reading stops at the first line that is not four numbers, so a header or a comment line ends the list there.

Restrictions:

  • MOZYME only. Without MOZYME the job stops with MM_CHARGES AND NO MOZYME (before commit e13e5f99 the charges were silently unused).
  • No cut-off and no periodic images; translation vectors are not taken into account.
  • COSMO (EPS=) does not screen the charges: they act on the solute as in vacuum.
  • The charges do not interact with each other; there is no MM–MM energy.

On the GPU the charge terms are evaluated on the device; the first evaluation of a job is compared with the CPU loops and the result is printed. The OpenMM driver in scripts/qmmm passes its charges through the libmopac API (mozyme_qmmm_init, mozyme_qmmm_step) instead of this keyword.

PM7 MOZYME 1SCF GRADIENTS MM_CHARGES="charges.txt" GEO_DAT="protein.pdb"

Example: QM/MM, example 58.

SEED=n

Sets the seed of the random numbers used for the starting velocities of TEMPERATURE and for the thermostat BUSSI. The default is 20260925. On the CPU the same seed and the same input give the same trajectory. GPU runs are not bit-reproducible, because the order of the parallel orbital rotations varies, so their trajectories separate after some time even with the same seed. Use different seeds for independent replicas. Without TEMPERATURE= the keyword has no effect.

See also TEMPERATURE, BUSSI.

SMEAR, SMEAR=n.nn

Occupies the molecular orbitals with Fermi–Dirac occupations instead of integer ones, with the electronic temperature kT = n.nn eV; SMEAR alone means 0.1 eV. It is meant for metals and small-gap solids, whose SCF with integer occupations oscillates or converges slowly. The occupation of a level of energy ε is 2/(1 + exp((ε − μ)/kT)), and the Fermi level μ is found so that the occupations hold all the electrons. The heat of formation is the Mermin free energy E − TS, which is variational in the density matrix, so the usual gradient applies (checked against central differences on graphene).

At the end of the calculation the output gives the Fermi level and −TS, and the term that estimates the energy at kT → 0:

          FERMI LEVEL =   -5.7047 EV,  -TS =   -0.000010 KCAL/MOL
          E(kT -> 0) ~ E - TS/2: FREE ENERGY +      0.000005 KCAL/MOL

E(kT → 0) ≈ (E − TS) + TS/2: add the last number to the heat of formation.

SMEAR switches the level shift and the pseudo-diagonalization off and uses Pulay's converger from the first iteration. It applies to closed-shell RHF calculations with the conventional SCF, molecules or solids. With UHF or an open shell it is ignored, with the message SMEAR IS FOR CLOSED-SHELL RHF ONLY; IT IS IGNORED; MOZYME ignores it without a message; a value of 0 or less turns it off. The free energy depends on kT, so compare only results at the same kT, and check a result with two values.

PM7 1SCF SMEAR=0.1 GEO-OK

See also SHIFT, PULAY in the MOPAC manual. Example: periodic solids, example 41.

SWIG

Replaces the standard COSMO surface by the switching/Gaussian surface of Lange and Herbert.2 The standard surface is built from points that are either on or off the surface and from segments that change in steps as the atoms move: moving one atom of chignolin by 0.001 Å changed the energy by up to 0.03 kcal/mol, the analytic gradient differed from the slope of the energy by 1–2 kcal/(mol Å), and optimizations in water did not converge. With SWIG every atomic sphere carries fixed points, each a Gaussian charge whose weight goes smoothly to zero as it enters another sphere (points whose weight falls below 10−4 are left out). The energy then changes smoothly with the geometry, and the analytic gradient agreed with finite differences of the energy to 0.01–0.04 kcal/(mol Å). Use SWIG for geometry optimizations, FORCE and dynamics in a solvent.

SWIG acts only together with EPS=n.nn; without it, it does nothing. The default number of points per atom is 92 with SWIG (a third of that for hydrogen) instead of 42; NSPA=n overrides it. The surface is the union of the atomic spheres, without the exclusion of crevices by a solvent probe, so solvation is somewhat stronger than with the standard surface (chignolin: −66.3 against −61.3 kcal/mol). The energy converges slowly with the number of points (chignolin with NSPA = 42, 92, 162, 252: −920.54, −924.56, −925.39, −925.70 kcal/mol), so compare energies only at the same NSPA. SWIG works with MOZYME and with the conventional SCF; with MOZYME on the GPU the COSMO gradient is computed on the device.

PM7 MOZYME EPS=78.4 SWIG TRUST CYCLES=200 GEO_DAT="protein.pdb" PDBOUT

See also EPS, NSPA, RSOLV in the MOPAC manual. Examples: implicit water.

  1. A. W. Lange, J. M. Herbert, J. Chem. Phys. 133, 244111 (2010), doi:10.1063/1.3511297.

TEMPERATURE=n.nn

In a DRC calculation the atoms start with velocities drawn from the Maxwell–Boltzmann distribution at n.nn K instead of at rest. The net momentum is removed, and the velocities are scaled so that the kinetic energy is exactly ½(3N − 3)kT for N atoms. Without a thermostat the total energy is then conserved (NVE); add BUSSI for a constant temperature (NVT). The output reports the start,

          STARTING VELOCITIES FROM THE MAXWELL-BOLTZMANN DISTRIBUTION AT   300.00 K,     417 DEGREES OF FREEDOM

and every 50 integration steps the instantaneous temperature, its mean since the start and the energy exchanged with a thermostat (zero without BUSSI; see BUSSI for an example).

From an energy minimum, about half of the kinetic energy flows into the potential energy in the first 10 fs or so, and the temperature falls to about n.nn/2. This is equipartition, not an error. For a run at a given temperature, start from an equilibrated structure or use BUSSI.

DRC chooses its own integration step, about 0.1 fs when hydrogen atoms move. T-PRIORITY=0.5 prints a row of the DRC table every 0.5 fs, CYCLES=n stops after n rows, and the trajectory, one frame per row, is written to <input>.xyz.

TEMPERATURE requires DRC; without it the job stops with TEMPERATURE AND NO DRC. When the velocities are given in the input (VELOCITY) or come from a restart file (RESTART), no velocities are drawn. In an IRC calculation TEMPERATURE is ignored.

PM7 MOZYME DRC TEMPERATURE=300 T-PRIORITY=0.5 CYCLES=200 GEO_DAT="protein.pdb"

See also BUSSI, SEED, and in the MOPAC manual DRC, T-PRIORITY, VELOCITY, KINETIC. Examples: molecular dynamics, periodic solids.

TRUST

Optimizes the geometry with a trust-region version of the L-BFGS method. It is meant for MOZYME. A MOZYME SCF is converged only to a small error that does not vary smoothly with the geometry; the line searches of the default L-BFGS-B optimizer then fail and undo steps, and each SCF starts from the localized orbitals of the previous one, which then belong to a geometry that is no longer used. TRUST never goes back: every new geometry is accepted.

The step is the L-BFGS direction from the last 12 gradient differences, scaled so that no variable changes by more than the trust radius. The radius starts at 0.05 and is at most 0.2 (SLOG=n.nn sets the maximum; SLOG alone, 0.05), in the units of the optimized variables: ångströms for Cartesian coordinates (PDB input), radians for the angles of internal coordinates. It is halved when the gradient along the last step shows that the step went past the minimum along that line, doubled when a step limited by the radius was still downhill, and halved, with the stored gradient differences discarded, when the energy rose by more than 1 kcal/mol.

The optimization ends when the gradient norm falls below GNORM (default 1 kcal/(mol Å); 1, 3 or 5 for solids with one, two or three translation vectors; a fifth of that with PRECISE), after CYCLES steps, when the time runs out, or after 30 consecutive energy rises of more than 1 kcal/mol (60 with LET or PRECISE, n with LET(n)), with the message HEAT OF FORMATION IS ESSENTIALLY STATIONARY. Once the gradient norm is below 10 × GNORM, every SCF is converged fully, and for GNORM below 0.6 MOZYME also tightens its SCF criterion below 2 × GNORM, so that the error of the gradient stays below GNORM. The result is the last geometry, not the lowest-energy one seen during the run.

When TRUST stops at the cycle limit (NUMBER OF CYCLES EXCEEDED. NOW GOING TO FINAL) or at the time limit, it writes a restart file <input>.res (also every DUMP interval), as the default optimizer does; MOPAC writes no ARC and no PDBOUT file then. RESTART with TRUST continues from the stored geometry with an empty memory and goes on counting cycles; without TRUST the default optimizer starts there; 1SCF RESTART PDBOUT writes that geometry as a PDB file. (Before commit b46602aa, TRUST wrote no restart file.) TS, BFGS, DFP and FLEPO take precedence over TRUST. It also works with the conventional SCF.

PM7 MOZYME TRUST CYCLES=200 GEO_DAT="protein.pdb" PDBOUT

See also GNORM, CYCLES, LBFGS, SLOG in the MOPAC manual. Examples: geometry optimization, implicit water.


Changed behaviour of existing keywords

DRC and IRC

Every step converges its SCF to the SCF criterion. In MOPAC 23.1.2 the SCF of a step could stop early, through a rapid exit meant for geometry optimization. TEMPERATURE=, BUSSI and SEED= add initial velocities and a thermostat to DRC.

FORCE, FORCETS and THERMO with MOZYME

Vibrational frequencies are finite differences of the gradient, so every displaced SCF must be converged. With MOZYME, FORCE, FORCETS and THERMO now use the SCF criterion 10−6 (with a matching smaller LMO threshold) unless SCFCRT or RELSCF is given: at the MOZYME default criterion the zero-point energy of a small protein was wrong by 50 kcal/mol, at 10−6 it agreed with the conventional SCF within 0.05 kcal/mol. scripts/mozyme_parallel_force.py spreads the displacements over several MOPAC processes and GPUs.

LET

Also lets a job continue after errors of the input chemistry check; the report stays in the output.

NOGPU

Runs the job on the CPU code path of the same program: in this version it turns off every device path (the MOZYME SCF and gradient, the conventional SCF of molecules and solids, the GPU eigensolver of C.I.). A job of 100 atoms or fewer runs on the CPU anyway, unless the environment variable MOPAC_FORCEGPU=1 is set. MOPAC_NOGPU=1 does the same as NOGPU for every job started from that shell.

SHIFT=n.nn in solids

In MOPAC 23.1.2 the SCF of a solid (Tv) used a fixed level shift of 80 eV and ignored SHIFT. In this version the default for solids is 20 eV with a damped start (density mixing in the first iterations, as with EDIIS), which reached the right state with fewer iterations in the test cells. SHIFT=n.nn sets the shift to n.nn eV and turns the damping off; SHIFT=80 restores the shift of MOPAC 23.1.2, and SHIFT=0 turns the shift off. For every setting, Pulay's converger is switched on once the SCF of a solid has taken 50 iterations. SMEAR overrides SHIFT.


Input chemistry check

Not a keyword: every PDB-derived input is checked before the SCF. Without MOZYME, and with ADD-H or SITE=, only the structural checks run (fragments, special positions); a MOZYME job with a Lewis structure also gets the check of formal charges. With MOZYME, LEWIS (which only reports the Lewis structure) skips the check. If the check finds errors, the output gives the report and the job stops with INPUT CHEMISTRY CHECK FOUND ERRORS. FIX THE INPUT, OR ADD KEYWORD "LET" TO CONTINUE ANYWAY. With LET it continues (Keyword LET present: continuing despite the errors above.). With MOZYME, PRECISE is replaced by LET, as in MOPAC 23.1.2, so such jobs report the errors and continue. Inputs without errors run with no report.

Finding Level
A group of several atoms on a crystallographic special position (REMARK 375) error
An incomplete small group (SO4, PO4, NO3, EDO, GOL, ACT, FMT, DMS, MPD, TRS) error
A formal charge of ±2 or more on H, B, C, N, O or F error
Amino acid with missing side-chain atoms warning
Atoms with partial occupancy warning
All Arg/Lys/Asp/Glu/His neutral; sulfate/phosphate in acid form warning

Examples: preparing structures, examples 12 and 13.

Clone this wiki locally