[gmx-users] Select one molecule closest to another molecule for all snapshots

Justin Lemkul jalemkul at vt.edu
Fri Feb 15 14:41:52 CET 2019



On 2/15/19 4:10 AM, Apramita Chand wrote:
> Dear Gromacs Users,
> I have two kinds of molecules in my system. I want to know the coordinates
> of the molecule A that is found closest to molecule B at every snapshot of
> the MD trajectory. I am using gromacs 5.1.
> I dont have a cutoff, I just want to generate coordinates of the  single
> one molecule that is closest at any given snapshot.(for all frames0
>
> How do I do so? Is there any gmx tool?
> I tried '-select' statements but am not able to hit upon the right
> combination.

You can use gmx trjorder to reorder the molecules in the trajectory 
based on their proximity to some selected group. Then just write out the 
first instance of that molecule from the trajectory using an index group 
(the closest molecule will always be the first one of its type so the 
index group is constant, even if it is selecting a different molecule).

-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