<div dir="ltr"><div><div><div>Hi,<br><br></div>I am trying to encode a &quot;on the fly&quot; calculation for the number of atom pairs within some distance (for example here, 6 angstroms).<br><br></div>The problem happens when doing parallel domain decomposition. Specifically, when two particles reside in different domains, gromacs is not able to recognize this pair. I am trying to use ga2la_get_home and ga2la_get for calculation, here is the code: <br><br>// NP is number of tested pairs recorded in an array;<br></div><div>// If atom ai is one of the home atoms in a node, we start testing if aj is available by the same node;<br></div><div>// rlist = 1.0nm, Coulombtype  =  Cut-off, cutoff-scheme = Verlet, ns_type  = grid, pbc = xyz;<br></div><div><br>int Npairs = 0;<br>for (i=0; i&lt;NP; ++i)<br>{<br>     int ai = datai[i] ;<br></div><div>     int localai;<br></div><div>     // Examine if ai it is within the home atoms index;<br>     if (ga2la_get_home(cr-&gt;dd-&gt;ga2la, ai, &amp;localai))<br>     {<br>        aj = dataj[i] ;<br>        // Examine if aj is available by local node;;<br>        if (ga2la_get(cr-&gt;dd-&gt;ga2la, aj, &amp;localaj, &amp;localcell))<br>        {         <br>           FILE *fp;<br>           fp = fopen(&quot;pairs.dat&quot;,&quot;a&quot;);<br><br>           fprintf(fp, &quot;%d\t%d\n&quot;, ai, aj);<br>           fclose(fp);<br><br>           r_N = 0.6 ;<br>           pbc_dx(&amp;pbc, x[localai], x[localaj], dx) ;<br>           dr2 = iprod( dx, dx ) ;<br>           dr  = sqrt( dr2 ) ;<br>           if (dr &lt; r_N)<br>           {<br>               Npairs += 1;<br>           }<br>        }<br>     }<br> }<br><br></div><div>The results show some atom pairs, while atoms less than 6 angstroms apart, are missing here. I increase rlist, but it doesn&#39;t help. Is there any way to increase the scope of atoms available in each domain so that the missing atoms can be detected?<br><br></div><div>Or are there any mistakes out of my notice in this code?<br><br></div><div>Thank you,<br></div><div>Xingcheng<br><br></div><div><br></div></div>