Write down a python script to extract coordinates of aromatic residues of chain A from a protein data bank file (PDB ID: 1ABC.pdb)
Question
Write down a python script to extract coordinates of aromatic residues of chain A from a protein data bank file (PDB ID: 1ABC.pdb
)
Solution
Sure, here is a simple Python script using the Biopython library to extract the coordinates of aromatic residues from chain A of a PDB file.
from Bio.PDB import PDBParser
# Define aromatic residues
aromatic_residues = ['PHE', 'TYR', 'TRP']
# Initialize parser
parser = PDBParser()
# Load structure
structure = parser.get_structure('1ABC', '1ABC.pdb')
# Iterate over all models in the structure
for model in structure:
# Iterate over all chains in the model
for chain in model:
# Check if chain is A
if chain.get_id() == 'A':
# Iterate over all residues in chain
for residue in chain:
# Check if residue is aromatic
if residue.get_resname() in aromatic_residues:
# Iterate over all atoms in residue
for atom in residue:
# Print atom coordinates
print(atom.get_coord())
This script will print the coordinates of all atoms in aromatic residues in chain A of the protein structure. Please note that you need to have the Biopython library installed and the PDB file (1ABC.pdb) in the same directory as your script. You can install Biopython using pip:
pip install biopython
Also, please replace '1ABC.pdb' with your actual pdb file name.
Similar Questions
WAP to find out the percentage of amino acid residues from a protein data bank file ( PDB ID: 1XYZ.pdb)
Which of the following tools is commonly used to identify conserved protein motifs in a set of sequences? BLAST Clustal Omega PROSITE Flye
Outline the relationship between the genetic code and the structure of a protein (2 marks)
Which one of the following programs is used for finding distantly related (orremote) protein homologs?(A) BLASTN(B) BLASTX(C) PSI-BLAST(D) TBLASTX
A nucleotide triplet codes for(a) a protein(b) an amino acid(c) an enzyme(d) an organic base
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.