VMD Tutorial

Complete Guide from Installation to Molecular Visualization

Introduction

This tutorial will guide you through the installation and basic usage of VMD. We'll start with system requirements, then proceed with installation, and finally learn how to use VMD for molecular visualization and analysis.

VMD requires a graphics card with OpenGL support. Please ensure your system meets these requirements.

Installation Steps

1. Download VMD

Download the appropriate version for your operating system from the official VMD website.

2. Install Dependencies

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

# CentOS/RHEL
sudo yum install mesa-libGL-devel mesa-libGLU-devel

3. Install VMD

# Extract downloaded file
tar xvf vmd-1.9.4.bin.LINUXAMD64.tar.gz

# Enter directory
cd vmd-1.9.4

# Install
./configure
cd src
make install

Basic Usage

1. Load Molecular Structure

# Start VMD
vmd

# Load PDB file in VMD Tcl console
mol load pdb 1AKI.pdb

# Or use graphical interface
# File -> New Molecule -> Browse -> Select PDB file

2. Molecular Representation

# Set representation in Tcl console
mol modstyle 0 0 Licorice
mol modstyle 0 0 CPK
mol modstyle 0 0 NewCartoon

# Or use graphical interface
# Graphics -> Representations -> Select representation style

3. Save Image

# Save image in Tcl console
render TachyonInternal scene.dat
render Tachyon scene.dat scene.tga

# Or use graphical interface
# File -> Render -> Select format and filename

Advanced Topics

Trajectory Analysis

# Load trajectory file
mol load psf protein.psf dcd trajectory.dcd

# Calculate RMSD
measure rmsd protein using backbone

# Calculate RMSF
measure rmsf protein using backbone

Tcl Script

# Create custom script
proc analyze_trajectory {mol_id} {
    set nframes [molinfo $mol_id get numframes]
    for {set i 0} {$i < $nframes} {incr i} {
        animate goto $i
        set rmsd [measure rmsd protein using backbone]
        puts "Frame $i: RMSD = $rmsd"
    }
}

# Run script
analyze_trajectory 0

Related Tutorials