.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/gallery/structure/misc/homolog_superimposition.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_structure_misc_homolog_superimposition.py: Superimposition of homologous protein structures ================================================ This script superimposes the structure of a streptavidin monomer into an avidin monomer. The visualization was conducted with PyMOL. - *Green*: Avidin - *Orange*: Strepatvidin .. GENERATED FROM PYTHON SOURCE LINES 12-36 .. image-sg:: /examples/gallery/structure/misc/images/sphx_glr_homolog_superimposition_001.png :alt: homolog superimposition :srcset: /examples/gallery/structure/misc/images/sphx_glr_homolog_superimposition_001.png :class: sphx-glr-single-img .. code-block:: Python # Code source: Patrick Kunzmann # License: BSD 3 clause import biotite.database.rcsb as rcsb import biotite.structure as struc import biotite.structure.io.pdbx as pdbx def _extract_monomer(complex): complex = complex[struc.filter_amino_acids(complex)] # Get the monomer that belongs to the first atom in the structure return complex[struc.get_chain_masks(complex, [0])[0]] avidin_file = pdbx.BinaryCIFFile.read(rcsb.fetch("1vyo", "bcif")) avidin = _extract_monomer(pdbx.get_structure(avidin_file, model=1, include_bonds=True)) streptavidin_file = pdbx.BinaryCIFFile.read(rcsb.fetch("6j6j", "bcif")) streptavidin = _extract_monomer( pdbx.get_structure(streptavidin_file, model=1, include_bonds=True) ) streptavidin, _, _, _ = struc.superimpose_homologs(avidin, streptavidin) # Visualization with PyMOL... .. _sphx_glr_download_examples_gallery_structure_misc_homolog_superimposition.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: homolog_superimposition.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: homolog_superimposition.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_