From 10d3073e6e9f7431dd2aeb9006ddd01581b4b712 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 15 Dec 2010 17:18:35 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5401 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/replicate.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/replicate.cpp b/src/replicate.cpp index d3494e5b53..5b6951ab56 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -125,12 +125,16 @@ void Replicate::command(int narg, char **arg) atom->create_avec(old->atom_style,nstyles,keywords); // check that new problem size will not be too large - // if N > 2^31, turn off tags + // if N > 2^31, turn off tags for existing and new atoms // if molecular, N/Nbonds/etc cannot be > 2^31 else tags/counts invalid double rep = nrep; if (rep*old->natoms > MAXATOMS) atom->tag_enable = 0; + if (atom->tag_enable == 0) + for (int i = 0; i < atom->nlocal; i++) + atom->tag[i] = 0; + if (atom->molecular) { if (rep*old->natoms > MAXATOMS || rep*old->nbonds > MAXATOMS || rep*old->nangles > MAXATOMS || rep*old->ndihedrals > MAXATOMS ||