AMBER Archive (2007)

Subject: RE: AMBER: How to delete particular frame from mdcrd file (not with ptraj).

From: Steve Spronk (spronk_at_umich.edu)
Date: Thu Aug 23 2007 - 08:25:50 CDT


Hi Saurabh,

The trajectory file is nothing more than a huge list of coordinates for your
system. Each frame in your trajectory consists of a list of 3N coordinates
(N = number of atoms). Also, if you have a periodic box, three more
coordinates are listed on a separate line.

If you look at the file, you'll see that there are 10 values across each
line. Therefore, the number of lines taken up by each frame is the whole
number greater than or equal to 3N/10. In addition, add one line if you
have box information in your file. Also, keep in mind that the first line
of the file is reserved for a title (sander just outputs a blank line).

For example, if you want to identify the lines that make up frame 668, do
something like this (assuming you have, say, 4321 atoms):
Each frame consists of 3*4321/10 lines = 1296.3 (round up to 1297) + 1 for
box information = 1298 lines
So up to frame 667, there are 1 (for the title line) + 1298*667 = 865767
lines. Frame 668 begins on line 865768 and continues 1298 lines, so that
its last line is 867065.

Hope this helps.
Steve

-----Original Message-----
From: owner-amber_at_scripps.edu [mailto:owner-amber_at_scripps.edu] On Behalf Of
saurabh agrawal
Sent: Wednesday, August 22, 2007 6:26 AM
To: amber_at_scripps.edu
Cc: saw44_at_cam.ac.uk
Subject: Re: AMBER: How to delete particular frame from mdcrd file (not with
ptraj).

Thanks Steve

I saw the trajectory it has thousands and thousands
values. May you please let me know the way to trace a
particular frame form full trajectry. eg. I need to
detete frame 668.
How it is possible.

thank you again.

saurabh

--- Steven Winfield <saw44_at_cam.ac.uk> wrote:

> Dear Saurabh,
>
> You could work out how many lines per frame there
> are in the mdcrd file
> then use 'head' to cut out the frames before the bad
> one, 'tail' to get
> those frames after the bad one, then 'cat' the two
> results into a new
> mdcrd file:
>
> $ head -n (lines/frame x frames before) mdcrd >
> before.mdcrd
> $ tail -n (lines/frame x frames after) mdcrd >
> after.mdcrd
> $ cat before.mdcrd after.mdcrd > new.mdcrd
>
> Steve.
>
> saurabh agrawal wrote:
> > Hello All,
> >
> > One frame of my mdcrd file is gone bad and not
> > readable with ptraj or VMD software.
> > I can see them through Chimera but since chimera
> do
> > not have the facility of deleting a particule
> frame
> > form whole trajectory, I am unable to do that.
> >
> > I need to delete that frame for rmsd generation
> and
> > other analysis through ptraj.
> >
> > Please let me know the possible ways for doing
> this.
> >
> > waiting for kind replys.
> >
> > saurabh
> >
> >
> > Download prohibited? No problem. CHAT from
> any browser, without download. Go to
> http://in.messenger.yahoo.com/webmessengerpromo.php/
> >
>
-----------------------------------------------------------------------
> > The AMBER Mail Reflector
> > To post, send mail to amber_at_scripps.edu
> > To unsubscribe, send "unsubscribe amber" to
> majordomo_at_scripps.edu
>
-----------------------------------------------------------------------
> The AMBER Mail Reflector
> To post, send mail to amber_at_scripps.edu
> To unsubscribe, send "unsubscribe amber" to
> majordomo_at_scripps.edu
>

      Once upon a time there was 1 GB storage in your inbox. To know the
happy ending go to
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu