git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4575 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -66,8 +66,12 @@ ComputeGroupGroup::~ComputeGroupGroup()
|
||||
void ComputeGroupGroup::init()
|
||||
{
|
||||
if (force->pair == NULL)
|
||||
error->all("Pair style does not support compute group/group");
|
||||
if (force->pair->single_enable == 0)
|
||||
error->all("No pair style defined for compute group/group");
|
||||
|
||||
// if non-hybrid, then error if single_enable = 0
|
||||
// if hybrid, let hybrid determine if sub-style sets single_enable = 0
|
||||
|
||||
if (force->pair_match("hybrid",0) == NULL && force->pair->single_enable == 0)
|
||||
error->all("Pair style does not support compute group/group");
|
||||
|
||||
pair = force->pair;
|
||||
|
||||
@ -576,6 +576,7 @@ void PairHybrid::read_restart(FILE *fp)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
call sub-style to compute single interaction
|
||||
error if sub-style does not support single() call
|
||||
since overlay could have multiple sub-styles, sum results explicitly
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -592,6 +593,8 @@ double PairHybrid::single(int i, int j, int itype, int jtype,
|
||||
|
||||
for (int m = 0; m < nmap[itype][jtype]; m++) {
|
||||
if (rsq < styles[map[itype][jtype][m]]->cutsq[itype][jtype]) {
|
||||
if (styles[map[itype][jtype][m]]->single_enable == 0)
|
||||
error->all("Pair hybrid sub-style does not support single call");
|
||||
esum += styles[map[itype][jtype][m]]->
|
||||
single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fone);
|
||||
fforce += fone;
|
||||
|
||||
Reference in New Issue
Block a user