Assembly of a clathrin D6 coatΒΆ

In this example the entire biological assembly of a clathrin D6 coat is loaded from a mmCIF file in visualized in PyMOL. Each chain is colored individually based on a qualitative Matplotlib colormap.

# Code source: Patrick Kunzmann
# License: CC0

import numpy as np
import matplotlib.pyplot as plt
import biotite.structure as struc
import as pdbx
import biotite.database.rcsb as rcsb
import ammolite

PNG_SIZE = (800, 800)
assembly = pdbx.get_assembly("1XI4", "cif")),
# Structure contains only CA
# Bonds are not required for visulization -> empty bond list
assembly.bonds = struc.BondList(assembly.array_length())
# General configuration
ammolite.cmd.set("cartoon_side_chain_helper", 1)
ammolite.cmd.set("cartoon_oval_length", 0.8)
ammolite.cmd.set("depth_cue", 0)
ammolite.cmd.set("valence", 0)
pymol_obj = ammolite.PyMOLObject.from_structure(assembly)

ammolite.cmd.set("sphere_scale", 1.5)
chain_ids = np.unique(assembly.chain_id)
for chain_id, color in zip(chain_ids, plt.get_cmap("tab20").colors):
    pymol_obj.color(color, assembly.chain_id == chain_id)
# sphinx_gallery_thumbnail_number = 2

Gallery generated by Sphinx-Gallery