OpenMM / Installation errors

Causes and fixes for OpenMM and PDBFixer installation errors

Common errors when installing OpenMM and PDBFixer and setting up a first simulation, listed by exact message, each with its cause and fix.

Short answer

To use GPU acceleration, the CUDA version conda installs for OpenMM must not be newer than what your GPU driver supports, or the CUDA platform fails to load and OpenMM falls back to the much slower CPU platform or stops with an error.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
On a machine with a GPU, run conda install -c conda-forge openmm and let conda pick the CUDA version for your driver; to pin it, add cuda-version=12.Environments created on a GPU-less login node get a CUDA the driver does not support, and runs fail with PTX version errors.
After installing, run python -m openmm.testInstallation and confirm the CUDA platform works.Simulations silently run on the CPU platform, dozens of times slower.
With pip, install pip install openmm[cuda12].A plain pip install openmm has no CUDA platform.
Install PDBFixer with conda install -c conda-forge pdbfixer in the same environment as OpenMM.PDBFixer cannot find OpenMM, or the two versions do not match.
Before building a system, fill in missing atoms and hydrogens with PDBFixer.Creating the force field system fails with No template found for residue.

Troubleshooting by error message

Find your exact error message. Each entry gives the cause, the fix, and what may come up after the fix.

openmm.OpenMMException: There is no registered Platform called "CUDA"

Cause: OpenMM's CUDA plugin failed to load, most often because no NVIDIA driver is installed (libcuda.so ships with the driver) or pip was used without the CUDA extra.

Fix: Run nvidia-smi to confirm the driver works; pip users should install pip install openmm[cuda12]; if it still fails, call Platform.getPluginLoadFailures() to see why the plugin failed.

What may come next: Once the driver is in place, a driver older than the CUDA conda installed leads to the PTX version error in the next entry.

CUDA platform error: Error loading CUDA module: CUDA_ERROR_UNSUPPORTED_PTX_VERSION (222) (or CUDA_ERROR_INVALID_PTX (218))

Cause: The GPU driver is too old for the CUDA version conda installed, typically after creating the environment on a GPU-less login node where conda chose the newest CUDA.

Fix: Upgrade the GPU driver; if you cannot, rebuild the environment on a GPU node or pin a supported CUDA with conda install -c conda-forge openmm cuda-version=12.

What may come next: OpenMM caches compiled kernels in a temporary folder, so if the error remains after changing CUDA versions, clear that cache and retry.

CUDA platform error: Error launching CUDA compiler: 256 (nvcc fatal : Value 'sm_86' is not defined for option 'gpu-architecture')

Cause: OpenMM called an old system nvcc that does not know the new GPU architecture, or the conda CUDA toolkit is newer than the driver.

Fix: Have conda install the CUDA version matching your driver, for example cudatoolkit=11.4 when the driver supports 11.4; if OPENMM_CUDA_COMPILER is set, remove it or point it at a matching nvcc.

OpenCL platform error: Error initializing context: clGetPlatformIDs (-1001)

Cause: There is no OpenCL-capable GPU or OpenCL driver on the system.

Fix: Use the CUDA platform on NVIDIA GPUs; without a usable GPU, select Platform.getPlatformByName("CPU") in code.

No module named simtk.testInstallation

Cause: Since OpenMM 7.6 the package is openmm instead of simtk.openmm, so commands and imports from old tutorials no longer work.

Fix: Use python -m openmm.testInstallation; in code, change from simtk.openmm.app import * to from openmm.app import * and from simtk.unit import * to from openmm.unit import *.

What may come next: Third-party scripts written for older versions may have other simtk imports that need the same change.

ValueError: No template found for residue 1 (ALA). The set of atoms is similar to ALA, but it is missing 5 hydrogen atoms.

Cause: The PDB file lacks hydrogens or some heavy atoms, so the force field finds no matching residue template.

Fix: Process the structure with PDBFixer first: findMissingResidues, findMissingAtoms, addMissingAtoms, then addMissingHydrogens(7.0), and build the system; Modeller.addHydrogens also works.

What may come next: Ligands, modified residues and other nonstandard residues have no built-in templates and need parameters from openmmforcefields or other tools.

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "repair this protein structure with PDBFixer, solvate it and run a 10 ns molecular dynamics simulation with OpenMM", and the agent uses the preinstalled OpenMM to do the modeling and computation, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has OpenMM 8.6.1 and PDBFixer 1.12, and the callable GPU machines have a CUDA build of OpenMM that the image self-check verifies with a real CUDA-platform run, so there are no driver and CUDA versions to match, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

References

Frequently asked questions

How do I know OpenMM uses the GPU?

Run python -m openmm.testInstallation and check that the CUDA platform is listed and passes; during a run you can also print simulation.context.getPlatform().getName().

Can OpenMM run without an NVIDIA GPU?

Yes. OpenMM has CPU and OpenCL platforms, and AMD GPUs can use the HIP platform via pip install openmm[hip6].

Can PDBFixer be installed with pip?

PDBFixer is officially distributed through conda-forge; install it with conda alongside OpenMM in the same environment.

Run molecular dynamics with Scientify without setup

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.