forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5415 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
94d3b7fb0e
commit
287ac442f6
|
@ -165,6 +165,21 @@ void FixSetForce::init()
|
|||
|
||||
if (strcmp(update->integrate_style,"respa") == 0)
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
// cannot use non-zero forces for a minimization since no energy is integrated
|
||||
// use fix addforce instead
|
||||
|
||||
int flag = 0;
|
||||
if (update->whichflag == 2) {
|
||||
if (xstyle == EQUAL || xstyle == ATOM) flag = 1;
|
||||
if (ystyle == EQUAL || ystyle == ATOM) flag = 1;
|
||||
if (zstyle == EQUAL || zstyle == ATOM) flag = 1;
|
||||
if (xstyle == CONSTANT && xvalue != 0.0) flag = 1;
|
||||
if (ystyle == CONSTANT && yvalue != 0.0) flag = 1;
|
||||
if (zstyle == CONSTANT && zvalue != 0.0) flag = 1;
|
||||
}
|
||||
if (flag)
|
||||
error->all("Cannot use non-zero forces in an energy minimization");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue