From: Lara rajam (lara.4884_at_gmail.com)
Date: Wed Jul 24 2019 - 11:16:03 CDT

Thanks for the e-mail
I tried a TCL scripting as below
The issue is I am not able to write the coordinate of the selection and the
water within 5A
could any one point out where is the issue

set frames [molinfo top get numframes]

set fp [open "close.pdb" w]

set ligand "resname GLY ALA"

for {set i 0} {$i < $frames} {incr i} {

                puts "Frame: $i"

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

                puts "Frame: $j"

set a [atomselect top "(water within 5 of ($ligand) and oxygen)"]

                set b [atomselect top "$ligand"]

                $a frame $i

                $a update

                $b frame $j

                $b update

                set num1 [$writepdb expr{$b + $a}]

                puts $fp "$i $num1"

                puts $fp "$j $num1"

                $a delete

                $b delete

}

}

close $fp

----- Thanks in advance