# Building and Analyzing Markov State Models #### Albin Karlsson 2023 ## What it does Using Matlab: 1. Reads and parse the data. 2. Perform Principal Component Analysis (PCA) on the trajectory data and reduce it to one dimension using the first principal component. 3. Discretize the reduced trajectory into a specified number of clusters (100 in this case). 4. Creates a count matrix that represents the transitions between states in the discretized trajectory. 5. Calculate a transition matrix representing the transition probabilities between different states based on the count matrix. 6. Calculate the eigenvalues and eigenvectors of the transition matrix. Removes the first eigenvalue/eigenvector. 7. Maps the eigenvalues into timescales. 8. Plot everything. ## Results ![](./scatter.png) By simply looking at the raw data scatterploted where the two input samples are mapÄed to X and Y we clearly see two groups centered around (-1, 0) and (1, 0). ![](./cmatrix.png) ![](./disc.png) When plotting the discretized trajectory and the count matrix we also see the macrostates. ![](./tmatrix.png) ![](./eigen.png) ![](./times.png) Simlar to the examples provided, we can se the splowest process is around 76 timesteaps, the third process being around 3 time steps and the fourth being around 2 time steps.