diff --git a/doc/neighbor.html b/doc/neighbor.html index f1a7446f74..8b24a4929d 100644 --- a/doc/neighbor.html +++ b/doc/neighbor.html @@ -33,13 +33,6 @@ need to be built, but more pairs must be checked for possible force interactions every timestep. The default value for skin depends on the choice of units for the simulation (see below).
-For simulations without pairwise interactions (see "pair_style none" -command), and just bonded interactions, you still need to set the -neighbor skin distance. Pairwise neighbor lists will not be formed -but the skin distance also determines which atoms are communicated -from nearby processors, so it should be slightly large enough that all -bond, angle, etc atoms are acquired. -
The style value selects what algorithm is used to build the list. The bin style creates the list by binning which is an operation that scales linearly with N/P, the number of atoms per processor where N = @@ -71,7 +64,24 @@ the pairwise list and the number of times neighbor lists were built are printed to the screen and log file. See this section for details.
-Restrictions: none +
Restrictions: +
+For simulations without pairwise interactions (see "pair_style none" +command), but that include bonded interactions, you still need to set +the neighbor skin distance. Pairwise neighbor lists will not be +formed, but the pair cutoff (0.0 in this case) plus the skin distance +is the range at which atoms are communicated from nearby processors. +This needs to be large enough that atoms in the same bond, angle, etc +as an atom owned by a processor are acquired. What distance is +appropriate depends on the newton bond setting. For +newton bond off, the distance needs to be the furthest distance +between any two atoms in the bond, angle, etc. E.g. the distance +between the 1-4 atoms in a dihedral. For newton bond on, the distance +is between the central atom in the bond, angle, etc and any other +atom. E.g. the distance between the 2-4 atoms in a dihedral. +
+The same logic applies to systems that include bonded interactions and +a pairwise cutoff shorter than the distances just described.
Related commands:
diff --git a/doc/neighbor.txt b/doc/neighbor.txt index 937793022e..9a04488d4c 100644 --- a/doc/neighbor.txt +++ b/doc/neighbor.txt @@ -30,13 +30,6 @@ need to be built, but more pairs must be checked for possible force interactions every timestep. The default value for {skin} depends on the choice of units for the simulation (see below). -For simulations without pairwise interactions (see "pair_style none" -command), and just bonded interactions, you still need to set the -neighbor skin distance. Pairwise neighbor lists will not be formed -but the skin distance also determines which atoms are communicated -from nearby processors, so it should be slightly large enough that all -bond, angle, etc atoms are acquired. - The {style} value selects what algorithm is used to build the list. The {bin} style creates the list by binning which is an operation that scales linearly with N/P, the number of atoms per processor where N = @@ -68,7 +61,24 @@ the pairwise list and the number of times neighbor lists were built are printed to the screen and log file. See "this section"_Section_start.html#2_7 for details. -[Restrictions:] none +[Restrictions:] + +For simulations without pairwise interactions (see "pair_style none" +command), but that include bonded interactions, you still need to set +the neighbor skin distance. Pairwise neighbor lists will not be +formed, but the pair cutoff (0.0 in this case) plus the skin distance +is the range at which atoms are communicated from nearby processors. +This needs to be large enough that atoms in the same bond, angle, etc +as an atom owned by a processor are acquired. What distance is +appropriate depends on the "newton bond"_newton.html setting. For +newton bond off, the distance needs to be the furthest distance +between any two atoms in the bond, angle, etc. E.g. the distance +between the 1-4 atoms in a dihedral. For newton bond on, the distance +is between the central atom in the bond, angle, etc and any other +atom. E.g. the distance between the 2-4 atoms in a dihedral. + +The same logic applies to systems that include bonded interactions and +a pairwise cutoff shorter than the distances just described. [Related commands:] diff --git a/doc/set.html b/doc/set.html index 1c439ad155..ac034cd732 100644 --- a/doc/set.html +++ b/doc/set.html @@ -13,7 +13,7 @@Syntax:
-set style ID keyword value ... +set style ID keyword values ...
type value = atom type @@ -45,6 +45,8 @@ diameter value = particle diameter (distance units) density value = particle density (mass/distance^3 units) volume value = particle volume (distance^3 units) + image nx ny nz + nx,ny,nz = which periodic image of the simulation box the atom is in bond value = bond type for all bonds between selected atoms angle value = angle type for all angles between selected atoms dihedral value = dihedral type for all dihedrals between selected atoms @@ -150,6 +152,28 @@ combined with its density determines their mass.Keyword volume sets the effective size of all selected particles.
+Keyword image sets which image of the simulation box the atom is +considered to be in. It is only applied to periodic dimensions. An +image of 0 means it is inside the box as defined. A value of 2 means +add 2 box lengths to get the true value. A value of -1 means subtract +1 box length to get the true value. LAMMPS updates these flags as +atoms cross periodic boundaries during the simulation. The flags can +be output with atom snapshots via the dump command. If a +value of NULL is specified for any of nx,ny,nz, then the current image +value for that dimension is unchanged. +
+This command can be useful after a system has been equilibrated and +atoms have diffused one or more box lengths in various directions. +This command can then reset the image values for atoms so that they +are effectively inside the simulation box, e.g if a diffusion +coefficient is about to be measured via the fix msd +command. Care should be taken not to reset the image flags of two +atoms in a bond to the same value if the bond straddles a periodic +boundary (rather they should be different by +/- 1). This will not +affect the dynamics of a simulation, but may mess up analysis of the +trajectories if a LAMMPS diagnostic or your own analysis relies on the +image flags to unwrap a molecule which straddles the periodic box. +
For the diameter and density and volume keywords, the atom style being used must support the use of those parameters. For example, granular particles store a diameter and diff --git a/doc/set.txt b/doc/set.txt index 9ecc601dca..fe8800ba8c 100644 --- a/doc/set.txt +++ b/doc/set.txt @@ -10,7 +10,7 @@ set command :h3 [Syntax:] -set style ID keyword value ... :pre +set style ID keyword values ... :pre style = {atom} or {group} or {region} :ulb,l ID = atom ID or group ID or region ID :l @@ -18,7 +18,7 @@ one or more keyword/value pairs may be appended :l keyword = {type} or {type/fraction} or {mol} or \ {x} or {y} or {z} or {vx} or {vy} or {vz} or \ {charge} or {dipole} or {dipole/random} or {quat/random} or \ - {diameter} or {density} or {volume} or + {diameter} or {density} or {volume} or {image} or {bond} or {angle} or {dihedral} or {improper} :l {type} value = atom type {type/fraction} values = type fraction seed @@ -41,6 +41,8 @@ keyword = {type} or {type/fraction} or {mol} or \ {diameter} value = particle diameter (distance units) {density} value = particle density (mass/distance^3 units) {volume} value = particle volume (distance^3 units) + {image} nx ny nz + nx,ny,nz = which periodic image of the simulation box the atom is in {bond} value = bond type for all bonds between selected atoms {angle} value = angle type for all angles between selected atoms {dihedral} value = dihedral type for all dihedrals between selected atoms @@ -145,6 +147,28 @@ combined with its density determines their mass. Keyword {volume} sets the effective size of all selected particles. +Keyword {image} sets which image of the simulation box the atom is +considered to be in. It is only applied to periodic dimensions. An +image of 0 means it is inside the box as defined. A value of 2 means +add 2 box lengths to get the true value. A value of -1 means subtract +1 box length to get the true value. LAMMPS updates these flags as +atoms cross periodic boundaries during the simulation. The flags can +be output with atom snapshots via the "dump"_dump.html command. If a +value of NULL is specified for any of nx,ny,nz, then the current image +value for that dimension is unchanged. + +This command can be useful after a system has been equilibrated and +atoms have diffused one or more box lengths in various directions. +This command can then reset the image values for atoms so that they +are effectively inside the simulation box, e.g if a diffusion +coefficient is about to be measured via the "fix msd"_fix_msd.html +command. Care should be taken not to reset the image flags of two +atoms in a bond to the same value if the bond straddles a periodic +boundary (rather they should be different by +/- 1). This will not +affect the dynamics of a simulation, but may mess up analysis of the +trajectories if a LAMMPS diagnostic or your own analysis relies on the +image flags to unwrap a molecule which straddles the periodic box. + For the {diameter} and {density} and {volume} keywords, the "atom style"_atom_style.html being used must support the use of those parameters. For example, granular particles store a diameter and