From: John Stone (
Date: Thu Jan 18 2007 - 16:33:52 CST

Hi Peter,
  Here's a very simple script that uses the "measure sasa" command to
assign colors to the structure based on solvent accessible surface area:

## Example script that sets the "User" data field with SASA values

## Get list of residues (use 'residue' and not 'resid' so we don't get
## duplicate residues from unusual PDB files..)
set allsel [atomselect top all]
set residlist [lsort -unique [$allsel get residue]]

## Make an atom selection, set the User field with the SASA value for
## the selected atom
foreach r $residlist {
  set sel [atomselect top "residue $r"]
  set rsasa [measure sasa 1.4 $allsel -restrict $sel]
  $sel set user $rsasa
  $sel delete
  puts "residue $r, sasa: $rsasa"

## change the "color by" and "trajectory" tab settings to color by SASA
mol modcolor 0 [molinfo top] User
mol colupdate 0 [molinfo top] 1
mol scaleminmax [molinfo top] 0 auto

On Fri, Jan 19, 2007 at 08:34:16AM +1100, Peter Hains wrote:
> Hi John,
> thanks for the help with MSMS, I've got that working. I cannot seem
> to work out the exact sequence to get "sasa" working for me. I have
> looked over the mailing list archive, but I can't find anything that
> answers my questions.
> What I want to do is determine the surface accessible area for a
> number of residues in a given PDB file.
> I can work out I need to use "measure sasa srad ...." but I'm unclear
> on the exact options/requirements. Do I need to use "atomselect" in
> the same command, or do I select the atoms first and then use the
> "atomselect0" to use that selection with the measure command?
> If you could just give me an example command I should be able to work
> it out from there.
> Thanks again,
> Peter
> >For measuring solvent accessible surface area, you'll
> >want to use the "measure sasa" command. There isn't a
> >graphical interface for this yet, since there are so many
> >ways to use this command, but there are a number of past emails
> >on this subject in the VMD-L archive that you can reference to
> >help you get started. Let us know if you have more questions
> >on this.

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078