From: ban arn (ban.arn_at_gmail.com)
Date: Tue Mar 22 2011 - 05:00:42 CDT

Dear All

Thanks for reply.

with help of useful reply, I modified the script to get formatted output.
While executing this script

set mol [molinfo top]
set out [open xy_cordinates.txt w]
set sel [atomselect top "protein and name CA"]
set frames [molinfo $mol get numframes]
for {set i 0} {$i < $frames} {incr i} {
  $sel frame $i
  set coords [$sel get {x y}]
  puts $out [format "%5i %7.3f %7.3f" $i $coords]
  $sel update
}
flush $out
close $out

It shows error as "*expected floating-point number but got
"{-13.145000457763672 17.072999954223633} {-15.6020"*

Kindly advice.

Many Thanks
Balaji

2011/3/22 Paweł Kędzierski <pawel.kedzierski_at_pwr.wroc.pl>:
> Hi,
>
> On 21.03.2011 16:37, ban arn wrote:
>>
>> Dear VMD users
>>
>> Thanks for reply.
>>
>> But would like to do the same (projection of c-aplha atom coordinates
>> on xy plane) for trajectories.
>
> A quick & dirty way would be:
>
> set sel [atomselect top "protein and name CA"]
> set frames [molinfo top get numframes]
> for {set i 0} {$i< $frames} {incr i} {
> $sel frame $i
> $sel set z 0
> }
> animate write dcd CA_z_proj.dcd sel $sel
> animate write xyz CA_z_proj.xyz sel $sel
>
> You may get the projection coordinates in any format supported by "animate
> write". XYZ is the simplest text format at hand.
> However you will be left with modified structure in VMD.
> HTH,
> Pawel
>