Ampicillin as ball-and-stick modelΒΆ

This example shows a ball-and-stick model of the beta-lactam antibiotic ampicillin.

# Code source: Patrick Kunzmann
# License: CC0

import biotite.structure as struc
import as info
import ammolite

PNG_SIZE = (600, 600)
ampicillin = info.residue("AIC")

pymol_obj = ammolite.PyMOLObject.from_structure(ampicillin)
ball and stick
ball and stick"spheres")
pymol_obj.color("black", ampicillin.element == "C")
ammolite.cmd.set("stick_radius", 0.15)
ammolite.cmd.set("sphere_scale", 0.25)
ammolite.cmd.set("sphere_quality", 4)
ammolite.cmd.set("stick_color", "grey80")
# sphinx_gallery_thumbnail_number = 3
ball and stick

Gallery generated by Sphinx-Gallery