git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4915 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
26
src/min.cpp
26
src/min.cpp
@ -347,12 +347,9 @@ void Min::setup_minimal(int flag)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
perform minimization, calling iterate() for N steps
|
||||
complete = 1 if caller wants to force N iterations (in every replica)
|
||||
minimize command and PRD call with complete = 0
|
||||
NEB calls with complete = 1
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Min::run(int n, int complete)
|
||||
void Min::run(int n)
|
||||
{
|
||||
// minimizer iterations
|
||||
|
||||
@ -360,24 +357,7 @@ void Min::run(int n, int complete)
|
||||
stop_condition = iterate(n);
|
||||
stopstr = stopstrings(stop_condition);
|
||||
|
||||
// if early exit from iterate loop and complete flag set
|
||||
// perform remaining dummy iterations
|
||||
|
||||
if (stop_condition && complete) {
|
||||
int ntimestep;
|
||||
while (niter - iter_start < n) {
|
||||
ntimestep = ++update->ntimestep;
|
||||
niter++;
|
||||
ecurrent = energy_force(0);
|
||||
if (output->next == ntimestep) {
|
||||
timer->stamp();
|
||||
output->write(ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if early exit from iterate loop and complete flag not set
|
||||
// if early exit from iterate loop:
|
||||
// set update->nsteps to niter for Finish stats to print
|
||||
// set output->next values to this timestep
|
||||
// call energy_force() to insure vflag is set when forces computed
|
||||
@ -385,7 +365,7 @@ void Min::run(int n, int complete)
|
||||
// add ntimestep to all computes that store invocation times
|
||||
// since are hardwiring call to thermo/dumps and computes may not be ready
|
||||
|
||||
if (stop_condition && !complete) {
|
||||
if (stop_condition) {
|
||||
update->nsteps = niter;
|
||||
|
||||
if (update->restrict_output == 0) {
|
||||
|
||||
Reference in New Issue
Block a user