Merge branch 'master' into lammps-icms

This commit is contained in:
Axel Kohlmeyer
2010-11-30 08:35:42 -05:00
8 changed files with 29 additions and 35 deletions

View File

@ -33,9 +33,9 @@
</PRE> </PRE>
<LI>one or more input values can be listed <LI>one or more input values can be listed
<LI>value = x, y, z, vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID[I], f_ID, f_ID[I], v_name <LI>value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID[I], f_ID, f_ID[I], v_name
<PRE> x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) <PRE> vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component)
density/number, density/mass = number or mass density density/number, density/mass = number or mass density
c_ID = per-atom vector calculated by a compute with ID c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID c_ID[I] = Ith column of per-atom array calculated by a compute with ID
@ -176,9 +176,9 @@ to <I>reduced</I> when using a triclinic simulation box, as noted below.
</P> </P>
<HR> <HR>
<P>The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are <P>The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory.
self-explanatory. Note that other atom attributes can be used as Note that other atom attributes (including atom postitions x,y,z) can
inputs to this fix by using the <A HREF = "compute_property_atom.html">compute be used as inputs to this fix by using the <A HREF = "compute_property_atom.html">compute
property/atom</A> command and then specifying property/atom</A> command and then specifying
an input value from that compute. an input value from that compute.
</P> </P>

View File

@ -22,8 +22,8 @@ dim, origin, delta can be repeated 1, 2, or 3 times for 1d, 2d, or 3d bins :l
origin = {lower} or {center} or {upper} or coordinate value (distance units) origin = {lower} or {center} or {upper} or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units) :pre delta = thickness of spatial bins in dim (distance units) :pre
one or more input values can be listed :l one or more input values can be listed :l
value = x, y, z, vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l value = vx, vy, vz, fx, fy, fz, density/mass, density/number, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l
x,y,z,vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component) vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component)
density/number, density/mass = number or mass density density/number, density/mass = number or mass density
c_ID = per-atom vector calculated by a compute with ID c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
@ -161,9 +161,9 @@ to {reduced} when using a triclinic simulation box, as noted below.
:line :line
The atom attribute values (x,y,z,vx,vy,vz,fx,fy,fz) are The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory.
self-explanatory. Note that other atom attributes can be used as Note that other atom attributes (including atom postitions x,y,z) can
inputs to this fix by using the "compute be used as inputs to this fix by using the "compute
property/atom"_compute_property_atom.html command and then specifying property/atom"_compute_property_atom.html command and then specifying
an input value from that compute. an input value from that compute.

View File

@ -54,6 +54,12 @@ except: PIZZA_VMDDEV = "win"
try: from DEFAULTS import PIZZA_VMDARCH try: from DEFAULTS import PIZZA_VMDARCH
except: PIZZA_VMDARCH = "LINUX" except: PIZZA_VMDARCH = "LINUX"
# try these settings for a Mac
#PIZZA_VMDNAME = "vmd"
#PIZZA_VMDDIR = "/Applications/VMD\ 1.8.7.app/Contents/vmd"
#PIZZA_VMDDEV = "win"
#PIZZA_VMDARCH = "MACOSXX86"
try: import pexpect try: import pexpect
except: except:
print "pexpect from http://pypi.python.org/pypi/pexpect", \ print "pexpect from http://pypi.python.org/pypi/pexpect", \

View File

@ -47,8 +47,7 @@ PairTersoff::PairTersoff(LAMMPS *lmp) : Pair(lmp)
nelements = 0; nelements = 0;
elements = NULL; elements = NULL;
nparams = 0; nparams = maxparam = 0;
maxparam = 0;
params = NULL; params = NULL;
elem2param = NULL; elem2param = NULL;
} }
@ -369,9 +368,9 @@ void PairTersoff::read_file(char *file)
int params_per_line = 17; int params_per_line = 17;
char **words = new char*[params_per_line+1]; char **words = new char*[params_per_line+1];
if (params) delete [] params; if (params) memory->sfree(params);
params = NULL; params = NULL;
nparams = 0; nparams = maxparam = 0;
// open file on proc 0 // open file on proc 0

