<div dir="ltr"><div><div><div><div><div><div>Even when I choose<br><br></div>cutoff-scheme=Verlet<br></div>cutoff-buffer-drift=-1<br></div>rlist=1.5<br><br></div>some pairs are still missing.<br><br></div>I do print them out from different node and use MPI_Reduce to combine them together. That is where I found out it is not a problem if all pairs sit at one node, while it shows up when pairs starts to be distributed into two nodes.<br><br></div>To be clear, I put this code at the end of <b>do_force</b> function, after the <b>post_process_forces</b> function. I think the coordinates have been communicated up to this point, am I correct?<br><br>   if (bDoForces)<br>   {<br>      post_process_forces(fplog, cr, step, nrnb, wcycle,<br>        top, box, x, f, vir_force, mdatoms, graph, fr, vsite,<br>        flags);<br>   }<br>   if(bNS)<br>   {<br>      if (DOMAINDECOMP(cr))<br>      {<br>     int my_rank;<br>     int npes;<br>     int globalQC;<br>     int localQC;<br>     MPI_Comm_size(MPI_COMM_WORLD, &amp;npes);<br>     MPI_Comm_rank(MPI_COMM_WORLD, &amp;my_rank);<br>     if (my_rank == 0)<br>     {<br>        globalQC = 0;<br>     }<br>     // Barrier for the initialization;<br>     MPI_Barrier(MPI_COMM_WORLD); <br><br>     localQC = calQ_dd( x, f, step, cr, inputrec, box );<br><br>     // Barrier for Qcontacts accumulation;<br>     MPI_Barrier(MPI_COMM_WORLD);<br>     MPI_Reduce(&amp;localQC, &amp;globalQC, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);<br><br><div><div><div>...<br><br></div><div>Then I print out globalQC, it shows some pairs are missing.<br></div><div><br></div><div>The code for calQdd is same as before (struct data is known statically):<br></div><div><div><div><br>int calQdd ( rvec x[], rvec f[], int step, t_commrec *cr, t_inputrec *ir, matrix box )<br>{<br>   int Npairs = 0;<br>   int i, ai, aj;<br>   /* for domain decomposition ---------------*/<br>   int localai, localaj;<br>   int localcell;<br>   /* for domain decomposition ---------------*/<br>   real r_N, r_N2, dr, dr2 ;<br>   rvec dx ;<br>   /* Set the pbc ----------------------------*/<br>   t_pbc pbc;<br>   set_pbc(&amp;pbc, ir-&gt;ePBC, box);<br><br>   FILE *fp;<br>   fp = fopen(&quot;pairs.dat&quot;,&quot;a&quot;);<br>   if(fp == NULL){ <br>      fprintf(stderr, &quot;Can&#39;t open input file !\n&quot;);<br>      exit(1);<br>   }<br><br>   if ( NP &gt; 0 ) <br>   {<br>      for (i=0; i&lt;NP; ++i)<br>      {<br>     ai = data.first[i] ;<br><br>     if (ga2la_get_home(cr-&gt;dd-&gt;ga2la, ai, &amp;localai))<br>     {<br>        aj = data.second[i] ;<br><br>        if (ga2la_get(cr-&gt;dd-&gt;ga2la, aj, &amp;localaj, &amp;localcell))<br>        {<br><br>           fprintf(fp, &quot;%d\t%d\n&quot;, ai, aj);<br><br>           r_N = data.r_native[i] ;<br>           r_N2 = r_N * r_N;<br>           pbc_dx(&amp;pbc, x[localai], x[localaj], dx) ;<br>           dr2 = iprod( dx, dx ) ;<br>           if (dr2 &lt; r_N2)<br>           {<br></div><div>           Npairs += 1;<br></div><div>           }<br>        }<br>     }<br>      }<br>   }<br>   fclose(fp);<br>   return Npairs;<br>} <br><br><div><div><div><div><div class="gmail_extra">As you can see, here I also print out the pairs recognized. Though I increase rlist=1.5 still some pairs are missing (though their mutual distance is less than 6 angstroms).<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra">Xingcheng<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Sat, Aug 29, 2015 at 5:00 AM,  <span dir="ltr">&lt;<a href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se" target="_blank">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send gromacs.org_gmx-developers mailing list submissions to<br>
        <a href="mailto:gromacs.org_gmx-developers@maillist.sys.kth.se">gromacs.org_gmx-developers@maillist.sys.kth.se</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
<br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:gromacs.org_gmx-developers-owner@maillist.sys.kth.se">gromacs.org_gmx-developers-owner@maillist.sys.kth.se</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of gromacs.org_gmx-developers digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Increase the scope of dd domains (Berk Hess)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 28 Aug 2015 20:35:50 +0200<br>
From: Berk Hess &lt;<a href="mailto:hess@kth.se">hess@kth.se</a>&gt;<br>
To: <a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>
Subject: Re: [gmx-developers] Increase the scope of dd domains<br>
Message-ID: &lt;<a href="mailto:55E0AA06.8020404@kth.se">55E0AA06.8020404@kth.se</a>&gt;<br>
Content-Type: text/plain; charset=&quot;windows-1252&quot;; Format=&quot;flowed&quot;<br>
<br>
Hi,<br>
<br>
If rlist=1, you should have access to all pairs up to 1 nm.<br>
<br>
One more question:<br>
You do check/print the pairs on all ranks, not only on the master rank?<br>
<br>
Cheers,<br>
<br>
Berk<br>
<br>
On 08/28/2015 08:15 PM, Xingcheng Lin wrote:<br>
&gt; Hi Berk,<br>
&gt;<br>
&gt; Yes, I think I was calling that after the coordinate communication.<br>
&gt; The place where I code it in is after the command:<br>
&gt;<br>
&gt;    if (bDoForces)<br>
&gt;    {<br>
&gt;       post_process_forces(fplog, cr, step, nrnb, wcycle,<br>
&gt;         top, box, x, f, vir_force, mdatoms, graph, fr, vsite,<br>
&gt;         flags);<br>
&gt;    }<br>
&gt;<br>
&gt; After that I use a<br>
&gt; if(bNS){<br>
&gt;       if (DOMAINDECOMP(cr)){<br>
&gt;<br>
&gt; to make sure it is done every neighboring list step.<br>
&gt;<br>
&gt; Is this correct? BTW, I was coding that in gromacs4.6.3 version (this<br>
&gt; is for historical reason because I have coded other unrelated things<br>
&gt; in other files).<br>
&gt;<br>
&gt; I have checked that the ga2la_get_home in the first loop find all ai<br>
&gt; atoms, but the second loop ga2la_get missed some aj atoms. One of the<br>
&gt; reasons I guess is because the missing atom pairs are too far apart<br>
&gt; (but less than 6 angstroms) in Cartesian space from each other, so<br>
&gt; that even by including all cells of the home node it still could not<br>
&gt; find it. That could be a problem, but I don&#39;t know exactly how -dd<br>
&gt; find this pair partner in its neighboring cells.<br>
&gt;<br>
&gt; Thank you,<br>
&gt; Xingcheng<br>
&gt;<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20150828/0da41613/attachment-0001.html" rel="noreferrer" target="_blank">http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20150828/0da41613/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<span class=""><font color="#888888"><br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
<br>
End of gromacs.org_gmx-developers Digest, Vol 136, Issue 25<br>
***********************************************************<br>
</font></span></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div>