git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
@ -113,14 +113,14 @@ void FixTempRescale::init()
|
||||
|
||||
if (tstr) {
|
||||
tvar = input->variable->find(tstr);
|
||||
if (tvar < 0)
|
||||
if (tvar < 0)
|
||||
error->all(FLERR,"Variable name for fix temp/rescale does not exist");
|
||||
if (input->variable->equalstyle(tvar)) tstyle = EQUAL;
|
||||
else error->all(FLERR,"Variable for fix temp/rescale is invalid style");
|
||||
}
|
||||
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0)
|
||||
if (icompute < 0)
|
||||
error->all(FLERR,"Temperature ID for fix temp/rescale does not exist");
|
||||
temperature = modify->compute[icompute];
|
||||
|
||||
@ -149,7 +149,7 @@ void FixTempRescale::end_of_step()
|
||||
t_target = input->variable->compute_equal(tvar);
|
||||
if (t_target < 0.0)
|
||||
error->one(FLERR,
|
||||
"Fix temp/rescale variable returned negative temperature");
|
||||
"Fix temp/rescale variable returned negative temperature");
|
||||
modify->addstep_compute(update->ntimestep + nevery);
|
||||
}
|
||||
|
||||
@ -171,21 +171,21 @@ void FixTempRescale::end_of_step()
|
||||
|
||||
if (which == NOBIAS) {
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
v[i][0] *= factor;
|
||||
v[i][1] *= factor;
|
||||
v[i][2] *= factor;
|
||||
}
|
||||
if (mask[i] & groupbit) {
|
||||
v[i][0] *= factor;
|
||||
v[i][1] *= factor;
|
||||
v[i][2] *= factor;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
temperature->remove_bias(i,v[i]);
|
||||
v[i][0] *= factor;
|
||||
v[i][1] *= factor;
|
||||
v[i][2] *= factor;
|
||||
temperature->restore_bias(i,v[i]);
|
||||
}
|
||||
if (mask[i] & groupbit) {
|
||||
temperature->remove_bias(i,v[i]);
|
||||
v[i][0] *= factor;
|
||||
v[i][1] *= factor;
|
||||
v[i][2] *= factor;
|
||||
temperature->restore_bias(i,v[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -207,13 +207,13 @@ int FixTempRescale::modify_param(int narg, char **arg)
|
||||
strcpy(id_temp,arg[1]);
|
||||
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0)
|
||||
if (icompute < 0)
|
||||
error->all(FLERR,"Could not find fix_modify temperature ID");
|
||||
temperature = modify->compute[icompute];
|
||||
|
||||
if (temperature->tempflag == 0)
|
||||
error->all(FLERR,
|
||||
"Fix_modify temperature ID does not compute temperature");
|
||||
"Fix_modify temperature ID does not compute temperature");
|
||||
if (temperature->igroup != igroup && comm->me == 0)
|
||||
error->warning(FLERR,"Group for fix_modify temp != fix group");
|
||||
return 2;
|
||||
@ -244,6 +244,6 @@ void *FixTempRescale::extract(const char *str, int &dim)
|
||||
dim=0;
|
||||
if (strcmp(str,"t_target") == 0) {
|
||||
return &t_target;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user