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

Yorquant Wang wangykoo at gmail.com
Tue Mar 26 15:03:40 CET 2013


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 <mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#t_commrec>->dd
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#gmx_domdec_t>->ga2la
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#gmx_ga2la_t>[global_index].cell;
int local_index=cr
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#t_commrec>->dd
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#gmx_domdec_t>->ga2la
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#gmx_ga2la_t>[global_index].a;
if(0==cell_id)
{
 rvec* atom_position=&local_state
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#t_state>->x
<mks://localhost/Developer_Zone/Programming_Guide/Data_Structures#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 ?

 Thank you very much!

Best wishes

-- 
Yukun Wang
PhD candidate
Institute of Natural Sciences && College of Life Science, Shanghai Jiao
Tong University
Cell phone: 13621806236.
China Shanghai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130326/6302d9d9/attachment.html>


More information about the gromacs.org_gmx-developers mailing list