From 7ce701da422cff81e512b7283f06c37157369dd5 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 27 May 2011 23:35:15 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6235 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/REPLICA/neb.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 91be0ea405..15d93dba59 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -42,7 +42,7 @@ using namespace LAMMPS_NS; NEB::NEB(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- - internal NEB constructor + internal NEB constructor, called from TAD ------------------------------------------------------------------------- */ NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, @@ -128,6 +128,16 @@ void NEB::command(int narg, char **arg) uworld = universe->uworld; MPI_Comm_rank(world,&me); + // error checks + + if (nreplica == 1) error->all("Cannot use NEB with a single replica"); + if (nreplica != universe->nprocs) + error->all("Can only use NEB with 1-processor replicas"); + if (atom->sortfreq > 0) + error->all("Cannot use NEB with atom_modify sort enabled"); + if (atom->map_style == 0) + error->all("Cannot use NEB unless atom map exists"); + // read in file of final state atom coords and reset my coords readfile(infile); @@ -150,16 +160,6 @@ void NEB::run() else color = 1; MPI_Comm_split(uworld,color,0,&roots); - // error checks - - if (nreplica == 1) error->all("Cannot use NEB with a single replica"); - if (nreplica != universe->nprocs) - error->all("Can only use NEB with 1-processor replicas"); - if (atom->sortfreq > 0) - error->all("Cannot use NEB with atom_modify sort enabled"); - if (atom->map_style == 0) - error->all("Cannot use NEB unless atom map exists"); - int ineb,idamp; for (ineb = 0; ineb < modify->nfix; ineb++) if (strcmp(modify->fix[ineb]->style,"neb") == 0) break;