[gmx-users] Extract frames from Trajectory

Justin Lemkul jalemkul at vt.edu
Tue Nov 27 17:36:57 CET 2018



On 11/27/18 11:33 AM, Harsha Ravishankar wrote:
> Hi Justin & Fernando,
>
> Thanks for the replies. I think I might have not explained my issue
> properly: so I have a 100 ns trajectory of a protein & lipids system. I
> would like to extract frames every 1 ns of the protein and whatever lipids
> might be within 0.2 nm within it.
>
> The way I proceeded was as follows,
>
> First, I made an index file containing the residues of the transmembrane
> domain named residues.ndx,
>
> Next i made use of gmx select to identify the lipid molecules which are 0.2
> nm away from them in the trajectory using,
>
> gmx select -f Traj.trr  -s topol.tpr -select 'resname POPC and within 0.2
> of group 30' -n residues.ndx  -on Lipids.ndx,
>
> Then I manually added the contents of Lipids.ndx to Protein.ndx, which
> contains just the protein and renamed it as ProteinLipids.ndx
>
> Next, I write out the frames using,
>
> gmx trjconv  -f Traj.trr -s topol.tpr -o proteinlipid.pdb -split 1000 -dt
> 1000 -n ProteinLipids.ndx -pbc whole,
>
> but I find that I am unable to.

Reverse the order of what you're doing - first save only the frames at 
the interval you want, then use gmx select to make the index groups.

Then, you need a third step. The index file you get from gmx select will 
have the atoms of the selection you made per frame. GROMACS analysis 
tools are not yet capable of automatically parsing such an index file 
automatically, so you will have to use the -dump option (that was 
suggested before) to select the frame and matching index group that you 
want to save. Then you'll get the coordinates of the selection you want.

-Justin

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

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