Examples¶
This page provides a series of examples, tutorials and recipes to help you
get started with mdtraj
.
Each subsection is a notebook. To open these notebooks in a “live” Jupyter/IPython session and execute the documentation interactively, you need to download the repository and start the Jupyter notebook.
If you installed MDTraj from source, you will need to navigate to
path-to-mdtraj/examples
. The notebook files for these examples and
the notebooks are available in the top level examples folder on github too. In
the directory with the notebook files, start an IPython notebook server:
$ jupyter notebook
Warning
The pre-filled out notebooks are far less fun than running them yourself!
- Introduction to MDTraj
- Atom Selection
- Finding centroids of clusters
- Clustering with
md.rmsd()
andscipy.cluster.hierarchy()
- Baker-Hubbard Hydrogen Bond Identification
- Out-of-core calculations with
md.iterload()
- Fraction of Native Contacts
- Calculating NMR observables with
mdtraj.nmr()
- Running a simulation in OpenMM
- Principal components analysis (PCA) with
scikit-learn
- Plotting a Ramachandran map with
matplotlib
- Benchmarking MDTraj’s RMSD engine
- Solvent Accessible Surface Area (SASA) Calculation
- Memory-limited two pass clustering with
scipy.cluster
Let us know if you would like to contribute other example notebooks, or have any suggestions for how these can be improved.