How to do it...

Take a look at the following steps:

  1. First, let's retrieve our models of interest, as follows:
from Bio import PDBrepository = PDB.PDBList()repository.retrieve_pdb_file('1TUP', pdir='.', file_format='pdb')repository.retrieve_pdb_file('1OLG', pdir='.', file_format='pdb')repository.retrieve_pdb_file('1YCQ', pdir='.', file_format='pdb')

Note that Bio.PDB will take care of downloading files for you. Moreover, these downloads will only occur if no local copy is already present.

  1. Let's parse our records, as shown in the following code:
parser = PDB.PDBParser()p53_1tup = parser.get_structure('P 53 - DNA Binding', 'pdb1tup.ent')p53_1olg = parser.get_structure('P 53 - Tetramerization', 'pdb1olg.ent')p53_1ycq = parser.get_structure('P ...

Get Bioinformatics with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.