pmihm: integrative (IHM) models in PyMOL
PyMOL reads the ordinary atomic part (atom_site) of an IHM/IHMCIF file, but
not the coarse-grained beads (ihm_sphere_obj_site) that most integrative
models in PDB-IHM are made of. pmihm reads the whole
file with python-ihm and loads atoms
and beads together.
Requirements
- PyMOL 2 or later. Tested with open-source PyMOL 3.1.0 on Python 3.14.
- python-ihm 2.11 or later (
ihmon PyPI), installed into the Python that PyMOL runs on. BinaryCIF files also needmsgpack.
Install
Install the package into the Python that PyMOL uses, then turn it on in PyMOL.
-
Install. With a system PyMOL (for example Fedora's), run
python3 -m pip install --user pmihm, orpip install pmihm[bcif]to read BinaryCIF too. From a checkout of this repository, usepip install -e .instead. -
Turn it on by adding this line to
~/.pymolrc:/import pmihm; pmihm.register()
Or, without pip, use PyMOL's Plugin Manager. In PyMOL go to Plugin → Plugin
Manager → Install New Plugin and choose pmihm/__init__.py from a checkout.
This also adds IHM: Open file... and IHM: Fetch from PDB-IHM... to the
Plugin menu. python-ihm still has to be installed separately.
Usage
fetch PDBDEV_00000001 # PDBDEV ids go to PDB-IHM automatically
fetch 9A8R, type=ihm # other ids: ask for type=ihm
fetch_ihm 9A8R # the same; also takes PDBDEV_1 or 1
load_ihm entry.cif # .cif, .cif.gz, .bcif, .bcif.gz
load_ihm entry.cif, myname # choose the object name
load entry.cif, format=ihm # through PyMOL's own load command
load_ihm entry.cif, discrete=1 # keep per-model B-factors (see below)
Downloads go to PyMOL's fetch_path, and a file already there is reused.
Loading never changes existing objects: if a name is taken, the new object
gets _2, _3, ... appended.
How IHM data maps onto PyMOL
| IHM | PyMOL |
|---|---|
model group (ihm_model_group) |
One object. If the file has several groups, they go into a PyMOL group named after the file, and only the first group is shown. |
| model in a group | One state, titled with the model name. Models with the same atoms and beads share atoms, as in PyMOL's own multi-model loading, so B-factors and occupancies come from the first model. Use discrete=1 to keep each model's own values. Models with different beads or radii are always loaded discretely. |
several states (ihm_multi_state_modeling) |
The state name becomes part of the object name, e.g. entry_open_cluster_1. |
bead (ihm_sphere_obj_site) |
A pseudo-atom with name CA, vdw = sphere radius, and b = RMSF (0 if not given). |
| residue range of a bead | resi = first residue. custom holds the full range, e.g. "6-10". |
| residue name of a bead | The real residue name for a 1-residue bead, BEA for a multi-residue bead. |
| chain | chain and segi = label_asym_id. All numbering is label numbering (label_seq_id), for beads and atoms alike. |
| chain connectivity | Each bead is bonded to the bead that starts on the next residue, so there's no bond across a sequence gap. A bead next to an atomic residue is bonded to that residue's CA (or C4', then P). Atoms are bonded by PyMOL from distances. |
Default display:
- beads as spheres
- protein and nucleic acid as cartoon, with secondary structure from
dss - ligands as sticks, ions as non-bonded spheres
Everything is coloured by chain, and a chain has the same colour in every group's object.
Useful selections and commands:
select beads, tt. BEAD # every bead
show sticks, tt. BEAD # draw the bead chain
label tt. BEAD, custom # show each bead's residue range
spectrum b, blue_red, tt. BEAD # colour beads by RMSF
iterate tt. BEAD and chain A, print(custom, vdw)
Limitations
- Gaussian objects (
ihm_gaussian_obj_site) are not read by python-ihm, so they are not loaded. A file with only Gaussians gives an error. - Datasets, maps, localization densities, restraints and starting models are not loaded.
resiis the first residue of a bead, soresi 7does not select a bead covering residues 6-10. Use the bead'scustomrange instead.- The Plugin-menu dialogs have not been tested in a running GUI yet.
Development
pip install -e .[test]
python3 -m pytest tests
The tests build small IHM files with python-ihm and run PyMOL headless.
Metadata
Release files for pmihm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pmihm-0.1.0.tar.gz | 18.9 kB | With provenance | Details for pmihm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pmihm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pmihm-0.1.0-py3-none-any.whl |
Total release size: 29.8 kB
Release files / pmihm-0.1.0.tar.gz
| Download URL | pmihm-0.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86291d913e1b4d394d5caea6036f8e027e8944178068e2130e6d7abc1e985278
|
|
BLAKE2b-256 checksum How to use checksums |
588d87a34290f0eca1d7ca36812a151c19c3e9afe539821406666e508b26c9d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / pmihm-0.1.0-py3-none-any.whl
| Download URL | pmihm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e032a55c55d4877249049f652d710f9b32f16079e1c44074eacc4e86de4628c4
|
|
BLAKE2b-256 checksum How to use checksums |
081de7e19e071fb8ccf3b323639b7d69860ca494276be6a15a4bf0b111e66e5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for pmihm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pmihm-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.