Skip to content

Commit

Permalink
saveInteractionsPDB normalized in PDB
Browse files Browse the repository at this point in the history
  • Loading branch information
karolamik13 committed Oct 20, 2023
1 parent 4f171c2 commit 5b15e66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prody/proteins/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3940,7 +3940,8 @@ def saveInteractionsPDB(self, **kwargs):
aa_counter = Counter(atoms.getResindices())
calphas = atoms.select('name CA')
for i in range(calphas.numAtoms()):
lista_ext.extend(list(aa_counter.values())[i]*[round(freq_contacts_list[i], 8)])
# in PDB values are normalized to 100 (max value)
lista_ext.extend(list(aa_counter.values())[i]*[round((freq_contacts_list[i]/np.max(freq_contacts_list)*100), 8)])

kw = {'occupancy': lista_ext}
if 'filename' in kwargs:
Expand All @@ -3949,3 +3950,5 @@ def saveInteractionsPDB(self, **kwargs):
else:
writePDB('filename', atoms, **kw)
LOGGER.info('PDB file saved.')

return freq_contacts_list

0 comments on commit 5b15e66

Please sign in to comment.