[gmx-users] RE: trjconv -dump problem
Mark.Abraham at anu.edu.au
Tue Feb 14 16:06:19 CET 2012
On 14/02/2012 11:39 PM, Ehud Schreiber wrote:
> Dear Mark (or anybody else interested),
> The .trr file does include the final (t = 217) frame - first, trjconv
> Reading frame 3 time 217.000
> and second this is verified by converting the whole trajectory to .gro:
> trjconv -f 1IARcompleted_WT_minimized.trr -s
> 1IARcompleted_WT_minimized.tpr -o 1IARcompleted_WT_minimized_path.gro
> It therefore seems the behavior is a bug, as the last frame is there,
> and is needed, especially in minimizations. An output in a .gro format
> is not sufficient for a further minimization because of its limited
> accuracy format of coordinates.
I looked at the code. This is an artefact of trjconv having to try to
work out the spacing of the frames in your .trr to then work out which
frame is probably going to be the closest. It assumes the frame will be
equally spaced, and accepts the first frame that is closer than half the
spacing it computes from the first two frames. Since your frames are
presumably 100, 200 and 217, the "spacing" is 100 and it accepts 200
because it's the first one it finds within 100/2 of 217.
You can work around this in lots of ways (trjconv -b 217; using
nstxout=0 in the first EM; using nstxout=1 in the first EM; using
nstxout extremely large in the first EM; taking the EM output .trr and
giving it to the next grompp -t without doing anything).
> Also, my mdrun did not produce a checkpoint file (I'm not sure whether
> because I didn't ask to or because the run was shorter than 15 minutes).
OK, maybe EM has a different behaviour (no checkpoint, thus write last
> Ehud Schreiber.
>> Message: 2
>> Date: Tue, 14 Feb 2012 21:58:10 +1100
>> From: Mark Abraham<Mark.Abraham at anu.edu.au>>
>> Subject: Re: [gmx-users] FW: trjconv -dump problem
>> To: Discussion list for GROMACS users<gmx-users at gromacs.org>>
>> Message-ID:<4F3A3E42.6000605 at anu.edu.au>>
>> Content-Type: text/plain; charset="iso-8859-1"
>> On 14/02/2012 7:59 PM, Ehud Schreiber wrote:
>>> Dear Gromacs users,
>>> I minimized a protein structure 1IARcompleted_WT.pdb, getting, among
>>> others, the files 1IARcompleted_WT_minimized.trr and
>>> 1IARcompleted_WT_minimized_potential_energy.xvg . Looking at the
>>> latter file showed the last frame to be at 217 ps:
>>> @ title "Gromacs Energies"
>>> @ xaxis label "Time (ps)"
>>> @ yaxis label "(kJ/mol)"
>>> @ s0 legend "Potential"
>>> 0.000000 -31997.519531
>>> 0.000000 -33810.406250
>>> 200.000000 -69850.609375
>>> 217.000000 -69898.031250
>>> I wanted to extract only this last frame from the .trr file, so used
>>> trjconv -f 1IARcompleted_WT_minimized.trr -o
>>> 1IARcompleted_WT_minimized_217.trr -dump 217
>>> However, this seems to have produced a file with the t = 200 ps
>>> conformation, though the dump parameter was recorded, as trjconv
>>> output was:
>>> Option Type Value Description
>>> -dump time 217 Dump frame nearest specified time (ps)
>>> Will write trr: Trajectory in portable xdr format
>>> trn version: GMX_trn_file (single precision)
>>> Reading frame 2 time 200.000
>>> Dumping frame at t= 200 ps
>>> Reading frame 3 time 217.000
>>> Also, using -dump 200 gave an identical file to the above.
>>> Any idea why the expected timeframe isn't reproduced?
>>> I'm using gromacs 4.5.3.
>> Your nstxout parameter means not every frame is written.
>> Prior to the implementation of checkpointing, the final frame was
> written to the .trr regardless of nstxout, but that no longer occurs.
>> The final frame is in your checkpoint file, and you can use that
> anywhere you might use a coordinate file - including trjconv to get a
> simple coordinate file from it.
More information about the gromacs.org_gmx-users