Skip to content

Commit

Permalink
3to1 letter code is not replaced by AAMAP
Browse files Browse the repository at this point in the history
  • Loading branch information
karolamik13 committed Nov 13, 2024
1 parent 1ec47c5 commit 6d34878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prody/proteins/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def is_command_installed(command):

def load_residues_from_pdb(pdb_file):
"""Extract residue numbers and their corresponding one-letter amino acid codes from a PDB file."""
from Bio.PDB.Polypeptide import three_to_one
from prody.atomic.atomic import AAMAP
structure = parsePDB(pdb_file)
residues = structure.iterResidues()
residue_dict = {}
Expand All @@ -342,7 +342,7 @@ def load_residues_from_pdb(pdb_file):
resnum = res.getResnum()
resname = res.getResname() # Three-letter amino acid code
try:
one_letter_code = three_to_one(resname) # Convert to one-letter code
one_letter_code = AAMAP[resname]
residue_dict[resnum] = one_letter_code
except KeyError:
log_message("Unknown residue: {} at position {}".format(resname, resnum), "WARNING")
Expand Down

0 comments on commit 6d34878

Please sign in to comment.