2
$\begingroup$

When we read a protein databank (PDB) file using BioPython, does BioPython assign unique IDs to each atom, each residue, each chain, and each protein?

If so, how does BioPython generate those IDs?

How does BioPython make sure these IDs are unique throughout the entire protein bank?

$\endgroup$

2 Answers 2

7
$\begingroup$

When reading PDB file ("1fat.pdb" as an example):

from Bio.PDB import *

parser = PDBParser()
structure = parser.get_structure("PHA-L", "1fat.pdb")

The Structure object follows the so-called SMCRA (Structure/Model/Chain/Residue/Atom) architecture :

  1. A structure consists of models
  2. A model consists of chains
  3. A chain consists of residues
  4. A residue consists of atoms

Biopython will automatically generate ids for models, chians, residues and atoms separately.

The model id is an integer which denotes the rank of the model in the PDB file. The model id starts at 0.

The chain id is specified in the PDB file, and is a single character (typically a letter).

The residue id is a tuple with three elements:

  1. The hetero-flag: this is 'H_' plus the name of the hetero-residue (e.g. 'H_GLC' in the case of a glucose molecule), or 'W' in the case of a water molecule.
  2. The sequence identifier in the chain, e.g. 100
  3. The insertion code, e.g. 'A'. The insertion code is sometimes used to preserve a certain desirable residue numbering scheme.

The atom id is simply the atom name (eg. 'CA').

You can check the id like this:

import itertools
# for convenience, we just check the first three id
for model in itertools.islice(structure.get_models(), 3):
    print(f"Model: {model.id}")
    for chain in itertools.islice(model.get_chains(), 3):
        print(f"Chain: {chain.id}")
        for residue in itertools.islice(chain.get_residues(), 3):
            print(f"Residue: {residue.id}")
            for atom in itertools.islice(residue.get_atoms(), 3):
              print(f"Atom: {atom.id}")

The output is like this:

enter image description here

The hetero-flag and insertion code in residue id are all empty in the example.

$\endgroup$
1
$\begingroup$

PDB data-files contain identifiers for all those objects. Although I'm not familiar with BioPython's PDB support, I'd expect it to be reading the IDs from the file.

The use of those IDs by the PDB can get a bit tricky, as the author my assign specific IDs that don't meet the typical standard, and there are ID's 'beyond' the PDB, such as the UniProt protein sequence ID of the structure being determined (which may be modified for expression or crystallisation) and the IDs of the underlying residues, which may be relative to different start positions.

https://www.rcsb.org/docs/general-help/identifiers-in-pdb

$\endgroup$
2
  • $\begingroup$ unclear answer. $\endgroup$
    – user366312
    Commented Apr 12 at 9:22
  • $\begingroup$ I'm doing my best! $\endgroup$
    – Dan Bolser
    Commented Apr 16 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.