PyEMMA icon indicating copy to clipboard operation
PyEMMA copied to clipboard

Is it possible to use pyemma.msm.its on the dtrajs after using TICA on the features?

Open hima111997 opened this issue 1 year ago • 0 comments

Is it possible to use pyemma.msm.its on the dtrajs after using TICA on the features?

def sample_k_centers_after_tica(n, data):        
    cl_original = pyemma.coordinates.cluster_kmeans(data= data, k=n, stride=1, max_iter=40)
    its = pyemma.msm.its(cl_original.dtrajs, lags=[1, 2, 5, 10, 20, 50], nits=5, errors='bayes',n_jobs=1)
    fig, axes = plt.subplots(1, 1, figsize=(12, 3))
    pyemma.plots.plot_implied_timescales(its, ax=axes, units='100 ps')
    axes.set_title(f'ITS figure at K={n}')
    fig.tight_layout()

lags = [1, 10,20]
clusters = [100,200,300]
for l in lags:
    tica = pyemma.coordinates.tica(data, dim=3, lag=l, kinetic_map=False)
    for c in clusters:    
        sample_k_centers_after_tica(c, tica)

and if it is possible, which lag should i use? the l variable in the for loop or the lag time after which the ITS converges?

hima111997 avatar Jul 10 '23 13:07 hima111997