[gmx-developers] Increase the scope of dd domains

Xingcheng Lin linxingcheng50311 at gmail.com
Fri Aug 28 06:36:12 CEST 2015


Hi,

I am trying to encode a "on the fly" calculation for the number of atom
pairs within some distance (for example here, 6 angstroms).

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:

// NP is number of tested pairs recorded in an array;
// If atom ai is one of the home atoms in a node, we start testing if aj is
available by the same node;
// rlist = 1.0nm, Coulombtype  =  Cut-off, cutoff-scheme = Verlet, ns_type
= grid, pbc = xyz;

int Npairs = 0;
for (i=0; i<NP; ++i)
{
     int ai = datai[i] ;
     int localai;
     // Examine if ai it is within the home atoms index;
     if (ga2la_get_home(cr->dd->ga2la, ai, &localai))
     {
        aj = dataj[i] ;
        // Examine if aj is available by local node;;
        if (ga2la_get(cr->dd->ga2la, aj, &localaj, &localcell))
        {
           FILE *fp;
           fp = fopen("pairs.dat","a");

           fprintf(fp, "%d\t%d\n", ai, aj);
           fclose(fp);

           r_N = 0.6 ;
           pbc_dx(&pbc, x[localai], x[localaj], dx) ;
           dr2 = iprod( dx, dx ) ;
           dr  = sqrt( dr2 ) ;
           if (dr < r_N)
           {
               Npairs += 1;
           }
        }
     }
 }

The results show some atom pairs, while atoms less than 6 angstroms apart,
are missing here. I increase rlist, but it doesn't help. Is there any way
to increase the scope of atoms available in each domain so that the missing
atoms can be detected?

Or are there any mistakes out of my notice in this code?

Thank you,
Xingcheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20150828/208ffc05/attachment.html>


More information about the gromacs.org_gmx-developers mailing list