From: M. Madhu (madhu7_at_hotmail.com)
Date: Mon Jul 30 2007 - 13:50:00 CDT
Hi,
I want to get xyz coordinates for a selected atom from a trajectory (dcd) file.
I have a tcl script for extracting the coordinates from a dcd file, but it does not
give me any values. It gives only blank lines corresponding to the number
of frames. However, if I don't use the loop and do the calculation for a single
pdb file, it works fine.
The following is the tcl script: Could anyone tell me what is wrong with it.
Thanks,
Madhu
=============================================================
set outfile [open coords.dat w];
mol delete all
mol load mydcdfile.dcd psf mypsffile.psf
set nf [molinfo top get numframes]
# loop
for {set i 1 } {$i < $nf } { incr i } {
set sel1 [atomselect top "protein and resid 1 and type CA" frame $i]
set x1 [$sel1 get x]
set y1 [$sel1 get y]
set z1 [$sel1 get z]
puts $outfile "$x1"
}
close $outfile
==============================================================
_________________________________________________________________
Catch the cricket action with MSN!
http://content.msn.co.in/Sports/Cricket/Default.aspx
This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:01 CST