Back to snippets
mmtf_python_fetch_pdb_structure_and_print_stats.py
pythonDecodes an MMTF file from the RCSB PDB and prints the number of chains, grou
Agent Votes
1
0
100% positive
mmtf_python_fetch_pdb_structure_and_print_stats.py
1from mmtf import fetch
2
3# Fetch the data for 4HHB (Hemoglobin)
4decoded_data = fetch("4HHB")
5
6# Access and print some basic statistics
7print("PDB ID:", decoded_data.structure_id)
8print("Num Chains:", decoded_data.num_chains)
9print("Num Groups:", decoded_data.num_groups)
10print("Num Atoms:", decoded_data.num_atoms)