Skip to content
This is a short tutorial showing how to use both VMD and MDAnalysis to analyse a molecular dynamics simulation of a membrane protein.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a short tutorial that will show you how to use both VMD and MDAnalysis to analyse a molecular dynamics simulation of a membrane protein. A sample trajectory is provided (of a bacterial peptide transporter which, structurally, belongs to the Major Facilitator Superfamily if you are interested). Although the trajectory we shall use was generated using GROMACS, all the examples can, with a few tweaks, could be applied to trajectories produced by other packages, such as NAMD, CHARMM or AMBER.

The aims are:

  • to show you how to run some simple analysis on a membrane protein molecular dynamics simulation
  • to encourage you to write your own analysis code, rather than use a 'script' that someone gives you
  • to show you how simple analysis tasks can often be done more than one way. Here I shall use both VMD and MDAnalysis to do the same analysis.
  • to introduce you briefly to the importance of writing good code and Software Carpentry, specifically to
    • test your code
    • include helpful comments
    • generalise your code so it can be more easily used again
    • fit into a (semi)-automated workflow

We won't be

  • exhaustively looking at all the ways you can analysis membrane proteins
  • categorically saying which approach is 'best'

You need to understand something about

  • membrane proteins
  • molecular dynamics simulations
  • writing computer code (any language)
  • ideally
    • be familiar with VMD
    • be familiar with simple python

There are currently three sections to this tutorial. In each of the first two we shall run a simple analysis task and in the third we shall compare VMD and MDAnalysis and list some of the advantages and disadvantages of each to analyse protein simulations.

You will need to have installed

To get started you will need to clone this git repository (collection of files in a folder) onto your computer. If you are using a Mac or a Linux machine, open a Terminal and check you have git by typing


Assuming git is installed, you should then copy the address of this repository to your clipboard - click the button with the arrow pointing to the clipboard just below the textbox which has HTTPS above it on the right hand side of this page. Then on your machine in the terminal type (or just copy the below)

git clone

and, volia, you should have a new folder called simple-membrane-protein-analysis/ which contains this file ( along with all the others.

If you don't have git installed, then you will either need to install it or try using the appropriate github GUI for your platform (includes Windows). If all else fails, you can always download a zip of the repo using the "Download ZIP" button which you can find in the bottom right of this page but this will just give you a copy of the files.

In the first example we shall count the number of lipids within a set distance of the protein during a simulation to assess when the system has equilibrated. Click here to go this example

You can’t perform that action at this time.