Skip to content

Instantly share code, notes, and snippets.

@sbliven
sbliven / cif2pdb.py
Created April 26, 2017 19:27
Convert mmCIF files to PDB format using biopython
#!/usr/bin/env python
"""
Script to convert mmCIF files to PDB format.
usage: python cif2pdb.py ciffile [pdbfile]
Requires python BioPython (`pip install biopython`). It should work with recent version of python 2 or 3.
@author Spencer Bliven <spencer.bliven@gmail.com>
"""
@JoaoRodrigues
JoaoRodrigues / struct_compare.py
Last active September 26, 2023 04:15
Very long script to match the chains of PDB files to a reference. Produces a lot of output per match: which chains match which, the seq. id, the RMS after iterative fitting, and the alignment with markers of seq and structural mismatch.
#!/usr/bin/env python
"""
Utility to match (and compare) PDB files.
On homo-multimers, will match chains sequentially.
Uses global sequence alignment to find equivalent positions
between the sequences. Also superimposes the structures based
on the alignments and outputs per-chain RMSDs.