AMBER Archive (2007)

Subject: [Fwd: Re: AMBER: How to delete particular frame from mdcrd file (not with ptraj).]

From: Steven Winfield (saw44_at_cam.ac.uk)
Date: Thu Aug 23 2007 - 08:31:49 CDT


Dear saurabh,

I sent this yesterday but it seems it didn't get resent by the reflector
for some reason.

Steve

-------- Original Message --------
Subject: Re: AMBER: How to delete particular frame from mdcrd file (not
with ptraj).
Date: Wed, 22 Aug 2007 11:39:21 +0100
From: Steven Winfield <saw44_at_cam.ac.uk>
To: saurabh agrawal <imsam100_at_yahoo.co.in>
References: <816084.21629.qm_at_web94505.mail.in2.yahoo.com>

The format of the trajectory file can be found here:

http://amber.scripps.edu/formats.html#trajectory
(Note the title line which I didn't mention before)

The x,y,z coords of each atom are printed 10 per line, so take the
number of atoms in your simulation, multiply by 0.3 and round up to the
nearest integer. If you have box information in there as well then add
1. This gives you the number of lines per frame (call it 'L')

So the number you want to give to 'head' is probably going to be
667*L + 1 (for the title)

You also need to know the total number of frames in there. If you don't
already then 'wc -l mdcrd' will give you the total number of lines in
the file (but this might be very slow). You can then subtract 1 and
divide by L, which should give you the total number of frames (if it
isn't an integer something has gone wrong!)

The number you give to 'tail' is then
(number of trailing frames)*L

Steve

saurabh agrawal wrote:
> 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