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

@ -115,6 +115,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
if (iarg+4 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command");
tstat_flag = 1;
t_start = atof(arg[iarg+1]);
t_target = t_start;
t_stop = atof(arg[iarg+2]);
t_period = atof(arg[iarg+3]);
if (t_start < 0.0 || t_stop <= 0.0)
@ -1597,7 +1598,7 @@ double FixNH::compute_vector(int n)
void FixNH::reset_target(double t_new)
{
t_start = t_stop = t_new;
t_target = t_start = t_stop = t_new;
}
/* ---------------------------------------------------------------------- */
@ -1623,6 +1624,19 @@ void FixNH::reset_dt()
tdrag_factor = 1.0 - (update->dt * t_freq * drag / nc_tchain);
}
/* ----------------------------------------------------------------------
extract thermostat properties
------------------------------------------------------------------------- */
void *FixNH::extract(const char *str, int &dim)
{
dim=0;
if (strcmp(str,"t_target") == 0) {
return &t_target;
}
return NULL;
}
/* ----------------------------------------------------------------------
perform half-step update of chain thermostat variables
------------------------------------------------------------------------- */