markovmodel / pyemma_tutorials

How to analyze molecular dynamics data with PyEMMA
Creative Commons Attribution 4.0 International
71 stars 34 forks source link

question regarding dtrajs_concatenated #135

Closed gokulalgates closed 6 years ago

gokulalgates commented 6 years ago

While working on its calculation.. we are using cluster.dtrajs. why are we not using dtrajs concatenated as they represent the complete list of trajectories using following code?

its = pyemma.msm.its(dtrajs_concatenated, lags=20000, nits=4)#, errors='bayes') pyemma.plots.plot_implied_timescales(its, units='ns', dt=0.02);

thempel commented 6 years ago

As soon as you start counting transitions, concatenating trajectories introduces artifacts. It only makes sense for e.g. histograms, where you do not take any transitions into account.

Imagine you have two discrete trajectories [1,2,1,2,1,2,1] and [0, 0, 0, 0, 0]. If you concatenate those, you will introduce a transition from / to state 0 from the other states (depending on the order of concatenation). But this transition was never observed in your data. If you build a Markov model from that, it will naturally come out wrong and estimate transition probabilities between states that are not connected and give you artificial implied timescales.

Does that answer your question?

cwehmeyer commented 6 years ago

We need to clarify this in the notebook.

gokulalgates commented 6 years ago

Thank you! I understood I have another question. I know its silly to ask this question, Do we need to Fit trajectory even if we select backbone angle?

thempel commented 6 years ago

Sorry, I don't understand. What do you exactly mean by fit trajectory? (Maybe post the code that you think might not be needed?)

gokulalgates commented 6 years ago

Sorry, For not being clear, I mean to ask you do we need to RMSD-align the structure of trajectory for backbone angle as a feature? I hope we don't have to align as the distance is rotationally invariant while calculating covariance. Am I right about it?

thempel commented 6 years ago

Yes, if you use backbone angles or other features that are invariant under translation and rotation, you don't need to align the structure beforehand.