vvoelz / biceps

Bayesian inference of conformational populations
https://github.com/vvoelz/biceps
Other
12 stars 3 forks source link

Plotting traces with 100M steps #62

Closed robraddi closed 4 years ago

robraddi commented 4 years ago

The error messages from attempting to plot trajectory traces for 100M steps on owlsnest.

.
.
.
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 166, in draw_path
/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py:516: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matp
lotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 688, in savefig
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/figure.py", line 1565, in savefig
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2232, in print_figure
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 527, in print_png
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 474, in draw
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/figure.py", line 1159, in draw
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2324, in draw
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 758, in draw
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 1170, in _draw_lines
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/lines.py", line 1195, in _draw_solid
  File "/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 166, in draw_path
/home/tuc41004/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py:516: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matp
lotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
.
.
.
robraddi commented 4 years ago

We've fixed this error by adding bool argument for printing traces

  1. The user can plot traces as png (reduce the resolution):
C = biceps.Convergence("traj_lambda0.00.npz")
C.plot_traces(fname="traces.png")
  1. Example that doesn't plot traces:
C = biceps.Convergence(trajfile=outdir+"/traj_lambda0.00.npz")
C.get_autocorrelation_curves(method="normal", maxtau=maxtau)
C.process(nblock=5, nfold=10, nround=100, savefile=True,
    block=True, normalize=True,
    plot=False)