Skip to content

Instantly share code, notes, and snippets.

@kain88-de
Created June 24, 2016 12:59
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kain88-de/0bfe0813e27ad601004b247fedb2ee7d to your computer and use it in GitHub Desktop.
Save kain88-de/0bfe0813e27ad601004b247fedb2ee7d to your computer and use it in GitHub Desktop.
Example PCA implementation and analysis
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orbeckst
Copy link

orbeckst commented Jun 24, 2016

This would make a nice tutorial!

For information: The trajectories can be obtained from Data download for the 2015 CECAM Workshop.

@orbeckst
Copy link

@kain88-de, do you want to link to this gist from https://github.com/MDAnalysis/mdanalysis/wiki/Tutorials ?

@orbeckst
Copy link

Btw, you could also color the residue B-factors by the magnitude of the variance in the 1st PC and display: This should show very clearly which domains are involved in the motion.

@jdetle
Copy link

jdetle commented Jun 24, 2016

This is great, just posted about it on the google groups. Only possible comment that I'd have is that we might want to use an interactive plotting package like Plotly or Bokeh. Being able to mouseover specific points in the plotted data is nice.

@kain88-de
Copy link
Author

@orbeckst We can make this a tutorial once @jdetle has implemented a PCA :-). I don't know much about the coloring in nglview.

@jdetle. replace %matplotlib inline with %matplotlib nbagg to get interactive plots. I personally like the static pictures here because they are rendered in github, the js isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment