git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13354 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -210,12 +210,10 @@ void ComputeTempCS::dof_compute()
|
||||
{
|
||||
adjust_dof_fix();
|
||||
int nper = domain->dimension;
|
||||
double natoms = group->count(igroup);
|
||||
dof = nper * natoms;
|
||||
natoms_temp = group->count(igroup);
|
||||
dof = nper * natoms_temp;
|
||||
dof -= nper * nshells;
|
||||
dof -= extra_dof + fix_dof;
|
||||
if (dof < 0.0 && natoms > 0.0)
|
||||
error->all(FLERR,"Temperature compute degrees of freedom < 0");
|
||||
if (dof > 0) tfactor = force->mvv2e / (dof * force->boltz);
|
||||
else tfactor = 0.0;
|
||||
}
|
||||
@ -258,6 +256,8 @@ double ComputeTempCS::compute_scalar()
|
||||
|
||||
MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (dynamic) dof_compute();
|
||||
if (dof < 0.0 && natoms_temp > 0.0)
|
||||
error->all(FLERR,"Temperature compute degrees of freedom < 0");
|
||||
scalar *= tfactor;
|
||||
return scalar;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user