Skip to content

Commit

Permalink
preparations for issue #39
Browse files Browse the repository at this point in the history
  • Loading branch information
maxscheurer committed Apr 17, 2017
1 parent f42b5bb commit 46242eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions PyContact/gui/Plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ def plot_all_contacts_figure(self, contacts):
self.axes.set_xlabel("frame")
self.axes.set_ylabel("score")

def plot_hbondNumber(self, contacts):
values = []
for c in contacts:
c.hbondFramesScan()

for frame in range(len(contacts[0].scoreArray)):
current = 0
for c in contacts:
current += c.hbondFrames[frame]
values.append(current)
self.axes.plot(values)
self.axes.set_xlabel("frame")
self.axes.set_ylabel("hbond number")


class ContactPlotParameters:
"""Parameter for the contact plotter."""
Expand Down
1 change: 1 addition & 0 deletions PyContact/gui/Statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ def __init__(self, data, parent=None):

self.contactPlotter = ContactPlotter(None, width=4, height=2, dpi=80)
self.contactPlotter.plot_all_contacts_figure(self.contacts)
# self.contactPlotter.plot_hbondNumber(self.contacts)
self.plotGridLayout.addWidget(self.contactPlotter)

0 comments on commit 46242eb

Please sign in to comment.