[gmx-users] gmx distance

Mateusz Bieniek bieniekmat at gmail.com
Mon Jul 23 17:36:33 CEST 2018


Hi Andrew,

I cannot answer your question about gmx distance but I have been using the
MDAnalysis package for this kind of analysis. I am writing this in case you
are proficient in python and need more flexibility. The code more or less
would look like this:

u=MDAnalysis.Universe(gro, xtc)
g1 = u.select_atoms('...')
g2 = u.select_atoms('...')

for ts in u.trajectory:
   print (g1.center_of_mass(), g2.center_of_mass())

Best, Mat


On Mon, Jul 23, 2018 at 4:04 PM Andrew Bostick <andrew.bostick1 at gmail.com>
wrote:

> Hi,
>
> I want to calculate distance between com of 2 groups (3 and 8)
>
> gmx_mpi distance -f md.xtc -s md.tpr -n index.ndx -oav dist.xvg
>
> After that:
>
> Available static index groups:
>  Group  0 "System" (27599 atoms)
>  Group  1 "Other" (716 atoms)
>  Group  2 "MMM" (704 atoms)
>  Group  3 "LIG" (12 atoms)
>  Group  4 "Water" (26883 atoms)
>  Group  5 "SOL" (26883 atoms)
>  Group  6 "non-Water" (716 atoms)
>  Group  7 "MMM_LIG" (716 atoms)
>  Group  8 "MMM_com" (44 atoms)
> Specify any number of selections for option 'select'
> (Position pairs to calculate distances for):
> (one per line, <enter> for status/groups, 'help' for help, Ctrl-D to end)
> > ^C
>
> How to use option -select?
>
> Please guide me to use -select.
>
> Thanks
> AB
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list