Take a look at the following steps:
- Let's parse the file. We just use the MMCIF parser instead of the PDB parser:
from Bio import PDBparser = PDB.MMCIFParser()p53_1tup = parser.get_structure('P53', '1tup.cif')
- Let's inspect the following chains:
def describe_model(name, pdb): print() for model in p53_1tup: for chain in model: print('%s - Chain: %s. Number of residues: %d. Number of atoms: %d.' % (name, chain.id, len(chain), len(list(chain.get_atoms()))))describe_model('1TUP', p53_1tup)
The output will be as follows:
1TUP - Chain: E. Number of residues: 43. Number of atoms: 442.1TUP - Chain: F. Number of residues: 35. Number of atoms: 449.1TUP - Chain: A. Number of residues: 395. Number of atoms: 1734.1TUP - Chain: B. Number ...