View File

@ -34,7 +34,7 @@
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
enum{LOWER,CENTER,UPPER,COORD}; enum{LOWER,CENTER,UPPER,COORD};
enum{X,V,F,DENSITY_NUMBER,DENSITY_MASS,COMPUTE,FIX,VARIABLE}; enum{V,F,DENSITY_NUMBER,DENSITY_MASS,COMPUTE,FIX,VARIABLE};
enum{SAMPLE,ALL}; enum{SAMPLE,ALL};
enum{BOX,LATTICE,REDUCED}; enum{BOX,LATTICE,REDUCED};
enum{ONE,RUNNING,WINDOW}; enum{ONE,RUNNING,WINDOW};
@ -102,17 +102,7 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) :
while (iarg < narg) { while (iarg < narg) {
ids[nvalues] = NULL; ids[nvalues] = NULL;
if (strcmp(arg[iarg],"x") == 0) { if (strcmp(arg[iarg],"vx") == 0) {
which[nvalues] = X;
argindex[nvalues++] = 0;
} else if (strcmp(arg[iarg],"y") == 0) {
which[nvalues] = X;
argindex[nvalues++] = 1;
} else if (strcmp(arg[iarg],"z") == 0) {
which[nvalues] = X;
argindex[nvalues++] = 2;
} else if (strcmp(arg[iarg],"vx") == 0) {
which[nvalues] = V; which[nvalues] = V;
argindex[nvalues++] = 0; argindex[nvalues++] = 0;
} else if (strcmp(arg[iarg],"vy") == 0) { } else if (strcmp(arg[iarg],"vy") == 0) {
@ -554,12 +544,11 @@ void FixAveSpatial::end_of_step()
n = value2index[m]; n = value2index[m];
j = argindex[m]; j = argindex[m];
// X,V,F adds coords,velocities,forces to values // V,F adds velocities,forces to values
if (which[m] == X || which[m] == V || which[m] == F) { if (which[m] == V || which[m] == F) {
double **attribute; double **attribute;
if (which[m] == X) attribute = x; if (which[m] == V) attribute = atom->v;
else if (which[m] == V) attribute = atom->v;
else attribute = atom->f; else attribute = atom->f;
if (regionflag == 0) { if (regionflag == 0) {

View File

@ -529,7 +529,7 @@ void Input::echo()
void Input::ifthenelse() void Input::ifthenelse()
{ {
if (narg < 4) error->all("Illegal if command"); if (narg < 3) error->all("Illegal if command");
// substitute for variables in Boolean expression for "if" // substitute for variables in Boolean expression for "if"
// in case expression was enclosed in quotes // in case expression was enclosed in quotes

View File

@ -3163,13 +3163,13 @@ double Variable::evaluate_boolean(char *str)
// number: push value onto stack // number: push value onto stack
// ---------------- // ----------------
} else if (isdigit(onechar) || onechar == '.') { } else if (isdigit(onechar) || onechar == '.' || onechar == '-') {
if (expect == OP) error->all("Invalid Boolean syntax in if command"); if (expect == OP) error->all("Invalid Boolean syntax in if command");
expect = OP; expect = OP;
// istop = end of number, including scientific notation // istop = end of number, including scientific notation
int istart = i; int istart = i++;
while (isdigit(str[i]) || str[i] == '.') i++; while (isdigit(str[i]) || str[i] == '.') i++;
if (str[i] == 'e' || str[i] == 'E') { if (str[i] == 'e' || str[i] == 'E') {
i++; i++;

View File

@ -1 +1 @@
#define LAMMPS_VERSION "1 Dec 2010" #define LAMMPS_VERSION "3 Dec 2010"