Skip to content

Examples running checking and benchmarking

Juvenal Yosa edited this page Nov 20, 2026 · 4 revisions

Tests, diagnostics and the benchmark suite.

59. Check the installation

Runs crambin on the CPU and on the GPU and compares heats, gradients, the CPU fallback and NOGPU; it must end with all checks passed.

cd tests
python3 check_mozyme_gpu_tolerance.py ../build/mopac \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn.mop \
    ../benchmarks/publication_inputs/mop/protein_crambin_1crn_opt.mop \
    --handback ../benchmarks/publication_inputs/mop/protein_crambin_1crn_denout.mop

60. Check the solids path

Compares the device one-electron matrix, Fock matrix and gradient with the CPU loops for the repository cells.

python3 tests/check_materials_gpu.py build/mopac --medium quartz,silicon,rutile

61. Check the QM/MM long-range electrostatics

Twenty checks of the QM–MM PME against a direct Ewald sum (Madelung constant, potentials, forces); no MOPAC needed, --gpu also tests the CuPy grid.

python3 tests/check_qmmm_pme_ewald.py --gpu

Checked: without --gpu, all 11 checks passed on the main branch after commit ef0e500d, which fixed the test itself; in release v1.2-gpu the test stops with an AttributeError before its third check.

62. Where did the time go: TIMES and MOPAC_GPU_PROFILE

TIMES (standard MOPAC) prints the time of each stage; MOPAC_GPU_PROFILE=1 adds the device timings.

Copy next to the input: tests/data/mozyme_gpu_reference/1UAO_opt.pdb

PM7 MOZYME 1SCF TIMES GEO_DAT="1UAO_opt.pdb"
Chignolin, stage times
MOPAC_GPU_PROFILE=1 mopac job.mop

Checked: runs with the CPU build of release v1.2-gpu (commit 323b6076, 2026-11-20).

63. Show which GPU is used

MOPAC_GPU_DEBUG=1 prints the detected GPUs, the device chosen and the MOZYME GPU settings in the output.

MOPAC_GPU_DEBUG=1 mopac job.mop
nvidia-smi   # memory in use while it runs

64. Run the benchmark suite

Every benchmark of the README tables. --quick runs one small case per experiment (a test of the pipeline); --exp picks experiments.

python3 scripts/paper/paper_bench.py --mopac build/mopac --libmopac build/libmopac.so --out results --quick
python3 scripts/paper/paper_bench.py --mopac build/mopac --out results --exp mozyme_sp,solids
python3 scripts/paper/paper_figures.py results

Clone this wiki locally