Skip to content

Barranquilla MOPAC v1.2-gpu

Choose a tag to compare

@juvenalyosa juvenalyosa released this 19 Nov 14:05
· 40 commits to main since this release

Barranquilla MOPAC v1.2-gpu: faster QM/MM dynamics with MOPAC on the GPU, MOPAC on the GPU for smaller QM regions, and tools to find the sources of energy drift in QM/MM NVE runs. MOZYME, solids and the benchmark results are as in v1.1-gpu (benchmark run at commit c85eb96d). Inputs do not change; NOGPU or MOPAC_NOGPU=1 gives the CPU code path of the same program.

QM/MM speed (one A100, 0.5-fs steps, MOPAC and the long-range QM–MM term on the GPU)

QM region QM atoms Atoms in total Before v1.2-gpu (e6fddf48)
Trypsin–BPTI active site 54 + 5 link 46 859 0.129 s (52c7f964) 0.021 s (0.027 s at tolerance=0.001)
Chignolin, whole peptide 138 12 095 0.185 s (c85eb96d) 0.031 s
Crambin, whole protein 642 24 828 1.33 s (c85eb96d) 0.245 s

NVT steps from one prepared state, no trajectory output. How each change contributed, with the checks of heats and forces, is in docs/QMMM_OPENMM.md (Speed).

  • CUDA stack limit: the stack limit of the sp pair kernels is kept between QM/MM steps instead of being grown again on every call (52c7f964; MOPAC_GPU_STACK_RESTORE=d restores it only after d kernels, e8da522c).
  • MOPAC on the GPU above 20 QM atoms (was 100, a8509e2a). Smaller regions run MOPAC on the CPU, which was faster for 10 atoms (0.022 against 0.033 s per step).
  • QM–MM charges: OpenMP loops in qmmm_hcore/qmmm_grad and the long-range term in CUDA kernels (a6a4992e), the MM-charge work in fused CUDA kernels with cuFFT plans (46637c1f, 1caa9976), and MOZYME's MM point charges on the GPU (c484ceee, 48bc1100).
  • LMO rotations in QM/MM sessions: staggered diagg2 chains (2cb2f2be), diagg2 on dense LMO rows (c8fd1164, default since bba4e09c) and diagg1 with dense matrices (33c1a78b, 977d7e25, default since e6fddf48). These are defaults of QM/MM sessions only; MOPAC_MOZYME_DIAGG2_STAGGER, MOPAC_MOZYME_DIAGG2_DENSE and MOPAC_MOZYME_DIAGG1_DENSE switch them.

Energy conservation of QM/MM dynamics

  • scripts/qmmm/nve_drift.py follows the work of the QM/MM force along the path, to separate the drift of the QM/MM force from that of the MM integration (a6a4992e; minimum image across OpenMM's box wrapping, 29dd3c4d).
  • run_qmmm_md.py uses OpenMM's mixed precision on CUDA by default (--precision): in single precision the MM-only NVE of trypsin–BPTI drifted +11.1 kJ/mol/ps, in mixed −0.06 (29dd3c4d). New options --mm-only, --nve-every, --nve-traj (15d20491).
  • Optional X–H constraints in the QM region (qm_constraints=True, --qm-constraints; 229b6fe4).
  • Optional SCF start from extrapolated LMOs (guess=linear|aspc; b8a6f508, 6ea3c4b5). Not recommended: it halves the SCF iterations, but on the GPU the step was slower and NVE runs of trypsin–BPTI heated in episodes. The default stays previous.
  • For NVE, docs/QMMM_OPENMM.md recommends 0.5-fs steps and tolerance=0.001.

Fix

  • API, odd charges: mopac_initialize set MS from the parity of the valence electrons without the charge, so a system of odd charge (e.g. a QM/MM region of charge +1) stopped with "Value of MS not consistent with number of electrons". MS now comes from the electron count including the charge (a28dbf08). Present in MOPAC 23.1.2.

Barranquilla MOPAC is an independent derivative of MOPAC (Apache License 2.0), not affiliated with or endorsed by MolSSI or Virginia Tech.