[gmx-developers] How to get the globle atoms coordinates in local node?

Mark Abraham mark.j.abraham at gmail.com
Tue Mar 26 16:03:36 CET 2013


On Tue, Mar 26, 2013 at 3:03 PM, Yorquant Wang <wangykoo at gmail.com> wrote:

> Hi all:
>     I want to implement a simple function into GMX4.5. I need to get the
> atoms' coordinates which is not on this nodes, but I know those atoms
> globle index. Just like the below situation.
> ------------------------------
>
> int cell_id=cr->dd->ga2la[global_index].cell;
> int local_index=cr->dd->ga2la[global_index].a;
> if(0==cell_id)
> {
>  rvec* atom_position=&local_state->x[local_index];
> }
> else
> {
>  *// atom is NOT on this node*
>  // if atom is on a neighbor node then its position can be acquired using special communication
>
> }
>
> ------------------------------
>
>
>   What's the special communication? Could you give me a help to tell me
> which function in GMX  can do this special communication ?
>

It lives in src/mdlib/domdec_con.c and uses the string "specat" in its
names. It's intended for managing information to support things like
constraints and virtual sites across DD boundaries, and not as a general
query mechanism. What is that code fragment you gave?

If you're able to give some more information about what you're trying to
achieve, we might be able to suggest a better solution.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130326/b9c83285/attachment.html>


More information about the gromacs.org_gmx-developers mailing list