git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8164 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-05-23 16:24:30 +00:00
parent 44904c5bf3
commit aa8aeb0294
15 changed files with 109 additions and 23 deletions

View File

@ -46,6 +46,7 @@ FixTempRescale::FixTempRescale(LAMMPS *lmp, int narg, char **arg) :
extscalar = 1;
t_start = atof(arg[4]);
t_target = t_start;
t_stop = atof(arg[5]);
t_window = atof(arg[6]);
fraction = atof(arg[7]);
@ -112,7 +113,7 @@ void FixTempRescale::end_of_step()
double delta = update->ntimestep - update->beginstep;
delta /= update->endstep - update->beginstep;
double t_target = t_start + delta * (t_stop-t_start);
t_target = t_start + delta * (t_stop-t_start);
// rescale velocity of appropriate atoms if outside window
// for BIAS:
@ -186,7 +187,7 @@ int FixTempRescale::modify_param(int narg, char **arg)
void FixTempRescale::reset_target(double t_new)
{
t_start = t_stop = t_new;
t_target = t_start = t_stop = t_new;
}
/* ---------------------------------------------------------------------- */
@ -195,3 +196,17 @@ double FixTempRescale::compute_scalar()
{
return energy;
}
/* ----------------------------------------------------------------------
extract thermostat properties
------------------------------------------------------------------------- */
void *FixTempRescale::extract(const char *str, int &dim)
{
dim=0;
if (strcmp(str,"t_target") == 0) {
return &t_target;
}
return NULL;
}