-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
When using --fixed_positions_jsonl with multiple structures, it only keeps the last entry and throws KeyError for other structures.
Line ~108 in protein_mpnn_run.py:
for json_str in json_list:
fixed_positions_dict = json.loads(json_str) # overwrites instead of updatesSuggested fix:
fixed_positions_dict = {}
for json_str in json_list:
fixed_positions_dict.update(json.loads(json_str))What I did to remove errors: Convert JSONL to single JSON filw
import json
fixed_positions_dict = {}
with open('fixed_positions.jsonl', 'r') as f:
for line in f:
if line.strip():
data = json.loads(line)
fixed_positions_dict.update(data)
# Write as single JSON file that ProteinMPNN can handle correctly
with open('fixed_positions.json', 'w') as f:
json.dump(fixed_positions_dict, f)
Metadata
Metadata
Assignees
Labels
No labels