<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, &npes);<br> MPI_Comm_rank(MPI_COMM_WORLD, &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(&localQC, &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(&pbc, ir->ePBC, box);<br><br> FILE *fp;<br> fp = fopen("pairs.dat","a");<br> if(fp == NULL){ <br> fprintf(stderr, "Can't open input file !\n");<br> exit(1);<br> }<br><br> if ( NP > 0 ) <br> {<br> for (i=0; i<NP; ++i)<br> {<br> ai = data.first[i] ;<br><br> if (ga2la_get_home(cr->dd->ga2la, ai, &localai))<br> {<br> aj = data.second[i] ;<br><br> if (ga2la_get(cr->dd->ga2la, aj, &localaj, &localcell))<br> {<br><br> fprintf(fp, "%d\t%d\n", ai, aj);<br><br> r_N = data.r_native[i] ;<br> r_N2 = r_N * r_N;<br> pbc_dx(&pbc, x[localai], x[localaj], dx) ;<br> dr2 = iprod( dx, dx ) ;<br> if (dr2 < 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"><<a href="mailto:gromacs.org_gmx-developers-request@maillist.sys.kth.se" target="_blank">gromacs.org_gmx-developers-request@maillist.sys.kth.se</a>></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 'help' 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 "Re: Contents of gromacs.org_gmx-developers digest..."<br>
<br>
<br>
Today'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 <<a href="mailto:hess@kth.se">hess@kth.se</a>><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: <<a href="mailto:55E0AA06.8020404@kth.se">55E0AA06.8020404@kth.se</a>><br>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"<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>
> Hi Berk,<br>
><br>
> Yes, I think I was calling that after the coordinate communication.<br>
> The place where I code it in is after the command:<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>
><br>
> After that I use a<br>
> if(bNS){<br>
> if (DOMAINDECOMP(cr)){<br>
><br>
> to make sure it is done every neighboring list step.<br>
><br>
> Is this correct? BTW, I was coding that in gromacs4.6.3 version (this<br>
> is for historical reason because I have coded other unrelated things<br>
> in other files).<br>
><br>
> I have checked that the ga2la_get_home in the first loop find all ai<br>
> atoms, but the second loop ga2la_get missed some aj atoms. One of the<br>
> reasons I guess is because the missing atom pairs are too far apart<br>
> (but less than 6 angstroms) in Cartesian space from each other, so<br>
> that even by including all cells of the home node it still could not<br>
> find it. That could be a problem, but I don't know exactly how -dd<br>
> find this pair partner in its neighboring cells.<br>
><br>
> Thank you,<br>
> Xingcheng<br>
><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><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'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>