diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index a9068f151b..fbee19b1b5 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -548,7 +548,7 @@ int DumpCustom::count() dchoose[i] = (image[i] >> 10 & 1023) - 512; ptr = dchoose; nstride = 1; - } else if (thresh_array[ithresh] == IX) { + } else if (thresh_array[ithresh] == IZ) { int *image = atom->image; for (i = 0; i < nlocal; i++) dchoose[i] = (image[i] >> 20) - 512; diff --git a/src/min_cg.cpp b/src/min_cg.cpp index e0893692c5..add6e7fc43 100644 --- a/src/min_cg.cpp +++ b/src/min_cg.cpp @@ -169,7 +169,6 @@ void MinCG::run() // normalize energy if thermo PE does setup(); - setup_vectors(); // setup any extra dof due to fixes // can't be done until now b/c update init() comes before modify init() @@ -807,7 +806,7 @@ int MinCG::linemin_quadratic(int n, double *x, double *dir, } // check if ready for quadratic projection, equivalent to secant method - // alpha0 = projected alpha, perform step, exit with success + // alpha0 = projected alpha relerr = fabs(1.0+(0.5*alpha*(alpha-alphaprev)*(fh+fhprev)-eng)/engprev); alpha0 = alpha - (alpha-alphaprev)*fh/delfh; @@ -825,11 +824,9 @@ int MinCG::linemin_quadratic(int n, double *x, double *dir, de_ideal = -BACKTRACK_SLOPE*alpha0*fdotdirall; de = eng - eoriginal; - if (de <= de_ideal || de_ideal >= -IDEAL_TOL) { - return 0; - } + if (de <= de_ideal || de_ideal >= -IDEAL_TOL) return 0; - // Drop back from alpha0 to alpha + // drop back from alpha0 to alpha if (nextra) modify->min_step(0.0,hextra); for (i = 0; i < n; i++) x[i] = x0[i]; diff --git a/src/run.cpp b/src/run.cpp index 7eb539a971..9b8d49a2ab 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -110,7 +110,7 @@ void Run::command(int narg, char **arg) // adjust nsteps if upto was specified - if (uptoflag) nsteps = nsteps - update->ntimestep; + if (uptoflag) nsteps -= update->ntimestep; // error check diff --git a/src/temper.cpp b/src/temper.cpp index 47b5db9817..c1a9a4cb43 100644 --- a/src/temper.cpp +++ b/src/temper.cpp @@ -273,7 +273,7 @@ void Temper::command(int narg, char **arg) if (swap) { new_temp = set_temp[partner_set_temp]; modify->fix[whichfix]->reset_target(new_temp); - } + } // update my_set_temp and temp2world on every proc // root procs update their value if swap took place