Skip to content

Commit

Permalink
Fix bugs in build_no_seq with entropy score
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaliki committed Nov 28, 2023
1 parent 2d13e5a commit 67a9b96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion model_angelo/apps/build_no_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def main(parsed_args):
os.replace(raw_file_src, raw_file_dst)

# Entropy file
raw_es_file_src = gnn_output.replace("output.cif", "output_fixed_aa_entropy_score.cif")
raw_es_file_src = gnn_output.replace("output.cif", "output_entropy_score.cif")
raw_es_file_dst = os.path.join(parsed_args.output_dir, f"{name}_entropy_score.cif")

os.replace(raw_es_file_src, raw_es_file_dst)
Expand Down
8 changes: 8 additions & 0 deletions model_angelo/gnn/flood_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def final_results_to_cif(
)
* 100
)
entropy_scores = final_results["entropy_score"][existence_mask] * 100

if refine:
protein.atomc_positions = all_atoms
Expand Down Expand Up @@ -251,6 +252,13 @@ def final_results_to_cif(
cif_path,
bfactors=[bfactors[c] for c in chains],
)
chain_atom14_to_cif(
[aatype[c] for c in chains],
[all_atoms[c] for c in chains],
[atom_mask[c] for c in chains],
cif_path.replace(".cif", "_entropy_score.cif"),
bfactors=[entropy_scores[c] for c in chains],
)

chain_aa_logits = [final_results["aa_logits"][existence_mask][c] for c in chains]
chain_prot_mask = [prot_mask[c] for c in chains]
Expand Down

0 comments on commit 67a9b96

Please sign in to comment.