HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
469 stars 110 forks source link

Calculating corrected intersection losses at inference #27

Closed J-Salo closed 2 years ago

J-Salo commented 2 years ago

Hi,

When performing inference (from files), the untuned losses are calculated and reported in all_intersection_losses_untuned. However, the optimized losses never seem to be calculated and reported.

In inference.py can we use something a long the lines of:

all_intersection_losses_untuned.append(
                    compute_revised_intersection_loss(lig_coords_pred_untuned.detach().cpu(), rec_graph.ndata['x'],
                                                        alpha=0.2, beta=8, aggression=0))
# After calculating coords_pred_optimized:
all_intersection_losses.append(compute_revised_intersection_loss(coords_pred_optimized, rec_graph.ndata['x'], alpha=0.2, beta=8, aggression=0))

Many thanks!

HannesStark commented 2 years ago

Feel free to make these changes in your repo. I do not think this is important. Let me know if you disagree!

hmms117 commented 2 years ago

Thanks Hannes - will do :) I had hoped the loss of the optimized ligand would be a good rough proxy for fit (as an initial criteria). I guess the untuned loss will be good enough as well.