From: alexandra.marques_at_fc.up.pt
Date: Thu Aug 31 2006 - 10:20:14 CDT

Hi

I still have a problem with my script to write the list of water molecules for
each frame. The problem is with the format of the output file, that is, for
each frame, the waters are listed in the horizontal and vertical lines. For
example:

Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694
Frame 0, 4561 4593 4614 4639 5215 5216 5220 7142 7186 7201 8694

As my trajectory has 5000 frames the output file is very big and hard to
analyse. Does anyone knows how should I modify the script in order to the
waters be listed for each frame only in one line?
The script is:

set outfile [open watersTDT.txt w]
set sel [atomselect top "name O and resname WAT and within 3.5 of residue 255"]
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 3.5 of residue 255:"
puts "$residuelist"
foreach res $residuelist {
puts $outfile "Frame $i, $residuelist"
}
}
close $outfile

Thank you very much for your help
Alex

-------------------------------------------------------------
A FCUP utiliza o sistema de webmail Horde/IMP (www.horde.org)

Visite: http://www.fc.up.pt/