Skip to content

Commit

Permalink
rename s -> num_chains
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Aubin committed Sep 14, 2022
1 parent e8c0061 commit 504482c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protein_mpnn_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def parse_PDB(path_to_pdb, input_chain_list=None, ca_only=False) -> list[dict]:
sidechain_atoms = ["N", "CA", "C", "O"]

pdb_dict = {}
s = 0
num_chains = 0
concat_seq = []
for letter in chain_alphabet:
xyz, seq = parse_PDB_biounits(path_to_pdb, atoms=sidechain_atoms, chain=letter)
Expand All @@ -145,13 +145,13 @@ def parse_PDB(path_to_pdb, input_chain_list=None, ca_only=False) -> list[dict]:
f"O_chain_{letter}": xyz[:, 3, :].tolist(),
}
pdb_dict[f"coords_chain_{letter}"] = coords_dict_chain
s += 1
num_chains += 1

fi = path_to_pdb.rfind("/")
pdb_dict["name"] = path_to_pdb[(fi + 1) : -4]
pdb_dict["num_of_chains"] = s
pdb_dict["num_of_chains"] = num_chains
pdb_dict["seq"] = "".join(concat_seq)
if s <= len(chain_alphabet):
if num_chains <= len(chain_alphabet):
pdb_dict_list.append(pdb_dict)

return pdb_dict_list
Expand Down

0 comments on commit 504482c

Please sign in to comment.