From: Ban Arn (ban.arn_at_gmail.com)
Date: Tue Feb 21 2012 - 12:36:07 CST

Dear VMD users

I am using the following script to SASA calculation.

# solvent accessible surface area calculation through the trajectory
# compare chain D with others
# loading trajectory

# setup binding site 7A
set binding_site [atomselect 0 "protein within 6 of resname UNK"]

# load atoms radii information (same as used in DSSP)
[atomselect top "name O"] set radius 1.40
[atomselect top "name N"] set radius 1.65
[atomselect top "name CA"] set radius 1.87
[atomselect top "name C"] set radius 1.76
[atomselect top "noh and not name O N CA C"] set radius 1.80
[atomselect top "hydrogen"] set radius 0.0

# start procedure (function)
proc sasa_trj { sel file } {
# open file for writing
set fout [open $file w]
# get molecules ID from the selection of function arguments
set molid [$sel molid]
# get the number of frames of loaded trajectory
set nf [molinfo $molid get numframes]
# measure for all five subunits
set protein [atomselect $molid "protein and noh"]
# select a residue from each subunit
set s1 [atomselect $molid "[$sel text]"]

for { set i 0 } { $i < $nf } { incr i } {
# frame (trajectory) update corresponding selections
molinfo $molid set frame $i
$protein frame $i
$sel frame $i
$s1 frame $i

# consider the whole protein but calculate for
#the subunit with probe solvent radius of 1.4 A
set sa1 [measure sasa 1.40 $protein -restrict $s1]

# print out (time average_of_four_subunits orange_subunit)
puts $fout "[expr $i*0.01] $sa1"
}
close $fout
}

I would like to conform that the script updates the each frames for the
selection.

I tried for intermediate frames in the trajectory by saving them as pdb,
the results are different.

If the script doesn't update for every frame, kindly advice how to modify
the script.

Many Thanks
Balaji