From 6690077acd1b37b12e1313dddcf17ca739a4b339 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 3 Dec 2007 15:49:30 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1208 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_spring.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index bdefcaa938..a38c64ff86 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -63,6 +63,8 @@ FixSpring::FixSpring(LAMMPS *lmp, int narg, char **arg) : igroup2 = group->find(arg[4]); if (igroup2 == -1) error->all("Could not find fix spring couple group ID"); + if (igroup2 == igroup) + error->all("Two groups cannot be the same in fix spring couple"); group2bit = group->bitmask[igroup2]; k_spring = atof(arg[5]); xflag = yflag = zflag = 1;