AMBER Archive (2002)

Subject: Re: combining trajectory file

From: Thomas Cheatham (cheatham_at_chpc.utah.edu)
Date: Tue Mar 12 2002 - 12:30:51 CST


> You may need to remove the title line from the 2nd trajectory on, otherwise,
> it wouldn't work correctly.

> > > I am using AMBER 6 recently for my simulation work. I divided my long
> > > simulation into several files but I have a problem in combining those files.
> > > I tried to use "cat" to cambine them, for example:
> > > cat md1.traj > md.traj
> > > cat md2.traj >> md.traj

As mentioned, although you can in principle simply remove the title, often
times in series of longer runs, in my experience (such as when the job is
killed due to wallclock limits while writing or disk overflow, etc),
sometimes the trajectory file is not written out completely for the final
frame of a given trajectory file. Although this is rare, if you simply
concatenate files together (after removing the titles) and have a partial
frame/configuration at the end of one of the trajectories, everything
after this point will be offset/incorrect.

ptraj can be used to concatenate the files (and even strip atoms like
solvent) and will also "check" each trajectory file it reads printing out
how many frames are found, whether inconsistencies are found (like *****'s
in the output due to overflow), etc. Although it is slower than simply
concatenating, it is likely more reliable.

An example input would be

  trajin md1.traj
  trajin md2.traj.gz
  trajin md3.traj
  trajout md.traj nobox
  rms first mass out rms_backbone.dat @C,N,CA
  strip :WAT

If you have troubles, let me know.

Thomas E. Cheatham, III
Department of Medicinal Chemistry & Center for High Performance Computing
University of Utah INSCC 418
30 South 2000 East, Room 201 155 South 1452 East
Salt Lake City, Utah 84112-5820 Salt Lake City, Utah 84112-0190
tec3_at_utah.edu http://www.chpc.utah.edu/~cheatham
phone: (801) 587-9652 FAX: (801) 585-5366