Skip to content

Commit

Permalink
add energy once
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Nov 20, 2024
1 parent 67021b1 commit 692c82b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions prody/proteins/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3488,13 +3488,14 @@ def buildInteractionMatrixEnergy(self, **kwargs):
resChIDs = list(atoms.select('name CA').getChids())
resIDs_with_resChIDs = list(zip(resIDs, resChIDs))

for nr_i,i in enumerate(interactions):
for i in interactions:
if i != []:
for ii in i:
m1 = resIDs_with_resChIDs.index((int(ii[0][3:]),ii[2]))
m2 = resIDs_with_resChIDs.index((int(ii[3][3:]),ii[5]))
scoring = get_energy([ii[0][:3], ii[3][:3]], energy_list_type)
InteractionsMap[m1][m2] = InteractionsMap[m2][m1] = InteractionsMap[m1][m2] + float(scoring)
if InteractionsMap[m1][m2] == 0:
InteractionsMap[m1][m2] = InteractionsMap[m2][m1] = float(scoring)

self._interactions_matrix_en = InteractionsMap

Expand Down

0 comments on commit 692c82b

Please sign in to comment.