-
Notifications
You must be signed in to change notification settings - Fork 7
/
Count_water.tcl
20 lines (20 loc) · 932 Bytes
/
Count_water.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Tcl VMD script to calculate number of waters present within 5 A of given resid
#
# Authour : KAPAKAYALA ANJI BABU
# IIT KANPUR, INDIA
#
# USAGE : Open VMD /Extensions/Tkconsile then source get_no_of_waters.tcl
#
set outfile [open "no-of-waters.dat" w ]
# set waters [ atomselect top "(within 10 of resid 233 232 234 79 81 83 148 167 290) and resname WAT and type O" ]
set waters [ atomselect top "(within 10 of resid 235) and resname WAT and type O" ]
# set resids [$waters get { resname resid } ]
# set numofwaters [$waters get type ]
set nw [ $waters get serial ]
# set unique [lsort -unique $nw]
# puts $unique
puts $outfile $nw
close $outfile
#==============================================================================#
# Written By ANJI BABU KAPAKAYALA #
#==============================================================================#