Skip to content
Snippets Groups Projects
Commit d89667d7 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4575 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 6c9cbfab
No related branches found
No related tags found
No related merge requests found
...@@ -66,8 +66,12 @@ ComputeGroupGroup::~ComputeGroupGroup() ...@@ -66,8 +66,12 @@ ComputeGroupGroup::~ComputeGroupGroup()
void ComputeGroupGroup::init() void ComputeGroupGroup::init()
{ {
if (force->pair == NULL) if (force->pair == NULL)
error->all("Pair style does not support compute group/group"); error->all("No pair style defined for compute group/group");
if (force->pair->single_enable == 0)
// 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"); error->all("Pair style does not support compute group/group");
pair = force->pair; pair = force->pair;
......
...@@ -576,6 +576,7 @@ void PairHybrid::read_restart(FILE *fp) ...@@ -576,6 +576,7 @@ void PairHybrid::read_restart(FILE *fp)
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
call sub-style to compute single interaction 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 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, ...@@ -592,6 +593,8 @@ double PairHybrid::single(int i, int j, int itype, int jtype,
for (int m = 0; m < nmap[itype][jtype]; m++) { for (int m = 0; m < nmap[itype][jtype]; m++) {
if (rsq < styles[map[itype][jtype][m]]->cutsq[itype][jtype]) { 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]]-> esum += styles[map[itype][jtype][m]]->
single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fone); single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fone);
fforce += fone; fforce += fone;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment