RE: extracting coordinates from dcd file

From: M. Madhu (madhu7_at_hotmail.com)
Date: Mon Jul 30 2007 - 23:31:27 CDT

Hi Dong & Gumbart,

Thank you both for your response. I was able to extract coordinates when
I changed "type CA" to "name CA". Though I loaded psf and dcd in two steps,
as suggested here, type CA did not give any coordinates. In order to save
memory, I have modified the script. I have also included frame 0 by starting
the loop at 0.

Once again, thank you both for your help

Madhu

----------------------------------------
> Date: Mon, 30 Jul 2007 14:21:36 -0700
> From: us917_at_yahoo.com
> Subject: Re: namd-l: extracting coordinates from dcd file
> To: madhu7_at_hotmail.com
>
> Please change "type CA" to "name CA".
>
> Dong
>

-----------------------------------------------------------
-----------------------------------------------------------
> CC: namd-l_at_ks.uiuc.edu
> From: gumbart_at_ks.uiuc.edu
> Subject: Re: namd-l: extracting coordinates from dcd file
> Date: Mon, 30 Jul 2007 17:09:17 -0500
> To: madhu7_at_hotmail.com
>
> Try loading your psf and dcd file like this:
>
> mol new ***.psf
> mol addfile ***.dcd waitfor all
>
> The waitfor all flag is important; otherwise it will continue with
> your script before the dcd is finished loading (this is my guess as
> to why this happened).
>
> Also, to save memory, set your selection outside of the loop and then
> use "$sel frame $i" inside the loop to change the frame. If the
> selection atoms were to change through the simulation, you'd also
> need "$sel update". Also, you may want to start your loop at 0, not 1.
>
>
> On Jul 30, 2007, at 1:50 PM, M. Madhu wrote:
>
> >
> > 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
>

_________________________________________________________________
The idiot box is no longer passe!
http://content.msn.co.in/Entertainment/TV/Default.aspx

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:01 CST