[gmx-users] gmx dipoles with dynamic indices (gromacs 5.0.x)

Justin Lemkul jalemkul at vt.edu
Wed Sep 16 13:55:18 CEST 2015

On 9/15/15 6:13 PM, Daskalakis Vangelis wrote:
> Hello.
> I want to use a dynamic selection scheme (select different atoms based on
> the same selection criteria for each frame of a trajectory) and pass this
> selection/ info to the gmx dipoles tool. It seems that the -select option
> cannot be used.
> I tried to use dynamic selection through gmx select. The gmx select output
> (using the -on option, e.g an index.ndx file) was indeed a correct
> selection of the molecules/ atoms within the system for each frame,
> resulting in a large index.ndx file for the whole trajectory.
> When I use the -n index.ndx option for the gmx dipoles, there is of course
> this huge list of groups of atoms (one group per frame) showing up. I
> cannot choose just one frame selection group, as I want the gmx dipoles
> tool to process each frame based on the selected group of atoms for each
> frame written in index.ndx by gmx select.
> Any ideas or suggestions? Thank you.

You'll have to do the analysis frame by frame in a shell script.  Use the index 
group as a counter, and then calculate what the time is based on the interval 
you've saved and pass that value to gmx dipoles -b -e.  See also


So your first call (for the first frame, t=0) is:

echo 0 | gmx dipoles -b 0 -e 0 -s *.tpr -f *.xtc/trr



Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441


More information about the gromacs.org_gmx-users mailing list