Skip to content Skip to navigation
University of Warwick
  • Study
  • |
  • Research
  • |
  • Business
  • |
  • Alumni
  • |
  • News
  • |
  • About
  • Text only
  • |
  • Sign in
  • Search MOAC
  • Search University of Warwick
  • Search for people at Warwick
  • Search Warwick Blogs
  • Search past exam papers
  • Search video
  • More…

    Molecular Organisation and Assembly in Cells

    • About the DTC
    • Research
    • People
    • Degrees
    • Study at MOAC
    • News & Events
    • MOAC Students »
    • Peter Cock »
    • Python Programming »
    • Protein visualisation
    University of Warwick

    Protein visualisation with MMTK

    This example uses Konrad Hinsen's Molecular Modelling Toolkit (MMTK) to draw the insulin protein (from a PDB file), with four predefined views (big version):
    [Sample output]

    I added the four coloured arrows to the 3D visualization to try to help orientate the viewer - this example would be nicer with a less globular protein, but I used this structure because MMTK includes it as an example input file.

    The code shows how easily MMTK can produce a space filling model (using Van der Waals radii spheres). You can also produce Ball-and-Stick, protein backbone only, ...

    The example also uses a VRML97 only feature known as "cameras" which allow pre-defined "viewpoints" to be defined - in this case the "front", "left", "back" and "right" views shown in the figure above.

    VRML97, aka VRML2, is the second incarnation of the VRML file format, which stands for Virtual Reality Markup Language. Since 1997, VRML2 in turn has been superceded by the X3D standard.

    I wrote this example to demonstrate some of the visualisation capabilities of MMTK, and it is included in MMTK as of version 2.5.1 (or thereabouts). You can also download it here:

    • vrml2_cameras_vdw.py [Python Code] - the python script
    • insulin.pdb - the protein structure input file
    • insulin_vrml97.wrl - VRML97 output file (with four predefined viewpoints)
    • insulin_vrml.wrl - VRML output file (without predefined viewpoints)

    This screenshot shows the "front" viewpoint in a free (but discountinued) Windows VRML viewer, GLView 4.4:
    [Screenshot]

    In any VRML viewer there should be some button or menu to switch between the predefined views, while of course the protein can also be freely rotated using the mouse.

    Its just a one line change to switch from VRML97 to VRML, VPython (Visual Python) or VMD for output. However, as these don't support the camera feature you'll also need to comment those bits out too.

    Note that recent versions of VMD deal with colours very differently, which rather spoils the effect, as MMTK can no longer specify the colours to show.

    e.g. Using VPython (Visual Python):
    [Sample output]

    [Python logo]
    Python

    [MMTK logo]
    The Molecular Modelling Toolkit (MMTK)

    [PDB logo]
    Protein Data Bank (PDB)

    [VPython logo]
    VPython

    MOAC DTC, Coventry House, University of Warwick, Gibbet Hill Road, Coventry, CV4 7AL
    Tel. 024 765 75808 moac2 at warwick dot ac dot uk

    How to find us

    MOAC Intranet

    EPSRC logo

    Close this email form
    Page contact: Peter Cock Last revised: Wed 6 Dec 2006
    • Sign in
    • |
    • Powered by Sitebuilder
    • |
    • © MMXII
    • |
    • Privacy
    • |
    • Accessibility