Skip to content

Commit

Permalink
Update fingerprint.py
Browse files Browse the repository at this point in the history
added suggested adjustments
  • Loading branch information
talagayev authored Nov 15, 2024
1 parent df3c1ba commit 0583aac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prolif/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ def plot_3d(

def run_bridged_analysis(self, traj, lig, prot, water, **kwargs):
# run analysis twice, once on ligand-water, then on water-prot
self.ifp = getattr(self, "ifp", {})
ifp_stores = []
for pair in [(lig, water), (water, prot)]:
fp = Fingerprint(
Expand Down Expand Up @@ -1112,10 +1113,11 @@ def run_bridged_analysis(self, traj, lig, prot, water, **kwargs):
# Store the combined interaction data for the (lig_res, prot_res) pair in `ifp`
ifp.update({(lig_res, prot_res): combined_interaction_data})

combined[frame1] = ifp
if frame1 not in self.ifp:
self.ifp[frame1] = IFP()
self.ifp[frame1].update(ifp)

# Add to existing results if any
self.ifp = getattr(self, "ifp", {})
self.ifp.update(combined)

This comment has been minimized.

Copy link
@cbouy

cbouy Nov 16, 2024

Member

you'd need to remove this line as well


return self

0 comments on commit 0583aac

Please sign in to comment.