Commit 19e8c92a authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7003 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 2d99de13
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ ComputeERotateAsphere::
ComputeERotateAsphere(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg)
{
  if (narg != 3) error->all("Illegal compute erotate/asphere command");
  if (narg != 3) error->all(FLERR,"Illegal compute erotate/asphere command");

  scalar_flag = 1;
  extscalar = 1;
@@ -38,7 +38,7 @@ ComputeERotateAsphere(LAMMPS *lmp, int narg, char **arg) :

  avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
  if (!avec) 
    error->all("Compute erotate/asphere requires atom style ellipsoid");
    error->all(FLERR,"Compute erotate/asphere requires atom style ellipsoid");
}

/* ---------------------------------------------------------------------- */
@@ -55,7 +55,7 @@ void ComputeERotateAsphere::init()
  for (int i = 0; i < nlocal; i++)
    if (mask[i] & groupbit)
      if (ellipsoid[i] < 0)
	error->one("Compute erotate/asphere requires extended particles");
	error->one(FLERR,"Compute erotate/asphere requires extended particles");

  pfactor = 0.5 * force->mvv2e;
}
+11 −11
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ enum{ROTATE,ALL};
ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg)
{
  if (narg < 3) error->all("Illegal compute temp/asphere command");
  if (narg < 3) error->all(FLERR,"Illegal compute temp/asphere command");

  scalar_flag = vector_flag = 1;
  size_vector = 6;
@@ -56,19 +56,19 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :
  int iarg = 3;
  while (iarg < narg) {
    if (strcmp(arg[iarg],"bias") == 0) {
      if (iarg+2 > narg) error->all("Illegal compute temp/asphere command");
      if (iarg+2 > narg) error->all(FLERR,"Illegal compute temp/asphere command");
      tempbias = 1;
      int n = strlen(arg[iarg+1]) + 1;
      id_bias = new char[n];
      strcpy(id_bias,arg[iarg+1]);
      iarg += 2;
    } else if (strcmp(arg[iarg],"dof") == 0) {
      if (iarg+2 > narg) error->all("Illegal compute temp/asphere command");
      if (iarg+2 > narg) error->all(FLERR,"Illegal compute temp/asphere command");
      if (strcmp(arg[iarg+1],"rotate") == 0) mode = ROTATE;
      else if (strcmp(arg[iarg+1],"all") == 0) mode = ALL;
      else error->all("Illegal compute temp/asphere command");
      else error->all(FLERR,"Illegal compute temp/asphere command");
      iarg += 2;
    } else error->all("Illegal compute temp/asphere command");
    } else error->all(FLERR,"Illegal compute temp/asphere command");
  }

  vector = new double[6];
@@ -77,7 +77,7 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) :

  avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
  if (!avec) 
    error->all("Compute temp/asphere requires atom style ellipsoid");
    error->all(FLERR,"Compute temp/asphere requires atom style ellipsoid");
}

/* ---------------------------------------------------------------------- */
@@ -101,18 +101,18 @@ void ComputeTempAsphere::init()
  for (int i = 0; i < nlocal; i++)
    if (mask[i] & groupbit)
      if (ellipsoid[i] < 0)
	error->one("Compute temp/asphere requires extended particles");
	error->one(FLERR,"Compute temp/asphere requires extended particles");

  if (tempbias) {
    int i = modify->find_compute(id_bias);
    if (i < 0) error->all("Could not find compute ID for temperature bias");
    if (i < 0) error->all(FLERR,"Could not find compute ID for temperature bias");
    tbias = modify->compute[i];
    if (tbias->tempflag == 0)
      error->all("Bias compute does not calculate temperature");
      error->all(FLERR,"Bias compute does not calculate temperature");
    if (tbias->tempbias == 0)
      error->all("Bias compute does not calculate a velocity bias");
      error->all(FLERR,"Bias compute does not calculate a velocity bias");
    if (tbias->igroup != igroup)
      error->all("Bias compute group does not match compute group");
      error->all(FLERR,"Bias compute group does not match compute group");
    tbias->init();
    if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2;
    else tempbias = 1;
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ FixNHAsphere::FixNHAsphere(LAMMPS *lmp, int narg, char **arg) :
{
  avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
  if (!avec) 
    error->all("Compute nvt/nph/npt asphere requires atom style ellipsoid");
    error->all(FLERR,"Compute nvt/nph/npt asphere requires atom style ellipsoid");
}

/* ---------------------------------------------------------------------- */
@@ -52,7 +52,7 @@ void FixNHAsphere::init()
  for (int i = 0; i < nlocal; i++)
    if (mask[i] & groupbit)
      if (ellipsoid[i] < 0)
	error->one("Fix nvt/nph/npt asphere requires extended particles");
	error->one(FLERR,"Fix nvt/nph/npt asphere requires extended particles");

  FixNH::init();
}
+2 −2
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ FixNPHAsphere::FixNPHAsphere(LAMMPS *lmp, int narg, char **arg) :
  FixNHAsphere(lmp, narg, arg)
{
  if (tstat_flag)
    error->all("Temperature control can not be used with fix nph/asphere");
    error->all(FLERR,"Temperature control can not be used with fix nph/asphere");
  if (!pstat_flag)
    error->all("Pressure control must be used with fix nph/asphere");
    error->all(FLERR,"Pressure control must be used with fix nph/asphere");

  // create a new compute temp style
  // id = fix-ID + temp
+2 −2
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ FixNPTAsphere::FixNPTAsphere(LAMMPS *lmp, int narg, char **arg) :
  FixNHAsphere(lmp, narg, arg)
{
  if (!tstat_flag)
    error->all("Temperature control must be used with fix npt/asphere");
    error->all(FLERR,"Temperature control must be used with fix npt/asphere");
  if (!pstat_flag)
    error->all("Pressure control must be used with fix npt/asphere");
    error->all(FLERR,"Pressure control must be used with fix npt/asphere");

  // create a new compute temp style
  // id = fix-ID + temp
Loading