From: J. Rui Rodrigues (joaquim.rodrigues_at_estg.ipleiria.pt)
Date: Mon Mar 21 2011 - 12:12:28 CDT

Hi,

On Mon, 21 Mar 2011 15:37:03 +0000, 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.
>
> I tried this script
>
> set mol [molinfo top]
> set out [open xy_cordinates.txt w]
> set sel [atomselect top "protein and name CA"]

You don't need the line below:
> $sel get {x y}

> set frames [molinfo $mol get numframes]
> for {set i 0} {$i < $frames} {incr i} {
> $sel frame $i
> $sel update
This is where you should retrieve coordinates:
  set x [$sel get x]
  set y [$sel get y]

> puts $out "$i $x $y"
> }
>
> I didn't get any result in the output file.
>
> Any help is greatly appreciated.
>
> Many Thanks
> Balaji

HTH,
Rui Rodrigues

>
> 2011/3/18 [UTF-8?]Paweł [UTF-8?]Kędzierski <pawel.kedzierski_at_pwr.wroc.pl>:
> >
> > On 18.03.2011 18:58, ban arn wrote:
> >>
> >> Dear VMD users
> >>
> >> I would like to know is there any script available in vmd or from
> >> others sources for projection of c-aplha atom coordinates on xy plane.
> >>
> >
> > Did you mean filtering out CA atoms and replacing z coordinate with 0 (or
> > whatever)? E.g.:
> >
> > awk --posix '/^ATOM (.){6} CA /{printf("%.46s%8.3f\n",$0,0);}'
> > your_file.pdb
> >
> > Or if you filtered out CA previously (within VMD, File->Save coordinates,
> > selection "protein and name CA") it would be enough to say:
> >
> > awk '{printf("%.46s%8.3f\n", $0, 0);}' your_file.pdb
> >
> > This works with gnu awk.
> > HTH
> > Pawel
> >>
> >> Any help is greatly appreciated.
> >>
> >> Many Thanks
> >> Balaji
> >>
> >

--
Webmail ESTG de Leiria (http://webmail.estg.ipleiria.pt)