From: naga raju (nagaraju_cy_at_yahoo.co.in)
Date: Wed Dec 26 2007 - 01:01:50 CST

Dear VMD users,
               I solvated beta-cyclodextrine (resname 4GA, total residues 8 except water). I want to know the number of water molecules within 5 angstroms from resid 1 to 8 of beta-cyclodextrine.
I used the script from mailing list:
http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/7639.html

I used script:
###################################################
set outfile [open waters.txt w]
set sel [atomselect top "name O and resname WAT and within 5 of residue 1 "]
set n [molinfo top get numframes]
for { set i 0 } { $i < $n } { incr i } {
$sel frame $i
$sel update
set residuelist [$sel get residue]
puts "list of waters within 5 of residue 1:"
puts "$residuelist"
foreach res $residuelist {
puts $outfile "Frame $i, $residuelist"
}
}
close $outfile
##################################################
 then out put is look like this
****************************************************
Frame 0, 69 426 1003 1022 1735 2800
Frame 0, 69 426 1003 1022 1735 2800
Frame 0, 69 426 1003 1022 1735 2800
Frame 0, 69 426 1003 1022 1735 2800
Frame 0, 69 426 1003 1022 1735 2800
Frame 0, 69 426 1003 1022 1735 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 1, 206 482 668 1852 1858 1876 2035 2088 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 2, 1517 1925 2009 2409 2468 2800
Frame 3, 209 2009 2148 2468 2694
Frame 3, 209 2009 2148 2468 2694
Frame 3, 209 2009 2148 2468 2694
Frame 3, 209 2009 2148 2468 2694
Frame 3, 209 2009 2148 2468 2694
Frame 4, 1848 2072 2148
Frame 4, 1848 2072 2148
Frame 4, 1848 2072 2148
Frame 5, 1003 2696
Frame 5, 1003 2696
Frame 6, 1575 1740 2448
Frame 6, 1575 1740 2448
Frame 6, 1575 1740 2448
Frame 7, 388 2011 2468 2911
Frame 7, 388 2011 2468 2911
Frame 7, 388 2011 2468 2911
Frame 7, 388 2011 2468 2911
Frame 8, 328 1639 2725
Frame 8, 328 1639 2725
Frame 8, 328 1639 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 9, 328 1393 1517 1928 2274 2373 2725
Frame 10, 1073 2038
********************************************************
My question is :
                  What is wrong in script? If I want water molecules within 5 angstroms from residue 1 to 8. Is this script work or not? If it works where I have to modify?

    Any suggestion is appreciated.

                                    with best regards,
                                    Nagaraju Mulpuri.
       
---------------------------------
Never miss a thing. Make Yahoo your homepage.