Commit 4b237db3 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1653 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 08e197ab
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -293,9 +293,9 @@ void ComputeTempAsphere::remove_bias_all()
   assume remove_bias() was previously called
------------------------------------------------------------------------- */

void ComputeTempAsphere::restore_bias(double *v)
void ComputeTempAsphere::restore_bias(int i, double *v)
{
  if (tbias) tbias->restore_bias(v);
  if (tbias) tbias->restore_bias(i,v);
}

/* ----------------------------------------------------------------------
@@ -307,4 +307,3 @@ void ComputeTempAsphere::restore_bias_all()
{
  if (tbias) tbias->restore_bias_all();
}
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class ComputeTempAsphere : public Compute {

  void remove_bias(int, double *);
  void remove_bias_all();
  void restore_bias(double *);
  void restore_bias(int, double *);
  void restore_bias_all();

 private:
+2 −2
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ void FixNPTAsphere::initial_integrate(int vflag)
	v[i][0] = v[i][0]*factor[0] + dtfm*f[i][0];
	v[i][1] = v[i][1]*factor[1] + dtfm*f[i][1];
	v[i][2] = v[i][2]*factor[2] + dtfm*f[i][2];
	temperature->restore_bias(v[i]);
	temperature->restore_bias(i,v[i]);
      }
    }
  }
@@ -205,7 +205,7 @@ void FixNPTAsphere::final_integrate()
	v[i][0] = (v[i][0] + dtfm*f[i][0]) * factor[0];
	v[i][1] = (v[i][1] + dtfm*f[i][1]) * factor[1];
	v[i][2] = (v[i][2] + dtfm*f[i][2]) * factor[2];
	temperature->restore_bias(v[i]);
	temperature->restore_bias(i,v[i]);
	angmom[i][0] = (angmom[i][0] + dtf * torque[i][0]) * factor_rotate;
	angmom[i][1] = (angmom[i][1] + dtf * torque[i][1]) * factor_rotate;
	angmom[i][2] = (angmom[i][2] + dtf * torque[i][2]) * factor_rotate;
+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ void FixNVTAsphere::initial_integrate(int vflag)
	v[i][0] = v[i][0]*factor + dtfm*f[i][0];
	v[i][1] = v[i][1]*factor + dtfm*f[i][1];
	v[i][2] = v[i][2]*factor + dtfm*f[i][2];
	temperature->restore_bias(v[i]);
	temperature->restore_bias(i,v[i]);
	x[i][0] += dtv * v[i][0];
	x[i][1] += dtv * v[i][1];
	x[i][2] += dtv * v[i][2];
@@ -178,7 +178,7 @@ void FixNVTAsphere::final_integrate()
	v[i][0] = v[i][0]*factor + dtfm*f[i][0];
	v[i][1] = v[i][1]*factor + dtfm*f[i][1];
	v[i][2] = v[i][2]*factor + dtfm*f[i][2];
	temperature->restore_bias(v[i]);
	temperature->restore_bias(i,v[i]);
	angmom[i][0] = (angmom[i][0] + dtf*torque[i][0]) * factor;
	angmom[i][1] = (angmom[i][1] + dtf*torque[i][1]) * factor;
	angmom[i][2] = (angmom[i][2] + dtf*torque[i][2]) * factor;
+7 −1
Original line number Diff line number Diff line
@@ -15,9 +15,10 @@
#include "stdlib.h"
#include "string.h"
#include "ctype.h"
#include "comm.h"
#include "compute.h"
#include "group.h"
#include "domain.h"
#include "modify.h"
#include "lattice.h"
#include "memory.h"
#include "error.h"
@@ -124,6 +125,11 @@ void Compute::modify_params(int narg, char **arg)
	int n = strlen(arg[iarg+1]) + 1;
	id_bias = new char[n];
	strcpy(id_bias,arg[iarg+1]);
	int icompute = modify->find_compute(id_bias);
	if (icompute < 0) error->all("Could not find compute_modify bias ID");
	Compute *temperature = modify->compute[icompute];
	if (temperature->igroup != igroup && comm->me == 0)
	  error->warning("Group for compute_modify bias != compute group");
      }
      iarg += 2;
    } else error->all("Illegal compute_modify command");
Loading