AFAIK there is no magic number header. However, .trr files have frames of constant size, so you can make a .tpr that will write a .trr file that will include the longest period of your nst[xfv]out. Some Unix tool like dd (or maybe hexdump) can probably tell you the size of that repeating unit. Then you can use dd to write increasingly larger multiples of that size to get a subset that includes all the trajectory before the *second* corruption. Back up your files first! I suggest you write two periods to check my assertion that the frames ought to be of constant size. Practice on a small trajectory you don't care about.
Then you'll be in a position to judge the start point of the first complete frame after the first corruption, which will allow you to construct a fancier dd solution to get the remainder of the trajectory from the post-first-corruption fragment. Then trjcat -h to learn how to stitch the parts together. Everybody learn: do (parts of) your analysis while your simulation is running, not after it finishes! :-) Mark On Thu, Apr 25, 2013 at 8:00 PM, Ioannis Beis <ioannis.b...@oulu.fi> wrote: > Dear Gromacs users, > > I have some corrupted frames in different trajectories. gmxcheck with .trr > trajectories gives extraordinary positions or velocities and with .xtc > trajectories gives rise to the magic number error. I am aware of the > program gmx_rescue kindly offered to us by its developers. However, this > program can only work with .xtc files. It is possible to rescue .trr files > when there is a maximum of one corrupted frame by checking the size of > healthy frames, chopping the parts of the trajectory before and after, > using e.g. programs head and tail with the corresponding integer multiples > of one healthy frame in bytes and stitching them together. However, when > there is two or more corrupted frames in different locations, although it > is not hard to spot the exact locations, it is no longer possible to remove > the problematic frames size-wise (or at least it is less likely to succeed > than winning the lottery) , since the size of each corrupted frame is > non-standard. Is there any corresponding software to gmx_rescue that can be > used with .trr files? Is there any other recent program or any other way of > coping with the problem? I did not post any details of my systems or the > specific error messages I get because I believe my question is clear. > > Thank you in advance! > > Best, > Yiannis > -- > gmx-users mailing list gmx-users@gromacs.org > http://lists.gromacs.org/mailman/listinfo/gmx-users > * Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/Search before posting! > * Please don't post (un)subscribe requests to the list. Use the > www interface or send it to gmx-users-requ...@gromacs.org. > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! * Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists