From bf03a003f88264f80964fcbf5122f96d117f1f83 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 8 Apr 2014 17:35:05 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11738 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MC/fix_bond_create.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index 7705601758..cf76b9b0e5 100755 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -446,10 +446,12 @@ void FixBondCreate::post_integrate() // increment bondcount, convert atom to new type if limit reached bondcount[i]++; - if (type[i] == iatomtype) + int oldtype = type[i]; + if (type[i] == iatomtype) { if (bondcount[i] == imaxbond) type[i] = inewtype; - else + } else { if (bondcount[i] == jmaxbond) type[i] = jnewtype; + } // count the created bond once