Extracting information from PDB files
In the previous chapter, we got a brief introduction to PDB files. Let’s now go deeper and look at how to extract more information from these files.In this recipe, we will use Biopython’s PDB module to examine protein structure files in detail. We’ll focus on one particular protein involved in cancer. We’ll see how to retrieve and parse these files and examine their contents.We will learn how to traverse the amino acid residues in a protein model, find out their characteristics, and retrieve the atoms that make them up. We will learn about protein chains, which are large subsections of a protein structure. Finally, we will see how to plot the contents of the PDB file.
Getting ready
First, let’s set up:
! mkdir -p output
To access the data, we will use the PDB package from BioPython (https://biopython.org/docs/1.75/api/Bio.PDB.html). This module includes functions for parsing PDB and mmCIF format files. For this...