diff --git a/src/MC/fix_charge_regulation.cpp b/src/MC/fix_charge_regulation.cpp index cd035781c8..ddf14f6804 100644 --- a/src/MC/fix_charge_regulation.cpp +++ b/src/MC/fix_charge_regulation.cpp @@ -218,7 +218,7 @@ void FixChargeRegulation::init() { int flagall = flag; MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world); - if (flagall && comm->me == 0) + if (flagall) error->all(FLERR, "fix charge/regulation cannot exchange " "individual atoms (ions) belonging to a molecule"); } diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index e0f1cd243b..8fb778207b 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -564,7 +564,7 @@ void FixGCMC::init() if (molecule[i]) flag = 1; int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall && comm->me == 0) + if (flagall) error->all(FLERR, "Fix gcmc cannot exchange individual atoms belonging to a molecule"); } @@ -579,7 +579,7 @@ void FixGCMC::init() if (molecule[i] == 0) flag = 1; int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall && comm->me == 0) + if (flagall) error->all(FLERR, "All mol IDs should be set for fix gcmc group atoms"); } diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index 2c76050430..c72beb5051 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -356,7 +356,7 @@ void FixWidom::init() if (molecule[i] == 0) flag = 1; int flagall; MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall && comm->me == 0) + if (flagall) error->all(FLERR, "All mol IDs should be set for fix widom group atoms"); }