git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3274 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2009-10-30 22:49:22 +00:00
parent 4e317f1180
commit 8951075a0b
2 changed files with 8 additions and 6 deletions

View File

@ -44,8 +44,8 @@ class NeighList : protected Pointers {
// atom types to skip when building list // atom types to skip when building list
// iskip,ijskip are just ptrs to corresponding request // iskip,ijskip are just ptrs to corresponding request
int *iskip; // iskip[i] if atoms of type I are not in list int *iskip; // iskip[i] = 1 if atoms of type I are not in list
int **ijskip; // ijskip[i][j] if pairs of type I,J are not in list int **ijskip; // ijskip[i][j] =1 if pairs of type I,J are not in list
// settings and pointers for related neighbor lists and fixes // settings and pointers for related neighbor lists and fixes

View File

@ -364,7 +364,7 @@ void PairHybrid::init_style()
for (i = 0; i < neighbor->nrequest; i++) { for (i = 0; i < neighbor->nrequest; i++) {
if (!neighbor->requests[i]->pair) continue; if (!neighbor->requests[i]->pair) continue;
// find associated sub-style // istyle = associated sub-style
for (istyle = 0; istyle < nstyles; istyle++) for (istyle = 0; istyle < nstyles; istyle++)
if (styles[istyle] == neighbor->requests[i]->requestor) break; if (styles[istyle] == neighbor->requests[i]->requestor) break;
@ -373,7 +373,8 @@ void PairHybrid::init_style()
// initialize so as to skip all pair types // initialize so as to skip all pair types
// set ijskip = 0 if type pair matches any entry in sub-style map // set ijskip = 0 if type pair matches any entry in sub-style map
// set ijskip = 0 if mixing will assign type pair to this sub-style // set ijskip = 0 if mixing will assign type pair to this sub-style
// will occur if both I,I and J,J are assigned to single sub-style // will occur if type pair is currently unassigned
// and both I,I and J,J are assigned to single sub-style
// and sub-style for both I,I and J,J match istyle // and sub-style for both I,I and J,J match istyle
// set iskip = 1 only if all ijskip for itype are 1 // set iskip = 1 only if all ijskip for itype are 1
@ -390,7 +391,8 @@ void PairHybrid::init_style()
for (m = 0; m < nmap[itype][jtype]; m++) for (m = 0; m < nmap[itype][jtype]; m++)
if (map[itype][jtype][m] == istyle) if (map[itype][jtype][m] == istyle)
ijskip[itype][jtype] = ijskip[jtype][itype] = 0; ijskip[itype][jtype] = ijskip[jtype][itype] = 0;
if (nmap[itype][itype] == 1 && map[itype][itype][0] == istyle && if (nmap[itype][jtype] == 0 &&
nmap[itype][itype] == 1 && map[itype][itype][0] == istyle &&
nmap[jtype][jtype] == 1 && map[jtype][jtype][0] == istyle) nmap[jtype][jtype] == 1 && map[jtype][jtype][0] == istyle)
ijskip[itype][jtype] = ijskip[jtype][itype] = 0; ijskip[itype][jtype] = ijskip[jtype][itype] = 0;
} }
@ -433,7 +435,7 @@ double PairHybrid::init_one(int i, int j)
{ {
// if I,J is not set explicitly: // if I,J is not set explicitly:
// perform mixing only if I,I sub-style = J,J sub-style // perform mixing only if I,I sub-style = J,J sub-style
// also require I,I and J,J both are assigned to single sub-style // also require I,I and J,J are both assigned to single sub-style
if (setflag[i][j] == 0) { if (setflag[i][j] == 0) {
if (nmap[i][i] != 1 || nmap[j][j] != 1 || map[i][i][0] != map[j][j][0]) if (nmap[i][i] != 1 || nmap[j][j] != 1 || map[i][i][0] != map[j][j][0])