[gmx-users] Output trajectory frames as separate coordinate files

Justin Lemkul jalemkul at vt.edu
Thu Feb 20 16:43:08 CET 2020



On 2/20/20 8:30 AM, Peter Mawanga wrote:
> My apologies, this can be achieved easily with the command below:
>
> gmx trjconv -s <reference file, optional> -f <input trajectory file> -n
> <index file, optional> -split <mention the trajectory output frequency or
> interval (in picoseconds)> -o <desired output prefix>.<output file format>

It's even easier. You can just use gmx trjconv -sep (with -b/-e as 
needed to define a time interval).

-Justin

>
>
> On Thu, Feb 20, 2020 at 2:15 PM Peter Mawanga <peter.mawanga.lagos at gmail.com>
> wrote:
>
>> Hello everyone
>>
>> Is it possible to output different frames of a .trr trajectory as single
>> .gro files without supplying an index (<frame>.ndx) file each time?
>>
>> In VMD this can be achieved with:
>>
>> set mol [molinfo top]
>> set sel [atomselect $mol all]
>> set n [molinfo $mol get numframes]
>> for {set i 0} {$i < $n} {incr i} {
>>    $sel frame $i
>>    $sel update
>>    $sel writepdb $i.pdb
>>   }
>> $sel delete
>>
>> I am searching for a similar command in Gromacs if feasible where just
>> supplying the frame number would be fine or a workaround. Thank you for
>> your assistance.
>>
>> --
>> Cheers
>> Peter
>>
>

-- 
==================================================

Justin A. Lemkul, Ph.D.
Assistant Professor
Office: 301 Fralin Hall
Lab: 303 Engel Hall

Virginia Tech Department of Biochemistry
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129
http://www.thelemkullab.com

==================================================



More information about the gromacs.org_gmx-users mailing list