From 3c613c4cf4db6e4129c23322a0cf3376e668fbc4 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 29 Feb 2012 16:03:23 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7865 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/pair_lj_cut_coul_long.cpp | 1 + src/min_linesearch.cpp | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 4f78f99f46..927b00340f 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -51,6 +51,7 @@ PairLJCutCoulLong::PairLJCutCoulLong(LAMMPS *lmp) : Pair(lmp) { respa_enable = 1; ftable = NULL; + qdist = 0.0; } /* ---------------------------------------------------------------------- */ diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index 668c0ad662..73d9ef83f0 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -245,7 +245,7 @@ int MinLineSearch::linemin_backtrack(double eoriginal, double &alpha) } if (nextra_global) modify->min_store(); - // Important diagnostic: test the gradient against energy + // important diagnostic: test the gradient against energy // double etmp; // double alphatmp = alphamax*1.0e-4; // etmp = alpha_step(alphatmp,1); @@ -846,13 +846,13 @@ double MinLineSearch::alpha_step(double alpha, int resetflag) if (nextra_global) modify->min_step(0.0,hextra); for (i = 0; i < nvec; i++) xvec[i] = x0[i]; if (nextra_atom) - for (m = 0; m < nextra_atom; m++) { - xatom = xextra_atom[m]; - x0atom = x0extra_atom[m]; - n = extra_nlen[m]; - for (i = 0; i < n; i++) xatom[i] = x0atom[i]; - requestor[m]->min_x_set(m); - } + for (m = 0; m < nextra_atom; m++) { + xatom = xextra_atom[m]; + x0atom = x0extra_atom[m]; + n = extra_nlen[m]; + for (i = 0; i < n; i++) xatom[i] = x0atom[i]; + requestor[m]->min_x_set(m); + } // step forward along h @@ -861,11 +861,11 @@ double MinLineSearch::alpha_step(double alpha, int resetflag) for (i = 0; i < nvec; i++) xvec[i] += alpha*h[i]; if (nextra_atom) for (m = 0; m < nextra_atom; m++) { - xatom = xextra_atom[m]; - hatom = hextra_atom[m]; - n = extra_nlen[m]; - for (i = 0; i < n; i++) xatom[i] += alpha*hatom[i]; - requestor[m]->min_x_set(m); + xatom = xextra_atom[m]; + hatom = hextra_atom[m]; + n = extra_nlen[m]; + for (i = 0; i < n; i++) xatom[i] += alpha*hatom[i]; + requestor[m]->min_x_set(m); } }