diff --git a/doc/Eqs/pair_mie.jpg b/doc/Eqs/pair_mie.jpg new file mode 100644 index 0000000000..05a8221a93 Binary files /dev/null and b/doc/Eqs/pair_mie.jpg differ diff --git a/doc/Eqs/pair_mie.tex b/doc/Eqs/pair_mie.tex new file mode 100644 index 0000000000..2702ce9bcf --- /dev/null +++ b/doc/Eqs/pair_mie.tex @@ -0,0 +1,10 @@ +\documentstyle[12pt]{article} + +\begin{document} + +$$ + E = C \epsilon \left[ \left(\frac{\sigma}{r}\right)^{\gamma_{rep}} - \left(\frac{\sigma}{r}\right)^{\gamma_{att}} \right] + \qquad r < r_c +$$ + +\end{document} diff --git a/doc/Eqs/pair_mie2.jpg b/doc/Eqs/pair_mie2.jpg new file mode 100644 index 0000000000..216ca1554a Binary files /dev/null and b/doc/Eqs/pair_mie2.jpg differ diff --git a/doc/Eqs/pair_mie2.tex b/doc/Eqs/pair_mie2.tex new file mode 100644 index 0000000000..2ee9e9b34e --- /dev/null +++ b/doc/Eqs/pair_mie2.tex @@ -0,0 +1,9 @@ +\documentstyle[12pt]{article} + +\begin{document} + +$$ + C = \left(\frac{\gamma_{rep}}{\gamma_{rep}-\gamma_{att}}\right) \left(\frac{\gamma_{rep}}{\gamma_{att}}\right)^{\left(\frac{\gamma_{att}}{\gamma_{rep}-\gamma_{att}}\right)} +$$ + +\end{document} diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 09698998ae..8227b493ae 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -433,10 +433,11 @@ potentials. Click on the style itself for a full description:
These are pair styles contributed by users, which can be used if diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index 201cf6fa98..6c5ef98d28 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -692,6 +692,7 @@ potentials. Click on the style itself for a full description: "lubricateU"_pair_lubricateU.html, "lubricateU/poly"_pair_lubricateU.html, "meam"_pair_meam.html, +"mie/cut"_pair_mie.html, "morse"_pair_morse.html, "peri/lps"_pair_peri.html, "peri/pmb"_pair_peri.html, diff --git a/doc/dihedral_fourier.html b/doc/dihedral_fourier.html index f2c4ace1fb..4c462d4ed1 100644 --- a/doc/dihedral_fourier.html +++ b/doc/dihedral_fourier.html @@ -18,7 +18,7 @@
Examples:
dihedral_style fourier -dihedral_coeff 3 -0.846200 3 0 7.578800 1 0 0.138000 2 -180 +dihedral_coeff 3 -0.846200 3 0.0 7.578800 1 0 0.138000 2 -180.0
Description:
@@ -31,15 +31,15 @@ dihedral_coeff 3 -0.846200 3 0 7.578800 1 0 0.138000 2 -180 the data file or restart files read by the read_data or read_restart commands: -m (integer >=1) -K1 (energy) -n1 (integer >= 0) -d1 (integer value of degrees) -.... -Km (energy) -nm (integer >= 0) -dm (integer value of degrees) -
+Restrictions: diff --git a/doc/dihedral_fourier.txt b/doc/dihedral_fourier.txt index 0473661ad9..05f511368b 100644 --- a/doc/dihedral_fourier.txt +++ b/doc/dihedral_fourier.txt @@ -15,7 +15,7 @@ dihedral_style fourier :pre [Examples:] dihedral_style fourier -dihedral_coeff 3 -0.846200 3 0 7.578800 1 0 0.138000 2 -180 :pre +dihedral_coeff 3 -0.846200 3 0.0 7.578800 1 0 0.138000 2 -180.0 :pre [Description:] @@ -31,11 +31,11 @@ or "read_restart"_read_restart.html commands: m (integer >=1) K1 (energy) n1 (integer >= 0) -d1 (integer value of degrees) +d1 (degrees) .... Km (energy) nm (integer >= 0) -dm (integer value of degrees) +dm (degrees) :ul :line diff --git a/doc/dihedral_quadratic.html b/doc/dihedral_quadratic.html index 07790710fe..8f405a93ae 100644 --- a/doc/dihedral_quadratic.html +++ b/doc/dihedral_quadratic.html @@ -33,9 +33,9 @@ dihedral_coeff 100.0 80.0 the data file or restart files read by the read_data or read_restart commands:
-K (energy) -phi0 (degrees) -
+Restrictions: diff --git a/doc/dihedral_quadratic.txt b/doc/dihedral_quadratic.txt index 339683cafa..54f71d1e1d 100644 --- a/doc/dihedral_quadratic.txt +++ b/doc/dihedral_quadratic.txt @@ -31,7 +31,7 @@ the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) -phi0 (degrees) +phi0 (degrees) :ul :line diff --git a/doc/dump.html b/doc/dump.html index e8c9100717..819a46ce34 100644 --- a/doc/dump.html +++ b/doc/dump.html @@ -308,12 +308,14 @@ minimization converges. Note that this means a dump will not be performed on the initial timestep after the dump command is invoked, if the current timestep is not a multiple of N. This behavior can be changed via the dump_modify first command, which -can be useful if the dump command is invoked after a minimization +can also be useful if the dump command is invoked after a minimization ended on an arbitrary timestep. N can be changed between runs by using the dump_modify every command (not allowed for dcd style). The dump_modify every command also allows a variable to be used to determine the sequence of -timesteps on which dump files are written. +timesteps on which dump files are written. In this mode a dump on the +first timestep of a run will also not be written unless the +dump_modify first command is used.
The specified filename determines how the dump file(s) is written. The default is to write one large text file, which is opened when the diff --git a/doc/dump.txt b/doc/dump.txt index 3ffdf408c1..b81277ea73 100644 --- a/doc/dump.txt +++ b/doc/dump.txt @@ -296,12 +296,14 @@ minimization converges. Note that this means a dump will not be performed on the initial timestep after the dump command is invoked, if the current timestep is not a multiple of N. This behavior can be changed via the "dump_modify first"_dump_modify.html command, which -can be useful if the dump command is invoked after a minimization +can also be useful if the dump command is invoked after a minimization ended on an arbitrary timestep. N can be changed between runs by using the "dump_modify every"_dump_modify.html command (not allowed for {dcd} style). The "dump_modify every"_dump_modify.html command also allows a variable to be used to determine the sequence of -timesteps on which dump files are written. +timesteps on which dump files are written. In this mode a dump on the +first timestep of a run will also not be written unless the +"dump_modify first"_dump_modify.html command is used. The specified filename determines how the dump file(s) is written. The default is to write one large text file, which is opened when the diff --git a/doc/dump_modify.html b/doc/dump_modify.html index 331141c8c0..726eae7fdf 100644 --- a/doc/dump_modify.html +++ b/doc/dump_modify.html @@ -365,16 +365,22 @@ which should be specified as v_name, where name is the variable name.
In this case, the variable is evaluated at the beginning of a run to determine the next timestep at which a dump snapshot will be written -out. On that timestep, the variable will be evaluated again to +out. On that timestep the variable will be evaluated again to determine the next timestep, etc. Thus the variable should return timestep values. See the stagger() and logfreq() and stride() math functions for equal-style variables, as examples of useful functions to use in this context. Other similar math functions could easily be added as options for equal-style -variables. When using the variable option with the -every keyword, you also need to use the first option if you want -an initial snapshot written to the dump file. The every keyword -cannot be used with the dump dcd style. +variables. Also see the next() function, which allows +use of a file-style variable which reads successive values from a +file, each time the variable is evaluated. Used with the every +keyword, if the file contains a list of ascending timesteps, you can +output snapshots whenever you wish. +
+Note that when using the variable option with the every keyword, you +need to use the first option if you want an initial snapshot written +to the dump file. The every keyword cannot be used with the dump +dcd style.
For example, the following commands will write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: @@ -383,6 +389,25 @@ write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: dump 1 all atom 100 tmp.dump dump_modify 1 every v_s first yes +
The following commands would write snapshots at the timesteps listed +in file tmp.times: +
+variable f file tmp.times +variable s equal next(f) +dump 1 all atom 100 tmp.dump +dump_modify 1 every v_s ++
IMPORTANT NOTE: When using a file-style variable with the every +keyword, the file of timesteps must list a first timestep that is +beyond the current timestep (e.g. it cannot be 0). And it must list +one or more timesteps beyond the length of the run you perform. This +is because the dump command will generate an error if the next +timestep it reads from the file is not a value greater than the +current timestep. Thus if you wanted output on steps 0,15,100 of a +100-timestep run, the file should contain the values 15,100,101 and +you should also use the dump_modify first command. Any final value > +100 could be used in place of 101. +
The first keyword determines whether a dump snapshot is written on diff --git a/doc/dump_modify.txt b/doc/dump_modify.txt index e1f2176465..6b820bde40 100644 --- a/doc/dump_modify.txt +++ b/doc/dump_modify.txt @@ -358,16 +358,22 @@ which should be specified as v_name, where name is the variable name. In this case, the variable is evaluated at the beginning of a run to determine the next timestep at which a dump snapshot will be written -out. On that timestep, the variable will be evaluated again to +out. On that timestep the variable will be evaluated again to determine the next timestep, etc. Thus the variable should return timestep values. See the stagger() and logfreq() and stride() math functions for "equal-style variables"_variable.html, as examples of useful functions to use in this context. Other similar math functions could easily be added as options for "equal-style -variables"_variable.html. When using the variable option with the -{every} keyword, you also need to use the {first} option if you want -an initial snapshot written to the dump file. The {every} keyword -cannot be used with the dump {dcd} style. +variables"_variable.html. Also see the next() function, which allows +use of a file-style variable which reads successive values from a +file, each time the variable is evaluated. Used with the {every} +keyword, if the file contains a list of ascending timesteps, you can +output snapshots whenever you wish. + +Note that when using the variable option with the {every} keyword, you +need to use the {first} option if you want an initial snapshot written +to the dump file. The {every} keyword cannot be used with the dump +{dcd} style. For example, the following commands will write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc: @@ -376,6 +382,25 @@ variable s equal logfreq(10,3,10) dump 1 all atom 100 tmp.dump dump_modify 1 every v_s first yes :pre +The following commands would write snapshots at the timesteps listed +in file tmp.times: + +variable f file tmp.times +variable s equal next(f) +dump 1 all atom 100 tmp.dump +dump_modify 1 every v_s :pre + +IMPORTANT NOTE: When using a file-style variable with the {every} +keyword, the file of timesteps must list a first timestep that is +beyond the current timestep (e.g. it cannot be 0). And it must list +one or more timesteps beyond the length of the run you perform. This +is because the dump command will generate an error if the next +timestep it reads from the file is not a value greater than the +current timestep. Thus if you wanted output on steps 0,15,100 of a +100-timestep run, the file should contain the values 15,100,101 and +you should also use the dump_modify first command. Any final value > +100 could be used in place of 101. + :line The {first} keyword determines whether a dump snapshot is written on diff --git a/doc/fix_gcmc.html b/doc/fix_gcmc.html index fe37efc16c..fd5a5c8f3b 100644 --- a/doc/fix_gcmc.html +++ b/doc/fix_gcmc.html @@ -25,7 +25,7 @@
molecule value = no or yes
region value = region-ID
region-ID = ID of region to use as an exchange/move volume
+ maxangle value = maximum molecular rotation angle (degrees)
Examples:
-fix 2 all gcmc 10 1000 1000 2 29494 298.0 -0.5 0.01 -fix 3 all gcmc 10 100 100 1 3456543 3.0 -2.5 0.1 molecule yes -fix 4 all gcmc 1 10 10 1 123456543 300.0 -12.5 1.0 region disk +fix 2 gas gcmc 10 1000 1000 2 29494 298.0 -0.5 0.01 +fix 3 Kr gcmc 10 100 100 1 3456543 3.0 -2.5 0.1 molecule yes maxrot 180 +fix 4 my_gas gcmc 1 10 10 1 123456543 300.0 -12.5 1.0 region diskDescription:
This fix performs grand canonical Monte Carlo (GCMC) exchanges of -particles of the given type with an imaginary ideal gas reservoir at -the specified T and chemical potential (mu ) as discussed in +atoms or molecules of the given type with an imaginary ideal gas reservoir at +the specified T and chemical potential (mu) as discussed in (Frenkel). If used with the fix nvt command, simulations in the grand canonical enemble (muVT, constant chemical potential, constant volume, and constant temperature) can be performed. Specific uses include computing isotherms in microporous materials, or computing vapor-liquid coexistence curves.
-Perform up to X exchanges of particles of the given type between the -simulation domain and the imaginary reservoir every N timesteps. Also -perform M Monte Carlo displacements of particles of the given type -within the simulation domain. M should typically be chosen to be -approximately equal to the expected number of particles of the given -type within the domain, which will result in roughly one MC -translation per particle per MC cycle. +
Perform up to X exchanges of gas atoms or molecules of the given type +between the simulation domain and the imaginary reservoir every N +timesteps. Also perform M Monte Carlo displacements or rotations +(for molecules) of gas of the given type within the simulation domain. +M should typically be chosen to be approximately equal to the expected +number of gas atoms or molecules of the given type within the domain, +which will result in roughly one MC translation per atom or molecule +per MC cycle.
-This fix cannot be used to perform MC displacements of particles other -than the exchanged type. All particles in the simulation domain can be -moved using regular time integration displacements, e.g. via -fix_nvt, resulting in a hybrid GCMC+MD simulation. +
For MC moves of molecular gasses, rotations and translations are each +attempted with 50% probability. For MC moves of atomic gasses, +translations are attempted 100% of the time. For MC exchanges of either +molecular or atomic gasses, deletions and insertions are each attempted +with 50% probability.
-This command may optionally use the region keyword to define an -exchange and move volume. The specified region must have been -previously defined with a region command. It must be -defined with side = in. Insertion attempts occur only within the -specified region. Move and deletion attempt candidates are selected -from particles within the region. If no candidate can be found within -the specified region after randomly selecting candidates 1000 times, -the move or deletion attempt is considered a failure. Moves must start -within the specified region, but may move the particle slightly -outside of the region. +
This fix cannot be used to perform MC insertions of gas atoms or +molecules other than the exchanged type, but MC deletions, translations, +and rotations can be performed on any atom/molecule in the fix group. +All atoms in the simulation domain can be moved using regular time +integration displacements, e.g. via fix_nvt, resulting +in a hybrid GCMC+MD simulation. A smaller-than-usual timestep size +may be needed when running such a hybrid simulation, especially if +the inserted molecules are not well equilibrated. +
+This command may optionally use the region keyword to define an +exchange and move volume. The specified region must have been +previously defined with a region command. It must be +defined with side = in. Insertion attempts occur only within the +specified region. Move and deletion attempt candidates are selected +from gas atoms or molecules within the region. If no candidate can be +found within the specified region after randomly selecting candidates +1000 times, the move or deletion attempt is considered a failure. Moves +must start within the specified region, but may move the atom or molecule +slightly outside of the region.
If used with fix_nvt, the temperature of the imaginary reservoir, T, should be set to be equivalent to the target temperature @@ -95,17 +107,16 @@ will not be in thermal equilibrium with the simulation domain. invoked, so you should not set N to be too small. However, periodic rebuilds are necessary in order to avoid dangerous rebuilds and missed interactions. Specifically, avoid performing so many MC displacements -per timestep that a particle can move beyond the neighbor list skin +per timestep that atoms can move beyond the neighbor list skin distance. See the neighbor command for details.
-When a particle is to be inserted, its coordinates are chosen as a -random position within the current simulation domain, and its velocity -is randomly chosen from the specified temperature distribution given -by T. -
-Exchanged particles have the specified atom type and are assigned to -two groups: the default group "all" and the group specified in the fix -gcmc command (which can also be "all"). +
When an atom or molecule is to be inserted, its center-of-mass +coordinates are chosen as a random position within the current +simulation domain, and new atom velocities are randomly chosen +from the specified temperature distribution given by T. Relative +coordinates for atoms in a molecule are taken from the template +molecule provided by the user. A random initial rotation is used in the +case of molecule insertions.
If the setting for the molecule keyword is no, then only single atoms are exchanged. In this case, you should ensure you do not @@ -116,7 +127,28 @@ non-zero molecule ID, but does not check for this at the time of deletion.
If the setting for the molecule keyword is yes, entire molecules -are exchanged. This feature is not yet supported. +are exchanged. The user must supply a model molecule in the data +file to use as a template for exchanges, and that molecule's number +must be given in the fix GCMC command as the "type" of the exchanged +gas. The model molecule can then be immediately deleted using the +delete_atoms command. +
+Optionally, users may specify the maximum rotation angle for +molecular rotations using the maxangle keyword and specifying +the angle in degrees. The specified angle will apply to all three +Euler angles used internally to define the rotation matrix for +molecular rotations. The max angle can be set to zero, but rotations +will be pointless. Note that the default is ten degrees for each +Euler angle. +
+For atomic gasses, inserted atoms have the specified atom type, but +deleted atoms are any atoms that have been inserted or that belong +to the user-specified fix group. For molecular gasses, exchanged +molecules use the same atom types as in the template molecule +supplied by the user. In both cases, exchanged +atoms/molecules are assigned to two groups: the default group "all" +and the group specified in the fix gcmc command (which can also be +"all").
Use of this fix typically will cause the number of atoms to fluctuate, therefore, you will want to use the @@ -150,10 +182,12 @@ values are the following global cummulative quantities:
The vector values calculated by this fix are "extensive".
@@ -170,9 +204,6 @@ LAMMPS section for more info.Do not set "neigh_modify once yes" or else this fix will never be called. Reneighboring is required.
-You cannot currently exchange charged particles or molecules with a -net charge. -
Only pairwise interactions, as defined by the pair_style command, are included in this calculation. Long-range interactions due to a @@ -183,14 +214,25 @@ this fix. For example, 3-body potentials, such as be used. EAM potentials for metals only include the pair potential portion of the EAM interaction, not the embedding term.
+Can be run in parallel, but aspects of the GCMC part will not scale +well in parallel. Only usable for 3D simulations with orthogonal +simulation cells. +
+Note that very lengthy simulations involving insertions/deletions of +billions of gas molecules may run out of atom or molecule IDs and +trigger an error, so it is better to run multiple shorter-duration +simulations. Likewise, very large molecules have not been tested +and may turn out to be problematic. +
Related commands:
fix_nvt, neighbor, -fix_deposit, fix_evaporate +fix_deposit, fix_evaporate, +delete_atoms
Default:
-The option defaults are molecule = no. +
The option defaults are molecule = no, maxangle = 10.
IMPORTANT NOTE: If your system is periodic in the direction of the +heat flux, then the flux is going in 2 directions. This means the +effective heat flux in one direction is reduced by a factor of 2. You +will see this in the equations for thermal conductivity (kappa) in the +Muller-Plathe paper. LAMMPS is simply tallying kinetic energy which +does not account for whether or not your system is periodic; you must +use the value appropriately to yield a kappa for your system.
IMPORTANT NOTE: After equilibration, if the temperature gradient you observe is not linear, then you are likely swapping energy too diff --git a/doc/fix_thermal_conductivity.txt b/doc/fix_thermal_conductivity.txt index 19fa15be33..653f02e929 100644 --- a/doc/fix_thermal_conductivity.txt +++ b/doc/fix_thermal_conductivity.txt @@ -81,9 +81,17 @@ As described below, the total kinetic energy transferred by these swaps is computed by the fix and can be output. Dividing this quantity by time and the cross-sectional area of the simulation box yields a heat flux. The ratio of heat flux to the slope of the -temperature profile is the thermal conductivity of the fluid, -in appopriate units. See the "Muller-Plathe paper"_#Muller-Plathe for -details. +temperature profile is proportional to the thermal conductivity of the +fluid, in appropriate units. See the "Muller-Plathe +paper"_#Muller-Plathe for details. + +IMPORTANT NOTE: If your system is periodic in the direction of the +heat flux, then the flux is going in 2 directions. This means the +effective heat flux in one direction is reduced by a factor of 2. You +will see this in the equations for thermal conductivity (kappa) in the +Muller-Plathe paper. LAMMPS is simply tallying kinetic energy which +does not account for whether or not your system is periodic; you must +use the value appropriately to yield a kappa for your system. IMPORTANT NOTE: After equilibration, if the temperature gradient you observe is not linear, then you are likely swapping energy too diff --git a/doc/fix_viscosity.html b/doc/fix_viscosity.html index 57e0502b30..5b59cb1cbf 100644 --- a/doc/fix_viscosity.html +++ b/doc/fix_viscosity.html @@ -92,9 +92,17 @@ sense. This is why Nbin is restricted to being an even number. swaps is computed by the fix and can be output. Dividing this quantity by time and the cross-sectional area of the simulation box yields a momentum flux. The ratio of momentum flux to the slope of -the shear velocity profile is the viscosity of the fluid, in -appopriate units. See the Muller-Plathe paper for -details. +the shear velocity profile is proportional to the viscosity of the +fluid, in appropriate units. See the Muller-Plathe +paper for details. +
+IMPORTANT NOTE: If your system is periodic in the direction of the +momentum flux, then the flux is going in 2 directions. This means the +effective momentum flux in one direction is reduced by a factor of 2. +You will see this in the equations for viscosity in the Muller-Plathe +paper. LAMMPS is simply tallying momentum which does not account for +whether or not your system is periodic; you must use the value +appropriately to yield a viscosity for your system.
IMPORTANT NOTE: After equilibration, if the velocity profile you observe is not linear, then you are likely swapping momentum too diff --git a/doc/fix_viscosity.txt b/doc/fix_viscosity.txt index 511c194bbb..8f2fe13810 100644 --- a/doc/fix_viscosity.txt +++ b/doc/fix_viscosity.txt @@ -81,9 +81,17 @@ As described below, the total momentum transferred by these velocity swaps is computed by the fix and can be output. Dividing this quantity by time and the cross-sectional area of the simulation box yields a momentum flux. The ratio of momentum flux to the slope of -the shear velocity profile is the viscosity of the fluid, in -appopriate units. See the "Muller-Plathe paper"_#Muller-Plathe for -details. +the shear velocity profile is proportional to the viscosity of the +fluid, in appropriate units. See the "Muller-Plathe +paper"_#Muller-Plathe for details. + +IMPORTANT NOTE: If your system is periodic in the direction of the +momentum flux, then the flux is going in 2 directions. This means the +effective momentum flux in one direction is reduced by a factor of 2. +You will see this in the equations for viscosity in the Muller-Plathe +paper. LAMMPS is simply tallying momentum which does not account for +whether or not your system is periodic; you must use the value +appropriately to yield a viscosity for your system. IMPORTANT NOTE: After equilibration, if the velocity profile you observe is not linear, then you are likely swapping momentum too diff --git a/doc/improper_fourier.html b/doc/improper_fourier.html index 701eb57aea..ec15488484 100644 --- a/doc/improper_fourier.html +++ b/doc/improper_fourier.html @@ -59,11 +59,4 @@ section for more info on packages.
Default: none
-(Mayo) Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909 -(1990), -