[gmx-developers] Locating particles across nodes under domain decomposition
Carsten Kutzner
ckutzne at gwdg.de
Wed May 14 09:56:58 CEST 2014
Hi,
On 13 May 2014, at 23:55, Sergiu Picioreanu <sergiu.picioreanu at gmail.com> wrote:
> Hi there,
>
> I've been working on writing a small package for Gromacs 4.6.5 (and later for the 5.0 version) and I had a quick question. There will be circumstances when I will need information on one node about a particle which may be on a separate node, and I'm just trying to figure out the best way for me to find the location of my desired particle. For example, if particle A on node 1 needed information about particle B, which could either be on node 2 or 3, is there a method already in place for finding out which node particle B resides on? Is there any variable already in Gromacs that keeps track of which node each particle is on at a given time step when domain decomposition is active or will I have to create a method for keeping track of this information myself?
Take a look at the routines in gmx_ga2la.h. The function ga2la_get_home()
returns whether an atom with global index i is local on a given node.
Depending on what you want to achieve, the functions in groupcoord.c might also
be helpful. The routine communicate_group_positions() assembles the
positions of a group of atoms into an array which is identical on all
nodes. This is useful (and fast) if the group of atoms you need
is a small fraction of the whole MD system.
The functions that call communicate_group_positions() give you a hint
on how to use it.
Best,
Carsten
>
> Cheers,
>
> Sergiu
> --
> Gromacs Developers mailing list
>
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_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-developers or send a mail to gmx-developers-request at gromacs.org.
--
Dr. Carsten Kutzner
Max Planck Institute for Biophysical Chemistry
Theoretical and Computational Biophysics
Am Fassberg 11, 37077 Goettingen, Germany
Tel. +49-551-2012313, Fax: +49-551-2012302
http://www.mpibpc.mpg.de/grubmueller/kutzner
http://www.mpibpc.mpg.de/grubmueller/sppexa
More information about the gromacs.org_gmx-developers
mailing list