<br><br><div class="gmail_quote">On Tue, Mar 26, 2013 at 3:03 PM, Yorquant Wang <span dir="ltr"><<a href="mailto:wangykoo@gmail.com" target="_blank">wangykoo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all:<div> 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.</div><hr style="line-height:18px;color:rgb(79,107,114);font-size:12px;font-family:arial,verdana,helvetica">
<p style="line-height:18px;color:rgb(79,107,114);font-size:12px;font-family:arial,verdana,helvetica;margin:0.5em 0px;padding:0px"><code style="font-family:'Lucida Console',Courier,monospace;font-size:14px;color:rgb(0,52,113)"></code></p>
<pre style="margin-top:0.5em;margin-bottom:0.5em;margin-left:1em;padding:0px 0px 0px 1em;border-left-width:4px;border-left-style:solid;border-left-color:rgb(170,170,170);background-color:rgb(254,254,254);overflow:visible;line-height:18px">
<span style="font-size:12px;color:rgb(119,119,119)">int cell_id=<a title="Developer_Zone/Programming_Guide/Data_Structures#t_commrec" style="color:rgb(51,102,204);text-decoration:none">cr</a>-><a title="Developer_Zone/Programming_Guide/Data_Structures#gmx_domdec_t" style="color:rgb(51,102,204);text-decoration:none">dd</a>-><a title="Developer_Zone/Programming_Guide/Data_Structures#gmx_ga2la_t" style="color:rgb(51,102,204);text-decoration:none">ga2la</a>[global_index].cell;
int local_index=<a title="Developer_Zone/Programming_Guide/Data_Structures#t_commrec" style="color:rgb(51,102,204);text-decoration:none">cr</a>-><a title="Developer_Zone/Programming_Guide/Data Structures#gmx_domdec_t" style="color:rgb(51,102,204);text-decoration:none">dd</a>-><a title="Developer_Zone/Programming_Guide/Data_Structures#gmx_ga2la_t" style="color:rgb(51,102,204);text-decoration:none">ga2la</a>[global_index].a;
if(0==cell_id)
{
rvec* atom_position=&<a title="Developer_Zone/Programming_Guide/Data_Structures#t_state" style="color:rgb(51,102,204);text-decoration:none">local_state</a>-><a title="Developer_Zone/Programming_Guide/Data_Structures#X" style="color:rgb(51,102,204);text-decoration:none">x</a>[local_index];
}
else
{
<em>// atom is NOT on this node</em>
// if atom is on a neighbor node then its position can be acquired using </span><font color="#ff0000" size="4">special communication </font></pre><div><span style="background-color:rgb(254,254,254);color:rgb(119,119,119);font-size:12px;line-height:18px">}</span></div>
<div><span style="background-color:rgb(254,254,254);color:rgb(119,119,119);font-size:12px;line-height:18px"><br></span></div><div><hr style="line-height:18px;color:rgb(79,107,114);font-size:12px;font-family:arial,verdana,helvetica">
<br></div><div><span style="background-color:rgb(254,254,254);color:rgb(119,119,119);font-size:12px;line-height:18px"><br></span></div><div> What's the special communication? Could you give me a help to tell me which function in GMX can do this <span style="background-color:rgb(254,254,254);line-height:18px"><font color="#ff0000">special communication</font></span><span style="color:rgb(255,0,0);font-size:large;background-color:rgb(254,254,254);line-height:18px"> </span>?</div>
</blockquote><div><br></div><div>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?</div>
<div><br></div><div>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.</div><div><br></div><div>Mark</div></div>