diff --git a/doc/Manual.html b/doc/Manual.html index 09162cd017..51b9dc1c26 100644 --- a/doc/Manual.html +++ b/doc/Manual.html @@ -1,7 +1,7 @@
IMPORTANT NOTE: If you use this command with the mol or charge +vectors than you most likely want to set ghost yes, since these +properties are stored with ghost atoms if you use an +atom_style that defines them, and many LAMMPS +operations that use molecule IDs or charge, such as neighbor lists and +pair styles, will expect ghost atoms to have these valuse. LAMMPS +will issue a warning it you define those vectors but do not set +ghost yes. +
IMPORTANT NOTE: The properties for ghost atoms are not updated every timestep, but only once every few steps when neighbor lists are re-built. Thus the ghost keyword is suitable for static properties, diff --git a/doc/fix_property_atom.txt b/doc/fix_property_atom.txt index c98be7b38e..96c3153cd2 100644 --- a/doc/fix_property_atom.txt +++ b/doc/fix_property_atom.txt @@ -82,6 +82,15 @@ keyword with a value of {yes}. This will invoke extra communication when ghost atoms are created (at every re-neighboring) to insure the new properties are also defined for the ghost atoms. +IMPORTANT NOTE: If you use this command with the {mol} or {charge} +vectors than you most likely want to set {ghost} yes, since these +properties are stored with ghost atoms if you use an +"atom_style"_atom_style.html that defines them, and many LAMMPS +operations that use molecule IDs or charge, such as neighbor lists and +pair styles, will expect ghost atoms to have these valuse. LAMMPS +will issue a warning it you define those vectors but do not set +{ghost} yes. + IMPORTANT NOTE: The properties for ghost atoms are not updated every timestep, but only once every few steps when neighbor lists are re-built. Thus the {ghost} keyword is suitable for static properties, diff --git a/doc/fix_rigid.html b/doc/fix_rigid.html index 8bb512edbe..5d7086dfed 100644 --- a/doc/fix_rigid.html +++ b/doc/fix_rigid.html @@ -183,17 +183,23 @@ command), setting the force on them to 0.0 (via the fix nve command).
-NOTE: edit this -
IMPORTANT NOTE: The aggregate properties of each rigid body are -calculated at the start of each simulation run. These include its -center of mass, moments of inertia, and net velocity and angular -momentum. This means that before or between runs, per-atom properties -can be changed, e.g. via the set or -velocity command, which will affect the bodies. An -exception is if the infile keyword is used, then all the body -properties (except net velocity and angular momentum) are only -calculated once so that values from the file are valid. +calculated one time at the start of the first simulation run after +this fix is specified. The properties include the position and +velocity of the center-of-mass of the body, its moments of inertia, +and its angular momentum. This is done using the properties of the +constituent atoms of the body at that point in time (or see the +infile keyword option). Thereafter, changing properties of +individual atoms in the body will have no effect on a rigid body's +dynamics, unless they effect the pair_style +interactions that individual particles are part of. For example, you +might think you could displace the atoms in a body or add a large +velocity to each atom in a body to make it move in a desired direction +before a 2nd run is performed, using the set or +displace_atoms or velocity +command. But these commands will not affect the internal attributes +of the body, and the position and velocity or individual atoms in the +body will be reset when time integration starts.
NOTE: edit this -
-ID1 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz -ID2 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz +ID1 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lz +ID2 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lz ... -IDN masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz +IDN masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lzThe rigid body IDs are all positive integers. For the single bodystyle, only an ID of 1 can be used. For the group bodystyle, @@ -538,7 +542,10 @@ should be the values consistent with the current orientation of the rigid body around its center of mass. The values are with respect to the simulation box XYZ axes, not with respect to the prinicpal axes of the rigid body itself. LAMMPS performs the latter calculation -internally. +internally. The (vxcm,vycm,vzcm) values are the velocity of the +center of mass. The (lx,ly,lz) values are the angular momentum of the +body. These last 6 values can simply be set to 0 if you wish the +body to have no initial motion.
IMPORTANT NOTE: If you use the infile or mol keywords and write restart files during a simulation, then each time a restart file is diff --git a/doc/fix_rigid.txt b/doc/fix_rigid.txt index 277e4105e8..135ea2653a 100644 --- a/doc/fix_rigid.txt +++ b/doc/fix_rigid.txt @@ -165,19 +165,23 @@ command), setting the force on them to 0.0 (via the "fix setforce"_fix_setforce.html command), and integrating them as usual (e.g. via the "fix nve"_fix_nve.html command). - -NOTE: edit this - - IMPORTANT NOTE: The aggregate properties of each rigid body are -calculated at the start of each simulation run. These include its -center of mass, moments of inertia, and net velocity and angular -momentum. This means that before or between runs, per-atom properties -can be changed, e.g. via the "set"_set.html or -"velocity"_velocity.html command, which will affect the bodies. An -exception is if the {infile} keyword is used, then all the body -properties (except net velocity and angular momentum) are only -calculated once so that values from the file are valid. +calculated one time at the start of the first simulation run after +this fix is specified. The properties include the position and +velocity of the center-of-mass of the body, its moments of inertia, +and its angular momentum. This is done using the properties of the +constituent atoms of the body at that point in time (or see the +{infile} keyword option). Thereafter, changing properties of +individual atoms in the body will have no effect on a rigid body's +dynamics, unless they effect the "pair_style"_pair_style.html +interactions that individual particles are part of. For example, you +might think you could displace the atoms in a body or add a large +velocity to each atom in a body to make it move in a desired direction +before a 2nd run is performed, using the "set"_set.html or +"displace_atoms"_displace_atoms.html or "velocity"_velocity.html +command. But these commands will not affect the internal attributes +of the body, and the position and velocity or individual atoms in the +body will be reset when time integration starts. :line @@ -499,12 +503,10 @@ comment lines starting with "#" which are ignored. The first non-blank, non-comment line should list N = the number of lines to follow. The N successive lines contain the following information: -NOTE: edit this - -ID1 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz -ID2 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz +ID1 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lz +ID2 masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lz ... -IDN masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz :pre +IDN masstotal xcm ycm zcm ixx iyy izz ixy ixz iyz vxcm vycm vzcm lx ly lz :pre The rigid body IDs are all positive integers. For the {single} bodystyle, only an ID of 1 can be used. For the {group} bodystyle, @@ -522,7 +524,10 @@ should be the values consistent with the current orientation of the rigid body around its center of mass. The values are with respect to the simulation box XYZ axes, not with respect to the prinicpal axes of the rigid body itself. LAMMPS performs the latter calculation -internally. +internally. The (vxcm,vycm,vzcm) values are the velocity of the +center of mass. The (lx,ly,lz) values are the angular momentum of the +body. These last 6 values can simply be set to 0 if you wish the +body to have no initial motion. IMPORTANT NOTE: If you use the {infile} or {mol} keywords and write restart files during a simulation, then each time a restart file is diff --git a/doc/molecule.html b/doc/molecule.html index 84b5db8633..d2ff915697 100644 --- a/doc/molecule.html +++ b/doc/molecule.html @@ -97,9 +97,11 @@ appear if the value(s) are different than the default.
For mass, com, and inertia, the default is for LAMMPS to calculate this quantity itself if needed, assuming the molecules -consists of a set of point particles. You only need to specify these -values for a rigid body consisting of finite-size particles, -especially if they are overlapping. +consists of a set of point particles or finite-size particles (with a +non-zero diameter) that do not overlap. If finite-size particles in +the molecule do overlap, LAMMPS will not account for the overlap +effects when calculating any of these 3 quantities, so you should +pre-compute them yourself and list the values in the file.
The mass and center-of-mass coordinates (Xc,Yc,Zc) are self-explanatory. The 6 moments of inertia (ixx,iyy,izz,ixy,ixz,iyz) diff --git a/doc/molecule.txt b/doc/molecule.txt index 9d029bfc4d..1d1e7545f2 100644 --- a/doc/molecule.txt +++ b/doc/molecule.txt @@ -94,9 +94,11 @@ Ixx Iyy Izz Ixy Ixz Iyz {inertia} = 6 components of inertia tensor of molecule : For {mass}, {com}, and {inertia}, the default is for LAMMPS to calculate this quantity itself if needed, assuming the molecules -consists of a set of point particles. You only need to specify these -values for a rigid body consisting of finite-size particles, -especially if they are overlapping. +consists of a set of point particles or finite-size particles (with a +non-zero diameter) that do not overlap. If finite-size particles in +the molecule do overlap, LAMMPS will not account for the overlap +effects when calculating any of these 3 quantities, so you should +pre-compute them yourself and list the values in the file. The mass and center-of-mass coordinates (Xc,Yc,Zc) are self-explanatory. The 6 moments of inertia (ixx,iyy,izz,ixy,ixz,iyz) diff --git a/examples/ASPHERE/box/in.box b/examples/ASPHERE/box/in.box index 289fc6c6af..2ec09faf56 100644 --- a/examples/ASPHERE/box/in.box +++ b/examples/ASPHERE/box/in.box @@ -32,6 +32,9 @@ fix 2 all enforce2d #dump 1 all atom 10 dump.box.equil +compute tbig all temp/sphere +thermo_modify temp tbig + thermo 100 run 1000 @@ -89,6 +92,7 @@ fix 3 all enforce2d # diagnostics +uncompute tbig compute tbig big temp/sphere variable pebig equal pe*atoms/count(big) variable ebig equal etotal*atoms/count(big) diff --git a/examples/ASPHERE/box/in.box.mp b/examples/ASPHERE/box/in.box.mp index 2d6a2d2df6..2953552595 100644 --- a/examples/ASPHERE/box/in.box.mp +++ b/examples/ASPHERE/box/in.box.mp @@ -32,6 +32,9 @@ fix 2 all enforce2d #dump 1 all atom 10 dump.box.equil +compute tbig all temp/sphere +thermo_modify temp tbig + thermo 100 run 1000 @@ -90,6 +93,7 @@ fix 4 all enforce2d # diagnostics +uncompute tbig compute tbig big temp/sphere variable pebig equal pe*atoms/count(big) variable ebig equal etotal*atoms/count(big) diff --git a/examples/ASPHERE/star/in.star b/examples/ASPHERE/star/in.star index eac4caf6a0..6711e7a0a7 100644 --- a/examples/ASPHERE/star/in.star +++ b/examples/ASPHERE/star/in.star @@ -32,6 +32,9 @@ fix 2 all enforce2d #dump 1 all atom 10 dump.star.equil +compute tbig all temp/sphere +thermo_modify temp tbig + thermo 100 run 1000 @@ -89,6 +92,7 @@ fix 3 all enforce2d # diagnostics +uncompute tbig compute tbig big temp/sphere variable pebig equal pe*atoms/count(big) variable ebig equal etotal*atoms/count(big) diff --git a/examples/ASPHERE/star/in.star.mp b/examples/ASPHERE/star/in.star.mp index 319dfd1907..de5f23dfb6 100644 --- a/examples/ASPHERE/star/in.star.mp +++ b/examples/ASPHERE/star/in.star.mp @@ -32,6 +32,9 @@ fix 2 all enforce2d #dump 1 all atom 10 dump.star.equil +compute tbig all temp/sphere +thermo_modify temp tbig + thermo 100 run 1000 @@ -90,6 +93,7 @@ fix 4 all enforce2d # diagnostics +uncompute tbig compute tbig big temp/sphere variable pebig equal pe*atoms/count(big) variable ebig equal etotal*atoms/count(big) diff --git a/examples/pour/in.pour.2d.molecule b/examples/pour/in.pour.2d.molecule index df44c6a528..294a8785ec 100644 --- a/examples/pour/in.pour.2d.molecule +++ b/examples/pour/in.pour.2d.molecule @@ -7,7 +7,7 @@ boundary f fm p newton off comm_modify vel yes cutoff 2.5 -fix prop all property/atom mol +fix prop all property/atom mol ghost yes region reg block 0 100 0 50 -0.5 0.5 units box create_box 1 reg diff --git a/src/dump_image.cpp b/src/dump_image.cpp index ac5ba9534b..6939bc9d5c 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -1047,8 +1047,11 @@ int DumpImage::modify_param(int narg, char **arg) if (strcmp(arg[0],"amap") == 0) { if (narg < 6) error->all(FLERR,"Illegal dump_modify command"); if (strlen(arg[3]) != 2) error->all(FLERR,"Illegal dump_modify command"); - int factor = 2; + int factor; if (arg[3][0] == 's') factor = 1; + else if (arg[3][0] == 'c') factor = 2; + else if (arg[3][0] == 'd') factor = 3; + else error->all(FLERR,"Illegal dump_modify command"); int nentry = force->inumeric(FLERR,arg[5]); if (nentry < 1) error->all(FLERR,"Illegal dump_modify command"); int n = 6 + factor*nentry; diff --git a/src/image.cpp b/src/image.cpp index df644e0428..ab6824d7fb 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -1756,14 +1756,14 @@ int ColorMap::reset(int narg, char **arg) if (!islower(arg[n][0])) { mentry[i].lo = NUMERIC; mentry[i].lvalue = force->numeric(FLERR,arg[n]); - } else if (strcmp(arg[n],"min") == 0) mentry[i].single = MINVALUE; - else if (strcmp(arg[n],"max") == 0) mentry[i].single = MAXVALUE; + } else if (strcmp(arg[n],"min") == 0) mentry[i].lo = MINVALUE; + else if (strcmp(arg[n],"max") == 0) mentry[i].lo = MAXVALUE; else return 1; if (!islower(arg[n+1][0])) { mentry[i].hi = NUMERIC; mentry[i].hvalue = force->numeric(FLERR,arg[n+1]); - } else if (strcmp(arg[n+1],"min") == 0) mentry[i].single = MINVALUE; - else if (strcmp(arg[n+1],"max") == 0) mentry[i].single = MAXVALUE; + } else if (strcmp(arg[n+1],"min") == 0) mentry[i].hi = MINVALUE; + else if (strcmp(arg[n+1],"max") == 0) mentry[i].hi = MAXVALUE; else return 1; mentry[i].color = image->color2rgb(arg[n+2]); n += 3; diff --git a/src/version.h b/src/version.h index f55262be2a..6538075989 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "2 Apr 2015" +#define LAMMPS_VERSION "3 Apr 2015"