msmbuilder / msmexplorer

Data visualizations for biomolecular dynamics
http://msmbuilder.org/msmexplorer/
MIT License
17 stars 17 forks source link

Adding 2D tIC trajectory visualization #105

Open cing opened 7 years ago

cing commented 7 years ago
screen shot 2017-08-31 at 1 02 01 pm

Taken from here, but probably in many papers. Should have the 2D free energy underneath? Pretty useful for exploratory analysis, especially when you look at a big grid of them. P.S. I'm aware it's super easy and it's just a scatter plot with a cmap ;)

jeiros commented 6 years ago

I do this quite a lot myself. Would be useful to have in a single function, but not sure how to make it general enough.

What I usually use this for is to plot the 2D free energy of all the trajectories in my dataset and the plot individually a single trajectory with colour based on time:

download

cing commented 6 years ago

You've got this game figured out! That plot seems great to me, with an optional argument for connecting the points. The API for plot_trace2d should probably be as close as possible to plot_trace, but it accepts data with shape (nsamples, 2). Note that plotting onto free energy might result in two colorbars, but I think that works out of the box. You could also have sick corner plots on this that show the histograms of those samples on either axes, but that might be overkill.

As far as modularity goes, plotting a trace should probably be decoupled from the free energy. One other gratuitous thing to support might be the plotting of all the trajectories on one plot, data with shape (without free energy) to show that you have reactive crossings into different basins (ex. Muneeb's preprint, figure S20).

I agree that plotting all/many trajectories is the intended way to use this plot, but that would be nice for normal plot_trace too. Digesting the entire tica_trajs array would let msmexplorer plot the top N most reactive trajectories, which seems within the scope of MSME, I think? Maybe there's something to be learned from Seaborn's FacetGrid to achieve this.

msultan commented 6 years ago

@cing Or you know just use kinase_msm 😄 , 😆