From: Christopher Stiles (CS145331_at_albany.edu)
Date: Sun Mar 09 2008 - 14:55:51 CDT

*Sorry if this has posted twice I looked though the list and it did not seem
to have gone through,*

 

I have been trying to come up with a script for radial density over the
whole run but it have been just giving me zeroes, if some one could take a
quick look at let me know if any errors catch there eye right away that
would be great.

 

Please note that as of now I am just trying to get it to run over one frame,
looping is not a problem.

 

#*****************************************************************

#*****************************************************************

#*****************************************************************

#Put following code into the Tk console

#*****************************************************************

#*****************************************************************

#*****************************************************************

set nt [atomselect top "resid 1"]

set NT_min [lindex [lindex [measure minmax $nt] 0] 2]

set NT_max [lindex [lindex [measure minmax $nt] 1] 2]

set x_0 [lindex [measure center $nt] 0]

set y_0 [lindex [measure center $nt] 1]

set step 0.25

set num_frames [molinfo top get numframes]

set Inner_limmit 0

set Outer_limmit 0

 

set numb {0}

set x 1

set y 0

for {set i 1} {$i < 1000} {incr i} {

set y "[expr $i + $x]"

set numb [linsert $numb $y 0]

}

 

llength $numb

 

#*****************************************************************

#*****************************************************************

#*****************************************************************

#Put following code into the black VMD command window

#*****************************************************************

#*****************************************************************

#*****************************************************************

 

set wat_sel [atomselect top "water and (z > $NT_min and z < $NT_max and
sqrt((x-$x_0)*(x-$x_0) + (y-$y_0)*(y-$y_0)) <= $Outer_limmit and
sqrt((x-$x_0)*(x-$x_0) + (y-$y_0)*(y-$y_0)) > $Inner_limmit)"]

 

#*****************************************************************

#*****************************************************************

#*****************************************************************

#Put following code into the Tk console

#*****************************************************************

#*****************************************************************

#*****************************************************************

 

for {set j 0} {$j < 1000} {incr j} {

set Inner_limmit "[expr $j*$step]"

set Outer_limmit "[expr $j*$step + 1*$step]"

lreplace $numb $j $j "[expr [lindex $numb $j] + [$wat_sel num]]"

}

 

#*****************************************************************

#*****************************************************************

#*****************************************************************

#this last bit of code should of stored density of water of the box in
relation to the center of the box in the "numb" list.

#*****************************************************************

#*****************************************************************

#*****************************************************************

 

The following are links to the files I use.

http://www.cs86.com/CNSE/SWNT/post_part7/SWNT_6_6_144_b4em.gro

http://www.cs86.com/CNSE/SWNT/post_part7/traj.trr

 

Thank you very much!

~Christopher Stiles

College of Nanoscale Science and Engineering (CNSE)

State University of New York, Albany, New York 12203, USA