lambda = wavelength of incident radiation (length units)
+
+
type1 type2 ... typeN = chemical symbol of each atom type (see valid options below)
+
+
zero or more keyword/value pairs may be appended
+
+
keyword = Kmax or Zone or dR_Ewald or c or manual or echo
Kmax value = Maximum distance explored from reciprocal space origin
(inverse length units)
@@ -310,6 +314,8 @@
based on the values of the c parameters
echo = flag to provide extra output for debugging purposes
type = atom type (1-Ntypes) of atoms to create (offset for molecule creation)
-
style = box or region or single or random
-
+
+
type = atom type (1-Ntypes) of atoms to create (offset for molecule creation)
+
+
style = box or region or single or random
box args = none
region args = region-ID
@@ -290,10 +290,10 @@ create_atoms type style args keyword values ...
seed = random # seed (positive integer)
region-ID = create atoms within this region, use NULL for entire simulation box
-
-
zero or more keyword/value pairs may be appended
-
keyword = mol or basis or remap or var or set or units
-
+
+
zero or more keyword/value pairs may be appended
+
+
keyword = mol or basis or remap or var or set or units
mol value = template-ID seed
template-ID = ID of molecule template specified in a separate molecule command
@@ -313,6 +313,8 @@ create_atoms type style args keyword values ...
lattice = the geometry is defined in lattice units
box = the geometry is defined in simulation box units
It is easy to add new potentials and their parameters to this
-list. All it typically takes is adding an extract() method to the
-pair_*.cpp file associated with the potential.
+
It is easy to add new pairwise potentials and their parameters
+to this list. All it typically takes is adding an extract() method to
+the pair_*.cpp file associated with the potential.
Some parameters are global settings for the pair style, e.g. the
viscosity setting “mu” for pair_style lubricate.
diff --git a/doc/html/fix_adapt_fep.html b/doc/html/fix_adapt_fep.html
index 376d580536..39a393a8c5 100644
--- a/doc/html/fix_adapt_fep.html
+++ b/doc/html/fix_adapt_fep.html
@@ -287,7 +287,6 @@
one or more keyword value pairs may be appended
keyword = iso or aniso or tri or x or y or z or xy or yz or xz or couple or nreset or vmax or dilate or scaleyz or scalexz or scalexy or fixedpoint
@@ -391,6 +390,8 @@ keyword = iso or aniso or tri or x or y<
fixedpoint values = x y z
x,y,z = perform relaxation dilation/contraction around this point (distance units)
Nevery = invoke controller every this many timesteps
+
+
alpha = coupling constant for PID equation (see units discussion below)
+
+
Kp = proportional gain in PID equation (unitless)
+
+
Ki = integral gain in PID equation (unitless)
+
+
Kd = derivative gain in PID equation (unitless)
+
+
pvar = process variable of form c_ID, c_ID[I], f_ID, f_ID[I], or v_name
c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID
@@ -388,9 +393,11 @@ f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID
v_name = value calculated by an equal-style variable with name
-
-
setpoint = desired value of process variable (same units as process variable)
-
cvar = name of control variable
+
+
setpoint = desired value of process variable (same units as process variable)
nevery = add/subtract heat every this many timesteps
+
+
F = energy flux into the reservoir (energy/time units)
+
+
zero or more keyword/value pairs may be appended to args
+
+
keyword = region or constrain or com or hex
region value = region-ID
region-ID = ID of region (reservoir) atoms must be in for added thermostatting force
@@ -389,6 +392,8 @@
hex value = none
omit the coordinate correction to recover the HEX algorithm
@@ -431,7 +430,7 @@ fix 4 my_gas gcmc 1 10 10 1 123456543 300.0 -12.5 1.0 region disk
This fix performs grand canonical Monte Carlo (GCMC) exchanges of
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,
+(Frenkel). If used with the fix nvt command,
simulations in the grand canonical ensemble (muVT, constant chemical
potential, constant volume, and constant temperature) can be
performed. Specific uses include computing isotherms in microporous
diff --git a/doc/html/fix_gld.html b/doc/html/fix_gld.html
index dec00607b0..9255a8fd02 100644
--- a/doc/html/fix_gld.html
+++ b/doc/html/fix_gld.html
@@ -287,7 +287,6 @@
Tstart,Tstop = desired temperature at start/end of run (temperature units)
+
+
N_k = number of terms in the Prony series representation of the memory kernel
+
+
seed = random number seed to use for white noise (positive integer)
+
+
series = pprony is presently the only available option
+
+
c_k = the weight of the kth term in the Prony series (mass per time units)
+
+
tau_k = the time constant of the kth term in the Prony series (time units)
+
+
zero or more keyword/value pairs may be appended
keyword = frozen or zerofrozen value = no or yes
@@ -392,6 +398,8 @@ keyword = frozen or zerono = do not set total random force to zero
yes = set total random force to zero
Apply a Langevin thermostat as described in (Schneider)
+
Apply a Langevin thermostat as described in (Schneider)
to a group of atoms which models an interaction with a background
implicit solvent. Used with fix nve, this command
performs Brownian dynamics (BD), since the total force on each atom
@@ -452,7 +451,7 @@ dt damp), where Kb is the Boltzmann constant, T is the desired
temperature, m is the mass of the particle, dt is the timestep size,
and damp is the damping factor. Random numbers are used to randomize
the direction and magnitude of this force as described in
-(Dunweg), where a uniform random number is used (instead of
+(Dunweg), where a uniform random number is used (instead of
a Gaussian random number) for speed.
Note that unless you use the omega or angmom keywords, the
thermostat effect of this fix is applied to only the translational
diff --git a/doc/html/fix_langevin_drude.html b/doc/html/fix_langevin_drude.html
index efc3d01574..c57b9c4da5 100644
--- a/doc/html/fix_langevin_drude.html
+++ b/doc/html/fix_langevin_drude.html
@@ -287,7 +287,6 @@
nevery = update the lattice-Boltzmann fluid every this many timesteps
-
LBtype = 1 to use the standard finite difference LB integrator,
-2 to use the LB integrator of Ollila et al.
-
viscosity = the fluid viscosity (units of mass/(time*length)).
-
density = the fluid density.
-
zero or more keyword/value pairs may be appended
-
keyword = setArea or setGamma or scaleGamma or dx or dm or a0 or noise or calcforce or trilinear or D3Q19 or read_restart or write_restart or zwall_velocity or bodyforce or printfluid
nevery = update the lattice-Boltzmann fluid every this many timesteps
+
+
LBtype = 1 to use the standard finite difference LB integrator,
+2 to use the LB integrator of Ollila et al.
+
+
viscosity = the fluid viscosity (units of mass/(time*length)).
+
+
density = the fluid density.
+
+
zero or more keyword/value pairs may be appended
+
+
keyword = setArea or setGamma or scaleGamma or dx or dm or a0 or noise or calcforce or trilinear or D3Q19 or read_restart or write_restart or zwall_velocity or bodyforce or printfluid
setArea values = type node_area
type = atom type (1-N)
@@ -409,6 +414,8 @@
bodyforce values = bodyforcex bodyforcey bodyforcez = the x,y and z components of a constant body force added to the fluid.
printfluid values = N = print the fluid density and velocity at each grid point every N timesteps.
@@ -414,7 +413,7 @@
created to be used in place of that fix, to integrate the equations of
motion of spherical rigid bodies when a lattice-Boltzmann fluid is
present with a user-specified value of the force-coupling constant.
-The fix uses the integration algorithm described in Mackay et al. to update the positions, velocities, and orientations of
+The fix uses the integration algorithm described in Mackay et al. to update the positions, velocities, and orientations of
a set of spherical rigid bodies experiencing velocity dependent
hydrodynamic forces. The spherical bodies are assumed to rotate as
solid, uniform density spheres, with moments of inertia calculated
diff --git a/doc/html/fix_lb_viscous.html b/doc/html/fix_lb_viscous.html
index 4cd85462f8..1fcf7f0e0e 100644
--- a/doc/html/fix_lb_viscous.html
+++ b/doc/html/fix_lb_viscous.html
@@ -286,7 +286,6 @@
method value = pimd or nmpimd or cmdfmass value = scaling factor on mass
@@ -384,6 +385,8 @@
temp value = temperature (temperarate units)
nhc value = Nc = number of chains in Nose-Hoover thermostat
keyword = q or mu or p0 or v0 or e0 or tscale or damp or seedor f_max or N_f or eta or beta or T_init
q value = cell mass-like parameter (mass^2/distance^4 units)
mu value = artificial viscosity (mass/distance/time units)
@@ -395,6 +398,8 @@
beta value = the quantum temperature is updated every beta time steps (positive integer)
T_init value = quantum temperature for the initial state (temperature units)
seed = random number seed to use for white noise (positive integer)
+
+
remaining arguments for fix ttm:
C_e = electronic specific heat (energy/(electron*temperature) units)
rho_e = electronic density (electrons/volume units)
@@ -395,9 +396,8 @@ T_infile = filename to read initial electronic temperature from
N = dump TTM temperatures every this many timesteps, 0 = no dump
T_outfile = filename to write TTM temperatures to (only needed if N > 0)
-
-
remaining arguments for fix ttm/mod:
-
+
+
remaining arguments for fix ttm/mod:
init_file = file with the parameters to TTM
Nx = number of thermal solve grid points in the x-direction (positive integer)
@@ -407,6 +407,8 @@ T_infile = filename to read initial electronic temperature from
N = dump TTM temperatures every this many timesteps, 0 = no dump
T_outfile = filename to write TTM temperatures to (only needed if N > 0)
style = wall/lj93 or wall/lj126 or wall/lj1043 or wall/colloid or wall/harmonic
+
+
one or more face/arg pairs may be appended
+
+
face = xlo or xhi or ylo or yhi or zlo or zhi
args = coord epsilon sigma cutoff
coord = position of wall = EDGE or constant or variable
@@ -402,10 +403,10 @@ args = coord epsilon sigma cutoff
sigma can be a variable (see below)
cutoff = distance from wall at which wall-particle interaction is cut off (distance units)
-
-
zero or more keyword/value pairs may be appended
-
keyword = units or fld
-
+
+
zero or more keyword/value pairs may be appended
+
+
keyword = units or fld
units value = lattice or boxlattice = the wall position is defined in lattice units
@@ -417,6 +418,8 @@ args = coord epsilon sigma cutoff
yes = allow periodic boundary in a wall dimension
no = require non-perioidic boundaries in any wall dimension
keyword = limit/eradius or pressure/evirials or ecplimit/eradius args = none
@@ -541,6 +541,8 @@ keyword = limit/eradius or pressure/evirials or ecp
type = LAMMPS atom type (1 to Ntypes)
element = element symbol (e.g. H, Si)
diff --git a/doc/html/pair_list.html b/doc/html/pair_list.html
index 997155343e..7029f7a656 100644
--- a/doc/html/pair_list.html
+++ b/doc/html/pair_list.html
@@ -560,12 +560,14 @@ an additional interaction within the hybrid/overlay pair style. It
currently supports three interaction styles: a 12-6 Lennard-Jones, a
Morse and a harmonic potential.
The format of the list file is as follows:
-
-
one line per pair of atoms
-
empty lines will be ignored
-
comment text starts with a ‘#’ character
-
line syntax: ID1 ID2 style coeffs cutoff
-
+
+
one line per pair of atoms
+
+
empty lines will be ignored
+
+
comment text starts with a ‘#’ character
+
+
line syntax: ID1 ID2 style coeffs cutoff
ID1=atomIDoffirstatomID2=atomIDofsecondatomstyle=styleofinteraction
@@ -573,6 +575,8 @@ Morse and a harmonic potential.
cutoff=cutoffforinteraction(optional)
+
+
The cutoff parameter is optional. If not specified, the global cutoff
is used.
lj/mdf args = cutoff1 cutoff2
cutoff1 = inner cutoff for the start of the tapering function
@@ -549,6 +549,8 @@ pair_style style args
cutoff1 = inner cutoff for the start of the tapering function
cutoff1 = out cutoff for the end of the tapering function
diff --git a/doc/html/pair_table.html b/doc/html/pair_table.html
index fbf113efe7..d1ee64bef7 100644
--- a/doc/html/pair_table.html
+++ b/doc/html/pair_table.html
@@ -585,7 +585,7 @@ computes the energy or force.
For the bitmap style, the specified N is used to create
interpolation tables that are 2^N in length. The distance R is used
to index into the table via a fast bit-mapping technique due to
-(Wolff), and a linear interpolation is performed between
+(Wolff), and a linear interpolation is performed between
adjacent table values.
The following coefficients must be defined for each pair of atoms
types via the pair_coeff command as in the examples
diff --git a/doc/html/pair_table_rx.html b/doc/html/pair_table_rx.html
index a4fcc0fce5..2f4bd592c8 100644
--- a/doc/html/pair_table_rx.html
+++ b/doc/html/pair_table_rx.html
@@ -467,7 +467,7 @@
diff --git a/doc/html/pair_thole.html b/doc/html/pair_thole.html
index 9aa9b491e1..2b13301e76 100644
--- a/doc/html/pair_thole.html
+++ b/doc/html/pair_thole.html
@@ -586,8 +586,8 @@ short distances by a function
\frac{s_{ij} r_{ij} }{2} \right)
\exp \left( - s_{ij} r_{ij} \right) \end{equation}\]
This function results from an adaptation to point charges
-(Noskov) of the dipole screening scheme originally proposed
-by Thole. The scaling coefficient \(s_{ij}\) is determined
+(Noskov) of the dipole screening scheme originally proposed
+by Thole. The scaling coefficient \(s_{ij}\) is determined
by the polarizability of the atoms, \(\alpha_i\), and by a Thole
damping parameter \(a\). This Thole damping parameter usually takes
a value of 2.6, but in certain force fields the value can depend upon
diff --git a/doc/html/pair_tri_lj.html b/doc/html/pair_tri_lj.html
index 094d285f24..8bf81d1b8c 100644
--- a/doc/html/pair_tri_lj.html
+++ b/doc/html/pair_tri_lj.html
@@ -467,7 +467,7 @@
diff --git a/doc/src/Eqs/fix_ti_rs_force.jpg b/doc/src/Eqs/fix_ti_rs_force.jpg
deleted file mode 100644
index a09bcb66c5..0000000000
Binary files a/doc/src/Eqs/fix_ti_rs_force.jpg and /dev/null differ
diff --git a/doc/src/Eqs/fix_ti_rs_force.tex b/doc/src/Eqs/fix_ti_rs_force.tex
deleted file mode 100644
index 849c0ccc97..0000000000
--- a/doc/src/Eqs/fix_ti_rs_force.tex
+++ /dev/null
@@ -1,11 +0,0 @@
-\documentclass[12pt]{article}
-
-\usepackage{amsmath}
-
-\begin{document}
-
-$$
- F_{\text{total}} = \lambda F_{\text{int}}
-$$
-
-\end{document}
diff --git a/doc/src/Eqs/fix_ti_rs_function_1.jpg b/doc/src/Eqs/fix_ti_rs_function_1.jpg
deleted file mode 100644
index 478dc5781d..0000000000
Binary files a/doc/src/Eqs/fix_ti_rs_function_1.jpg and /dev/null differ
diff --git a/doc/src/Eqs/fix_ti_rs_function_1.tex b/doc/src/Eqs/fix_ti_rs_function_1.tex
deleted file mode 100644
index 033d8d7559..0000000000
--- a/doc/src/Eqs/fix_ti_rs_function_1.tex
+++ /dev/null
@@ -1,9 +0,0 @@
-\documentclass[12pt]{article}
-
-\begin{document}
-
-$$
- \lambda(\tau) = \lambda_i + \tau \left( \lambda_f - \lambda_i \right)
-$$
-
-\end{document}
diff --git a/doc/src/Eqs/fix_ti_rs_function_2.jpg b/doc/src/Eqs/fix_ti_rs_function_2.jpg
deleted file mode 100644
index 4fbfe45c63..0000000000
Binary files a/doc/src/Eqs/fix_ti_rs_function_2.jpg and /dev/null differ
diff --git a/doc/src/Eqs/fix_ti_rs_function_2.tex b/doc/src/Eqs/fix_ti_rs_function_2.tex
deleted file mode 100644
index a1dd377dcc..0000000000
--- a/doc/src/Eqs/fix_ti_rs_function_2.tex
+++ /dev/null
@@ -1,9 +0,0 @@
-\documentclass[12pt]{article}
-
-\begin{document}
-
-$$
- \lambda(\tau) = \frac{\lambda_i}{1 + \tau \left( \frac{\lambda_i}{\lambda_f} - 1 \right)}
-$$
-
-\end{document}
diff --git a/doc/src/Eqs/fix_ti_rs_function_3.jpg b/doc/src/Eqs/fix_ti_rs_function_3.jpg
deleted file mode 100644
index 94ab0f468c..0000000000
Binary files a/doc/src/Eqs/fix_ti_rs_function_3.jpg and /dev/null differ
diff --git a/doc/src/Eqs/fix_ti_rs_function_3.tex b/doc/src/Eqs/fix_ti_rs_function_3.tex
deleted file mode 100644
index 2d2790fa97..0000000000
--- a/doc/src/Eqs/fix_ti_rs_function_3.tex
+++ /dev/null
@@ -1,9 +0,0 @@
-\documentclass[12pt]{article}
-
-\begin{document}
-
-$$
- \lambda(\tau) = \frac{\lambda_i}{ 1 + \log_2(1+\tau) \left( \frac{\lambda_i}{\lambda_f} - 1 \right)}
-$$
-
-\end{document}
diff --git a/doc/src/Eqs/fix_ti_spring_force.jpg b/doc/src/Eqs/fix_ti_spring_force.jpg
index 347102b3e7..584535a1bc 100644
Binary files a/doc/src/Eqs/fix_ti_spring_force.jpg and b/doc/src/Eqs/fix_ti_spring_force.jpg differ
diff --git a/doc/src/Eqs/fix_ti_spring_force.tex b/doc/src/Eqs/fix_ti_spring_force.tex
index 0acd0e54ae..356f7d3ccc 100644
--- a/doc/src/Eqs/fix_ti_spring_force.tex
+++ b/doc/src/Eqs/fix_ti_spring_force.tex
@@ -5,7 +5,7 @@
\begin{document}
$$
- F_{\text{total}} = \left( 1-\lambda \right) F_{\text{solid}} + \lambda F_{\text{harm}}
+ F = \left( 1-\lambda \right) F_{\text{solid}} + \lambda F_{\text{harm}}
$$
\end{document}
diff --git a/doc/src/Eqs/fix_ti_spring_function_1.jpg b/doc/src/Eqs/fix_ti_spring_function_1.jpg
index 8d3c9a78e3..ef2698f34b 100644
Binary files a/doc/src/Eqs/fix_ti_spring_function_1.jpg and b/doc/src/Eqs/fix_ti_spring_function_1.jpg differ
diff --git a/doc/src/Eqs/fix_ti_spring_function_2.jpg b/doc/src/Eqs/fix_ti_spring_function_2.jpg
index 96a17e63e6..6f12b90c78 100644
Binary files a/doc/src/Eqs/fix_ti_spring_function_2.jpg and b/doc/src/Eqs/fix_ti_spring_function_2.jpg differ
diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt
index f4cbb840f9..3e822bd968 100644
--- a/doc/src/Manual.txt
+++ b/doc/src/Manual.txt
@@ -1,7 +1,7 @@
LAMMPS Users Manual
-
+
@@ -21,7 +21,7 @@
LAMMPS Documentation :c,h3
-15 Sep 2016 version :c,h4
+20 Sep 2016 version :c,h4
Version info: :h4
diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt
index bbca4c49b3..3e18037a83 100644
--- a/doc/src/Section_commands.txt
+++ b/doc/src/Section_commands.txt
@@ -662,7 +662,6 @@ package"_Section_start.html#start_3.
"smd/setvel"_fix_smd_setvel.html,
"smd/wall/surface"_fix_smd_wall_surface.html,
"temp/rescale/eff"_fix_temp_rescale_eff.html,
-"ti/rs"_fix_ti_rs.html,
"ti/spring"_fix_ti_spring.html,
"ttm/mod"_fix_ttm.html :tb(c=6,ea=c)
diff --git a/doc/src/fix_adapt.txt b/doc/src/fix_adapt.txt
index 712626fd25..a35357a7ec 100644
--- a/doc/src/fix_adapt.txt
+++ b/doc/src/fix_adapt.txt
@@ -108,6 +108,7 @@ meaning of these parameters:
"coul/cut"_pair_coul.html: scale: type pairs:
"coul/debye"_pair_coul.html: scale: type pairs:
"coul/long"_pair_coul.html: scale: type pairs:
+"eam, eam/alloy, eam/fs"_pair_eam.html: scale: type pairs:
"lj/cut"_pair_lj.html: epsilon,sigma: type pairs:
"lj/expand"_pair_lj_expand.html: epsilon,sigma,delta: type pairs:
"lj/sf/dipole/sf"_pair_dipole.html: epsilon,sigma,scale: type pairs:
@@ -117,9 +118,9 @@ meaning of these parameters:
"soft"_pair_soft.html: a: type pairs:
"kim"_pair_kim.html: PARAM_FREE_*:i,j,...: global :tb(c=3,s=:)
-NOTE: It is easy to add new potentials and their parameters to this
-list. All it typically takes is adding an extract() method to the
-pair_*.cpp file associated with the potential.
+NOTE: It is easy to add new pairwise potentials and their parameters
+to this list. All it typically takes is adding an extract() method to
+the pair_*.cpp file associated with the potential.
Some parameters are global settings for the pair style, e.g. the
viscosity setting "mu" for "pair_style lubricate"_pair_lubricate.html.
diff --git a/doc/src/fix_ti_rs.txt b/doc/src/fix_ti_rs.txt
deleted file mode 100755
index 5650ba5e41..0000000000
--- a/doc/src/fix_ti_rs.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
-
-:link(lws,http://lammps.sandia.gov)
-:link(ld,Manual.html)
-:link(lc,Section_commands.html#comm)
-
-:line
-
-fix ti/rs command :h3
-
-[Syntax:]
-
-fix ID group-ID ti/rs lambda_initial lambda_final t_switch t_equil keyword value ... :pre
-
-ID, group-ID are documented in "fix"_fix.html command :ulb,l
-ti/rs = style name of this fix command :l
-lambda_initial/lambda_final = initial/final values of the coupling parameter :l
-t_switch/t_equil = number of steps of the switching/equilibration procedure :l
-keyword = {function} :l
- {function} value = function-ID
- function-ID = ID of the switching function (1, 2 or 3) :pre
-:ule
-
-[Example:]
-
-fix ref all ti/rs 50.0 2000 1000
-fix vf vacancy ti/rs 10.0 70000 50000 function 2 :pre
-
-[Description:]
-
-This fix allows you to compute the free energy temperature dependence
-by performing a thermodynamic integration procedure known as
-Reversible Scaling "(de Koning99,"_#deKoning99 "de
-Koning00a)"_#deKoning00a. The thermodynamic integration is performed
-using the nonequilibrium method of Adiabatic Switching
-"(Watanabe,"_#Watanabe "de Koning96)"_#deKoning96.
-
-The forces on the atoms are dynamically scaled during the simulation,
-the rescaling is done in the following manner:
-
-:c,image(Eqs/fix_ti_rs_force.jpg)
-
-where F_int is the total force on the atoms due to the interatomic
-potential and lambda is the coupling parameter of the thermodynamic
-integration.
-
-The fix acts as follows: during the first {t_equil} steps after the
-fix is defined the value of lambda is {lambda_initial} , this is the
-period to equilibrate the system in the lambda = {lambda_initial}
-state. After this the value of lambda changes continuously from
-{lambda_initial} to {lambda_final} according to the function defined
-using the keyword {function} (described below), this is done in
-{t_switch} steps. Then comes the second equilibration period of
-{t_equil} to equilibrate the system in the lambda = {lambda_final}
-state. After that the switching back to the lambda = {lambda_initial}
-state is done using {t_switch} timesteps and following the same
-switching function. After this period the value of lambda is kept
-equal to {lambda_initial} indefinitely or until a "unfix"_unfix.html
-erase the fix.
-
-The description of thermodynamic integration in both directions is
-done in "de Koning00b"_#deKoning00b, the main reason is to try to
-eliminate the dissipated heat due to the nonequilibrium process.
-
-The {function} keyword allows the use of three different switching
-rates. The option {1} results in a constant rescaling where the lambda
-parameter changes at a constant rate during the switching time
-according to the switching function
-
-:c,image(Eqs/fix_ti_rs_function_1.jpg)
-
-where tau is the scaled time variable t/t_switch. This switching
-function has the characteristic that the temperature scaling is faster
-at temperatures closer to the final temperature of the procedure. The
-option number {2} performs the switching at a rate defined by the
-following switching function
-
-:c,image(Eqs/fix_ti_rs_function_2.jpg)
-
-This switching function has the characteristic that the temperature
-scaling occurs at a constant rate during all the procedure. The option
-number {3} performs the switching at a rate defined by the following
-switching function
-
-:c,image(Eqs/fix_ti_rs_function_3.jpg)
-
-This switching function has the characteristic that the temperature
-scaling is faster at temperatures closer to the initial temperature of
-the procedure.
-
-An example script using this command is provided in the
-examples/USER/misc/ti directory.
-
-[Restart, fix_modify, output, run start/stop, minimize info:]
-
-No information about this fix is written to "binary restart
-files"_restart.html.
-
-This fix computes a global vector quantitie which can be accessed by
-various "output commands"_Section_howto.html#howto_15. The vector has
-2 positions, the first one is the coupling parameter lambda and the
-second one is the time derivative of lambda. The scalar and vector
-values calculated by this fix are "extensive".
-
-No parameter of this fix can be used with the {start/stop} keywords of
-the "run"_run.html command.
-
-The forces due to this fix are imposed during an energy minimization,
-invoked by the "minimize"_minimize.html command.
-
-[Related commands:]
-
-"fix ti/spring"_fix_ti_spring.html
-
-[Restrictions:]
-
-This command is part of the USER-MISC package. It is only enabled if
-LAMMPS was built with those packages. See the "Making
-LAMMPS"_Section_start.html#start_3 section for more info.
-
-[Default:]
-
-The keyword default is function = 1.
-
-:line
-
-:link(deKoning99)
-[(de Koning 99)] M. de Koning, A. Antonelli and S. Yip, Phys Rev Lett, 83, 3973 (1999).
-
-:link(Watanabe)
-[(Watanabe)] M. Watanabe and W. P. Reinhardt, Phys Rev Lett, 65, 3301 (1990).
-
-:link(deKoning96)
-[(de Koning 96)] M. de Koning and A. Antonelli, Phys Rev E, 53, 465 (1996).
-
-:link(deKoning00a)
-[(de Koning 00a)] M. de Koning, A. Antonelli and S. Yip, J Chem Phys, 115, 11025 (2000).
-
-:link(deKoning00b)
-[(de Koning 00b)] M. de Koning et al., Computing in Science & Engineering, 2, 88 (2000).
diff --git a/doc/src/fix_ti_spring.txt b/doc/src/fix_ti_spring.txt
index 2fdc352d50..23128042c0 100755
--- a/doc/src/fix_ti_spring.txt
+++ b/doc/src/fix_ti_spring.txt
@@ -10,12 +10,13 @@ fix ti/spring command :h3
[Syntax:]
-fix ID group-ID ti/spring K t_switch t_equil keyword value ... :pre
+fix ID group-ID ti/spring k t_s t_eq keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
ti/spring = style name of this fix command :l
-K = spring constant (force/distance units) :l
-t_switch/t_equil = number of steps of the switching/equilibration procedure :l
+k = spring constant (force/distance units) :l
+t_eq = number of steps for the equilibration procedure :l
+t_s = number of steps for the switching procedure :l
zero or more keyword/value pairs may be appended to args :l
keyword = {function} :l
{function} value = function-ID
@@ -24,74 +25,87 @@ keyword = {function} :l
[Example:]
-fix ref all ti/spring 50.0 2000 1000 function 2 :pre
+fix 1 all ti/spring 50.0 2000 1000 function 2 :pre
[Description:]
-This fix allows you to compute the free energy of solids by performing
-a thermodynamic integration between the solid of interest and an
-Einstein crystal "(Frenkel)"_#Frenkel. The thermodynamic integration
-is performed using the nonequilibrium method of Adiabatic Switching
-"(Watanabe,"_#Watanabe "de Koning96)"_#deKoning96.
+This fix allows you to compute the free energy of crystalline solids
+by performing a nonequilibrium thermodynamic integration between the
+solid of interest and an Einstein crystal. A detailed explanation of
+how to use this command and choose its parameters for optimal
+performance and accuracy is given in the paper by
+"Freitas"_#Freitas. The paper also presents a short summary of the
+theory of nonequilibrium thermodynamic integrations.
-A spring force is applied independently to each atom in the group to
-tether it to its initial position. The initial position for each atom
-is its location at the time the fix command was issued. More details
-about the springs are available in "fix
-spring/self"_fix_spring_self.html. The forces on the atoms are
-dynamically scaled during the simulation, the rescaling is done in the
-following manner:
+The thermodynamic integration procedure is performed by rescaling the
+force on each atom. Given an atomic configuration the force (F) on
+each atom is given by
:c,image(Eqs/fix_ti_spring_force.jpg)
-where F_harm is the force due to the springs, F_solid is the total
-force on the atoms due to the interatomic potential and lambda is the
-coupling parameter of the thermodynamic integration.
+where F_solid is the force that acts on an atom due to an interatomic
+potential ({e.g.} EAM potential), F_harm is the force due to the
+Einstein crystal harmonic spring, and lambda is the coupling parameter
+of the thermodynamic integration. An Einstein crystal is a solid where
+each atom is attached to its equilibrium position by a harmonic spring
+with spring constant {k}. With this fix a spring force is applied
+independently to each atom in the group defined by the fix to tether
+it to its initial position. The initial position of each atom is its
+position at the time the fix command was issued.
-The fix acts as follows: during the first {t_equil} steps after the
-fix is defined the value of lambda is zero, this is the period to
+The fix acts as follows: during the first {t_eq} steps after the fix
+is defined the value of lambda is zero. This is the period to
equilibrate the system in the lambda = 0 state. After this the value
-of lambda changes continuously from 0 to 1 according to the function
-defined using the keyword {function} (described below), this is done
-in {t_switch} steps. Then comes the second equilibration period of
-{t_equil} to equilibrate the system in the lambda = 1 state. After
-that the switching back to the lambda = 0 state is made using
-{t_switch} timesteps and following the same switching function. After
-this period the value of lambda is kept equal to zero and the fix has
-no action in the dynamics of the system anymore.
+of lambda changes dynamically during the simulation from 0 to 1
+according to the function defined using the keyword {function}
+(described below), this switching from lambda from 0 to 1 is done in
+{t_s} steps. Then comes the second equilibration period of {t_eq} to
+equilibrate the system in the lambda = 1 state. After that, the
+switching back to the lambda = 0 state is made using {t_s} timesteps
+and following the same switching function. After this period the value
+of lambda is kept equal to zero and the fix has no other effect on the
+dynamics of the system.
-The description of thermodynamic integration in both directions is
-done in "de Koning97"_#deKoning97, the main reason is to try to
-eliminate the dissipated heat due to the nonequilibrium process.
+The processes described above is known as nonequilibrium thermodynamic
+integration and is has been shown ("Freitas"_#Freitas) to present a
+much superior efficiency when compared to standard equilibrium
+methods. The reason why the switching it is made in both directions
+(potential to Einstein crystal and back) is to eliminate the
+dissipated heat due to the nonequilibrium process. Further details
+about nonequilibrium thermodynamic integration and its implementation
+in LAMMPS is available in "Freitas"_#Freitas.
-The {function} keyword allows the use of two different switching
-rates, the option {1} results in a constant rescaling where the lambda
-parameter changes at a constant rate during the switching time
-according to the switching function
+The {function} keyword allows the use of two different lambda
+paths. Option {1} results in a constant rate of change of lambda with
+time:
:c,image(Eqs/fix_ti_spring_function_1.jpg)
-where tau is the scaled time variable t/t_switch. The option number
-{2} performs the switching at a rate defined by the following
-switching function
+where tau is the scaled time variable {t/t_s}. The option {2} performs
+the lambda switching at a rate defined by the following switching
+function
:c,image(Eqs/fix_ti_spring_function_2.jpg)
This function has zero slope as lambda approaches its extreme values
-(0 and 1), according to ("de Koning96)"_#deKoning96 this results in
+(0 and 1), according to "de Koning"_#deKoning96 this results in
smaller fluctuations on the integral to be computed on the
-thermodynamic integration.
+thermodynamic integration. The use of option {2} is recommended since
+it results in better accuracy and less dissipation without any
+increase in computational resources cost.
-NOTE: It is importante to keep the center of mass fixed during the
-thermodynamic integration, a non-zero total velocity will result in
-divergencies during the integration due to the fact that the atoms are
-'attatched' to its equilibrium positions by the Einstein
-crystal. Check the option {zero} of "fix langevin"_fix_langevin.html
-and "velocity"_velocity.html. The use of the Nose-Hoover thermostat
-("fix nvt"_fix_nh.html) is NOT recommended due to its well documented
-issues with the canonical sampling of harmonic degrees of freedom
-(notice that the {chain} option will NOT solve this problem). The
-Langevin thermostat ("fix langevin"_fix_langevin.html") works fine.
+NOTE: As described in "Freitas"_#Freitas, it is important to keep the
+center-of-mass fixed during the thermodynamic integration. A nonzero
+total velocity will result in divergences during the integration due
+to the fact that the atoms are 'attached' to their equilibrium
+positions by the Einstein crystal. Check the option {zero} of "fix
+langevin"_fix_langevin_html and "velocity"_velocity.html. The use of
+the Nose-Hoover thermostat ("fix nvt"_fix_nvt.html) is {NOT}
+recommended due to its well documented issues with the canonical
+sampling of harmonic degrees of freedom (notice that the {chain}
+option will {NOT} solve this problem). The Langevin thermostat ("fix
+langevin"_fix_langevin.html") correctly thermostats the system and we
+advise its usage with ti/spring command.
[Restart, fix_modify, output, run start/stop, minimize info:]
@@ -108,9 +122,9 @@ potential energy as part of "thermodynamic output"_thermo_style.html.
This fix computes a global scalar and a global vector quantities which
can be accessed by various "output
-commands"_Section_howto.html#howto_15. The scalar is an energy which
+commands"_Section_howto.html#howto_15. The scalar is an energy which
is the sum of the spring energy for each atom, where the per-atom
-energy is 0.5 * K * r^2. The vector has 2 positions, the first one is
+energy is 0.5 * k * r^2. The vector has 2 positions, the first one is
the coupling parameter lambda and the second one is the time
derivative of lambda. The scalar and vector values calculated by this
fix are "extensive".
@@ -126,18 +140,11 @@ total potential energy of the system (the quantity being minimized),
you MUST enable the "fix modify"_fix_modify.html {energy} option for
this fix.
-An example script using this command is provided in the
-examples/USER/misc/ti directory.
-
[Related commands:]
-"fix spring"_fix_spring.html, "fix ti/rs"_fix_ti_rs.html
+"fix spring"_fix_spring.html, "fix adapt"_fix_adapt.html
-[Restrictions:]
-
-This command is part of the USER-MISC package. It is only enabled if
-LAMMPS was built with those packages. See the "Making
-LAMMPS"_Section_start.html#start_3 section for more info.
+[Restrictions:] none
[Default:]
@@ -145,16 +152,9 @@ The keyword default is function = 1.
:line
-:link(Frenkel)
-[(Frenkel)] Daan Frenkel and Anthony J. C. Ladd, J. Chem. Phys. 81, 3188
-(1984).
-
-:link(Watanabe)
-[(Watanabe)] M. Watanabe and W. P. Reinhardt, Phys Rev Lett, 65, 3301 (1990).
+:link(Freitas)
+[(Freitas)] Freitas, Asta, and de Koning, Computational Materials
+Science, 112, 333 (2016).
:link(deKoning96)
-[(de Koning 96)] M. de Koning and A. Antonelli, Phys Rev E, 53, 465 (1996).
-
-:link(deKoning97)
-[(de Koning 97)] M. de Koning and A. Antonelli, Phys Rev B, 55, 735 (1997).
-
+[(de Koning)] de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
diff --git a/doc/src/region.txt b/doc/src/region.txt
index 2dd7ff975a..99417122ba 100644
--- a/doc/src/region.txt
+++ b/doc/src/region.txt
@@ -47,7 +47,7 @@ style = {delete} or {block} or {cone} or {cylinder} or {plane} or {prism} or {sp
N = # of regions to follow, must be 2 or greater
reg-ID1,reg-ID2, ... = IDs of regions to intersect :pre
zero or more keyword/arg pairs may be appended :l
-keyword = {side} or {units} or {move} or {rotate} :l
+keyword = {side} or {units} or {move} or {rotate} or {open} :l
{side} value = {in} or {out}
{in} = the region is inside the specified geometry
{out} = the region is outside the specified geometry
@@ -59,7 +59,9 @@ keyword = {side} or {units} or {move} or {rotate} :l
{rotate} args = v_theta Px Py Pz Rx Ry Rz
v_theta = equal-style variable for rotaton of region over time (in radians)
Px,Py,Pz = origin for axis of rotation (distance units)
- Rx,Ry,Rz = axis of rotation vector :pre
+ Rx,Ry,Rz = axis of rotation vector
+ {open} value = integer from 1-6 corresponding to face index (see below)
+:pre
accelerated styles (with same args) = {block/kk} :l
:ule
@@ -71,7 +73,10 @@ region 2 sphere 0.0 0.0 0.0 5 side out
region void cylinder y 2 3 5 -5.0 EDGE units box
region 1 prism 0 10 0 10 0 10 2 0 0
region outside union 4 side1 side2 side3 side4
-region 2 sphere 0.0 0.0 0.0 5 side out move v_left v_up NULL :pre
+region 2 sphere 0.0 0.0 0.0 5 side out move v_left v_up NULL
+region openbox block 0 10 0 10 0 10 open 5 open 6 units box
+region funnel cone z 10 10 2 5 0 10 open 1 units box :pre
+
[Description:]
@@ -181,7 +186,7 @@ functions, and include "thermo_style"_thermo_style.html command
keywords for the simulation box parameters and timestep and elapsed
time. Thus it is easy to specify a time-dependent radius.
-See "Section 6.12"_Section_howto.html#howto_12 of the doc pages
+See "Section_howto 12"_Section_howto.html#howto_12 of the doc pages
for a geometric description of triclinic boxes, as defined by LAMMPS,
and how to transform these parameters to and from other commonly used
triclinic representations.
@@ -192,7 +197,7 @@ consisting of the volume that is common to all the listed regions.
NOTE: The {union} and {intersect} regions operate by invoking methods
from their list of sub-regions. Thus you cannot delete the
-sub-regions after defining the {union} or {intersection} region.
+sub-regions after defining a {union} or {intersection} region.
:line
@@ -243,8 +248,7 @@ to yz. :l
For style {sphere}, the lattice spacing in dimensions x,y,z are
applied to the sphere center x,y,z. The spacing in dimension x is
-applied to the sphere radius. :l
-:ule
+applied to the sphere radius. :l,ule
:line
@@ -303,10 +307,61 @@ point of the {rotate} keyword.
:line
+The {open} keyword can be used (multiple times) to indicate that one
+or more faces of the region are ignored for purposes of particle/wall
+interactions. This keyword is only relevant for regions used by the
+{fix wall/region} and {fix wall/gran/region} commands. It can be used
+to create "open" containers where only some of the region faces are
+walls. For example, a funnel can be created with a {cone} style
+region that has an open face at the smaller radius for particles to
+flow out, or at the larger radius for pouring particles into the cone,
+or both.
+
+Note that using the {open} keyword partly overrides the {side}
+keyword, since both exterior and interior surfaces of an open region
+are tested for particle contacts. The exception to this is a {union}
+or {intersect} region which includes an open sub-region. In that case
+the {side} keyword is still used to define the union/intersect region
+volume, and the {open} settings are only applied to the individual
+sub-regions that use them.
+
+The indices specified as part of the {open} keyword have the following
+meanings:
+
+For style {block}, indices 1-6 correspond to the xlo, xhi, ylo, yhi,
+zlo, zhi surfaces of the block. I.e. 1 is the yz plane at x = xlo, 2
+is the yz-plane at x = xhi, 3 is the xz plane at y = ylo, 4 is the xz
+plane at y = yhi, 5 is the xy plane at z = zlo, 6 is the xy plane at z
+= zhi). In the second-to-last example above, the region is a box open
+at both xy planes.
+
+For style {prism}, values 1-6 have the same mapping as for style
+{block}. I.e. in an untilted {prism}, {open} indices correspond to
+the xlo, xhi, ylo, yhi, zlo, zhi surfaces.
+
+For style {cylinder}, index 1 corresponds to the flat end cap at the
+low coordinate along the cylinder axis, index 2 corresponds to the
+high-coordinate flat end cap along the cylinder axis, and index 3 is
+the curved cylinder surface. For example, a {cylinder} region with
+{open 1 open 2} keywords will be open at both ends (e.g. a section of
+pipe), regardless of the cylinder orientation.
+
+For style {cone}, the mapping is the same as for style {cylinder}.
+Index 1 is the low-coordinate flat end cap, index 2 is the
+high-coordinate flat end cap, and index 3 is the curved cone surface.
+In the last example above, a {cone} region is defined along the z-axis
+that is open at the zlo value (e.g. for use as a funnel).
+
+For all other styles, the {open} keyword is ignored. As inidcated
+above, this includes the {intersect} and {union} regions, though their
+sub-regions can be defined with the {open} keyword.
+
+:line
+
Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in
-"Section 5"_Section_accelerate.html of the manual. The
+"Section_accelerate"_Section_accelerate.html of the manual. The
accelerated styles take the same arguments and should produce the same
results, except for round-off and precision issues.
@@ -323,7 +378,7 @@ by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can
use the "suffix"_suffix.html command in your input script.
-See "Section 5"_Section_accelerate.html of the manual for
+See "Section_accelerate"_Section_accelerate.html of the manual for
more instructions on how to use the accelerated styles effectively.
:line
diff --git a/doc/utils/converters/.gitignore b/doc/utils/converters/.gitignore
index 3fafd07fbe..11041c7834 100644
--- a/doc/utils/converters/.gitignore
+++ b/doc/utils/converters/.gitignore
@@ -1,2 +1 @@
-__pycache__
*.egg-info
diff --git a/examples/USER/misc/ti/in.ti_rs b/examples/USER/misc/ti/in.ti_rs
deleted file mode 100755
index 033fa1e579..0000000000
--- a/examples/USER/misc/ti/in.ti_rs
+++ /dev/null
@@ -1,64 +0,0 @@
-# Rodrigo Freitas - rodrigohb@gmail.com
-
-
-#-------------------------- Initial Setup -------------------------------------#
- units metal
- atom_modify map array
-#------------------------------------------------------------------------------#
-
-
-#-------------------------- Atomic Setup --------------------------------------#
- lattice sc 10.0
- region my_region block 0 8 0 8 0 8
- create_box 1 my_region
- create_atoms 1 box
-
- mass * 50.0
- atom_modify sort 0 0
-#------------------------------------------------------------------------------#
-
-
-#---------------------- Thermostat & Barostat ---------------------------------#
- fix f1 all nve
- fix f2 all spring/self 10.0
- fix f3 all ti/rs 1.0 0.5 2000 1000 function 2
- fix f4 all langevin 100.0 100.0 0.5 1230917 zero yes
-#------------------------------------------------------------------------------#
-
-
-#------------------ Computes, variables & modifications -----------------------#
- compute Tcm all temp/com
- fix_modify f4 temp Tcm
-
- variable step equal step
- variable U equal f_f2/atoms
- variable lambda equal f_f3[1]
- variable dlambda equal f_f3[2]
-#------------------------------------------------------------------------------#
-
-
-#------------------------- Thermo stuff ---------------------------------------#
- thermo 0
- timestep 0.001
-#------------------------------------------------------------------------------#
-
-
-#------------------------- Running the Simulation -----------------------------#
- velocity all create 200.0 8128481 mom yes rot yes dist gaussian
-
- # Forward.
- run 999
- fix f5 all print 1 "${step} ${U} ${lambda} ${dlambda}" &
- screen no file forward_rs.dat &
- title '# step U lambda dlambda'
- run 2001
- unfix f5
-
- # Backward.
- run 999
- fix f5 all print 1 "${step} ${U} ${lambda} ${dlambda}" &
- screen no file backward_rs.dat &
- title '# step U lambda dlmabda'
- run 2001
- unfix f5
-#------------------------------------------------------------------------------#
diff --git a/examples/USER/misc/ti/in.ti_spring b/examples/USER/misc/ti/in.ti_spring
index 643ed186d0..2e853bc5c3 100755
--- a/examples/USER/misc/ti/in.ti_spring
+++ b/examples/USER/misc/ti/in.ti_spring
@@ -1,64 +1,59 @@
-# Rodrigo Freitas - rodrigohb@gmail.com
+# Rodrigo Freitas - rodrigof@berkeley.edu
+#
+# Description: nonequilibrium thermodynamic integration. Further details in:
+# R. Freitas, M. Asta, and M. de Koning, Computational Materials Science, (2016)
+# http://dx.doi.org/10.1016/j.commatsci.2015.10.050
-#-------------------------- Initial Setup -------------------------------------#
+#--------------------------- System setup -------------------------------------#
units metal
- atom_modify map array
-#------------------------------------------------------------------------------#
-
-
-#-------------------------- Atomic Setup --------------------------------------#
- lattice sc 10.0
- region my_region block 0 8 0 8 0 8
- create_box 1 my_region
+ lattice fcc 3.621
+ region sim_box block 0 4 0 4 0 4
+ create_box 1 sim_box
create_atoms 1 box
- mass * 50.0
- atom_modify sort 0 0
+ pair_style eam/alloy
+ pair_coeff * * ../../../../potentials/Cu_mishin1.eam.alloy Cu
#------------------------------------------------------------------------------#
-#---------------------- Thermostat & Barostat ---------------------------------#
+#---------------------- Simulation setup --------------------------------------#
+ # The order of the fix commands is important: thermostat AFTER thermodynamic integration force interpolation.
fix f1 all nve
- fix f2 all spring/self 10.0
- fix f3 all ti/spring 50.0 2000 1000 function 2
- fix f4 all langevin 100.0 100.0 0.5 1230917 zero yes
-#------------------------------------------------------------------------------#
+ fix f2 all ti/spring 3.728 2000 1000 function 2
+ fix f3 all langevin 100.0 100.0 0.1 666 zero yes
+ # Compute temperature using center-of-mass coordinates.
+ compute c1 all temp/com
+ fix_modify f3 temp c1
-#------------------ Computes, variables & modifications -----------------------#
- compute Tcm all temp/com
- fix_modify f4 temp Tcm
-
+ # Output variables.
variable step equal step
- variable dU equal (f_f2-f_f3)/atoms
- variable lambda equal f_f3[1]
- variable dlambda equal f_f3[2]
+ variable dU equal pe-f_f2 # Used on the integration.
+ variable lambda equal f_f2[1] # For reference or integration.
+ variable dlambda equal f_f2[2] # For reference or integration.
+
+ # Thermo output.
+ thermo_style custom step pe
+ thermo 100
#------------------------------------------------------------------------------#
-#------------------------- Thermo stuff ---------------------------------------#
- thermo 0
- timestep 0.001
-#------------------------------------------------------------------------------#
-
-
-#------------------------- Running the Simulation -----------------------------#
- velocity all create 200.0 8128481 mom yes rot yes dist gaussian
-
- # Forward.
- run 999
- fix f5 all print 1 "${step} ${dU} ${lambda} ${dlambda}" &
- screen no file forward_fl.dat &
- title '# step dU lambda dlambda'
- run 2001
- unfix f5
-
- # Backward.
- run 999
- fix f5 all print 1 "${step} ${dU} ${lambda} ${dlambda}" &
- screen no file backward_fl.dat &
- title '# step dU lambda dlambda'
- run 2001
- unfix f5
+#------------------------- Running the simulation -----------------------------#
+ # Setup initial velocities to accelerate equilibration.
+ velocity all create 200.0 9999 mom yes rot yes dist gaussian
+
+ # Forward nonequilibrium thermodynamic integration.
+ run 1000 # Equilibrate system at lambda = 0.
+ fix f4 all print 1 "${step} ${dU} ${lambda} ${dlambda}" &
+ screen no file forward.dat title '# step dU lambda dlambda'
+ run 2000 # Lambda switching: 0 -> 1.
+ unfix f4
+
+ # Backward nonequilibrium thermodynamic integration.
+ run 1000 # Equilibrate system at lambda = 1.
+ fix f4 all print 1 "${step} ${dU} ${lambda} ${dlambda}" &
+ screen no file backward.dat title '# step dU lambda dlambda'
+ run 2000 # Lambda switching: 1 -> 0.
+ unfix f4
#------------------------------------------------------------------------------#
diff --git a/python/.gitignore b/python/.gitignore
index e069c0ec3b..796b96d1c4 100644
--- a/python/.gitignore
+++ b/python/.gitignore
@@ -1,3 +1 @@
-*.pyc
-__pycache__
-build
+/build
diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp
index dc6727e1d5..e2f2436a33 100644
--- a/src/MANYBODY/pair_eam.cpp
+++ b/src/MANYBODY/pair_eam.cpp
@@ -85,6 +85,7 @@ PairEAM::~PairEAM()
type2frho = NULL;
memory->destroy(type2rhor);
memory->destroy(type2z2r);
+ memory->destroy(scale);
}
if (funcfl) {
@@ -280,6 +281,7 @@ void PairEAM::compute(int eflag, int vflag)
// psip needs both fp[i] and fp[j] terms since r_ij appears in two
// terms of embed eng: Fi(sum rho_ij) and Fj(sum rho_ji)
// hence embed' = Fi(sum rho_ij) rhojp + Fj(sum rho_ji) rhoip
+ // scale factor can be applied by thermodynamic integration
coeff = rhor_spline[type2rhor[itype][jtype]][m];
rhoip = (coeff[0]*p + coeff[1])*p + coeff[2];
@@ -293,7 +295,7 @@ void PairEAM::compute(int eflag, int vflag)
phi = z2*recip;
phip = z2p*recip - phi*recip;
psip = fp[i]*rhojp + fp[j]*rhoip + phip;
- fpair = -psip*recip;
+ fpair = -scale[itype][jtype]*psip*recip;
f[i][0] += delx*fpair;
f[i][1] += dely*fpair;
@@ -336,6 +338,7 @@ void PairEAM::allocate()
type2frho = new int[n+1];
memory->create(type2rhor,n+1,n+1,"pair:type2rhor");
memory->create(type2z2r,n+1,n+1,"pair:type2z2r");
+ memory->create(scale,n+1,n+1,"pair:scale");
}
/* ----------------------------------------------------------------------
@@ -393,6 +396,7 @@ void PairEAM::coeff(int narg, char **arg)
atom->set_mass(i,funcfl[ifuncfl].mass);
count++;
}
+ scale[i][j] = 1.0;
}
}
@@ -423,6 +427,8 @@ double PairEAM::init_one(int i, int j)
// for funcfl could be multiple files
// for setfl or fs, just one file
+ scale[j][i] = scale[i][j];
+
if (funcfl) {
cutmax = 0.0;
for (int m = 0; m < nfuncfl; m++)
@@ -886,3 +892,12 @@ void PairEAM::swap_eam(double *fp_caller, double **fp_caller_hold)
fp = fp_caller;
*fp_caller_hold = tmp;
}
+
+/* ---------------------------------------------------------------------- */
+
+void *PairEAM::extract(const char *str, int &dim)
+{
+ dim = 2;
+ if (strcmp(str,"scale") == 0) return (void *) scale;
+ return NULL;
+}
diff --git a/src/MANYBODY/pair_eam.h b/src/MANYBODY/pair_eam.h
index a941b95402..040497fceb 100644
--- a/src/MANYBODY/pair_eam.h
+++ b/src/MANYBODY/pair_eam.h
@@ -54,6 +54,7 @@ class PairEAM : public Pair {
void init_style();
double init_one(int, int);
double single(int, int, int, int, double, double, double, double &);
+ void *extract(const char *, int &);
virtual int pack_forward_comm(int, int *, double *, int, int *);
virtual void unpack_forward_comm(int, int, double *);
@@ -65,6 +66,7 @@ class PairEAM : public Pair {
protected:
int nmax; // allocated size of per-atom arrays
double cutforcesq;
+ double **scale;
// per-atom arrays
diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp
index 8d040f0d39..899526f338 100644
--- a/src/MANYBODY/pair_eam_alloy.cpp
+++ b/src/MANYBODY/pair_eam_alloy.cpp
@@ -102,6 +102,7 @@ void PairEAMAlloy::coeff(int narg, char **arg)
if (i == j) atom->set_mass(i,setfl->mass[map[i]]);
count++;
}
+ scale[i][j] = 1.0;
}
}
diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp
index b929920449..8b4c86703f 100644
--- a/src/MANYBODY/pair_eam_fs.cpp
+++ b/src/MANYBODY/pair_eam_fs.cpp
@@ -102,6 +102,7 @@ void PairEAMFS::coeff(int narg, char **arg)
if (i == j) atom->set_mass(i,fs->mass[map[i]]);
count++;
}
+ scale[i][j] = 1.0;
}
}
diff --git a/src/USER-MISC/README b/src/USER-MISC/README
index d60e2c85c8..164b31e64b 100644
--- a/src/USER-MISC/README
+++ b/src/USER-MISC/README
@@ -43,7 +43,6 @@ fix imd, Axel Kohlmeyer, akohlmey at gmail.com, 9 Nov 2009
fix ipi, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014
fix pimd, Yuxing Peng (U Chicago), yuxing at uchicago.edu, 24 Nov 2014
fix smd, Axel Kohlmeyer, akohlmey at gmail.com, 19 May 2008
-fix ti/rs, Rodrigo Freitas (Unicamp/Brazil), rodrigohb at gmail.com, 7 Nov 2013
fix ti/spring, Rodrigo Freitas (Unicamp/Brazil), rodrigohb at gmail.com, 7 Nov 2013
fix ttm/mod, Sergey Starikov and Vasily Pisarev (JIHT), pisarevvv at gmail.com, 2 Feb 2015
improper_style cossq, Georgios Vogiatzis, gvog at chemeng.ntua.gr, 25 May 12
diff --git a/src/USER-MISC/fix_ti_rs.cpp b/src/USER-MISC/fix_ti_rs.cpp
deleted file mode 100644
index 1090fc02d0..0000000000
--- a/src/USER-MISC/fix_ti_rs.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -------------------------------------------------------------------------
- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
- http://lammps.sandia.gov, Sandia National Laboratories
- Steve Plimpton, sjplimp@sandia.gov
-
- Copyright (2003) Sandia Corporation. Under the terms of Contract
- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
- certain rights in this software. This software is distributed under
- the GNU General Public License.
-
- See the README file in the top-level LAMMPS directory.
-------------------------------------------------------------------------- */
-
-/* -------------------------------------------------------------------------
- Contributing authors:
- Rodrigo Freitas (Unicamp/Brazil) - rodrigohb@gmail.com
- Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
-------------------------------------------------------------------------- */
-
-#include
-#include
-#include
-#include "fix_ti_rs.h"
-#include "atom.h"
-#include "update.h"
-#include "respa.h"
-#include "error.h"
-#include "force.h"
-
-using namespace LAMMPS_NS;
-using namespace FixConst;
-
-/* ---------------------------------------------------------------------- */
-
-// Class constructor initialize all variables.
-
-FixTIRS::FixTIRS(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
-{
- // Checking the input information.
- if (narg < 7 || narg > 9) error->all(FLERR,"Illegal fix ti/rs command");
-
- // Fix flags.
- vector_flag = 1;
- size_vector = 2;
- global_freq = 1;
- extvector = 1;
-
- // Time variables.
- t_switch = force->bnumeric(FLERR,arg[5]);
- t_equil = force->bnumeric(FLERR,arg[6]);
- t0 = update->ntimestep;
- if (t_switch <= 0) error->all(FLERR,"Illegal fix ti/rs command");
- if (t_equil <= 0) error->all(FLERR,"Illegal fix ti/rs command");
-
- // Coupling parameter limits and initialization.
- l_initial = force->numeric(FLERR,arg[3]);
- l_final = force->numeric(FLERR,arg[4]);
- sf = 1;
- if (narg > 7) {
- if (strcmp(arg[7], "function") == 0) sf = force->inumeric(FLERR,arg[8]);
- else error->all(FLERR,"Illegal fix ti/rs switching function");
- if ((sf<1) || (sf>3))
- error->all(FLERR,"Illegal fix ti/rs switching function");
- }
- lambda = switch_func(0);
- dlambda = dswitch_func(0);
-}
-
-/* ---------------------------------------------------------------------- */
-
-FixTIRS::~FixTIRS()
-{
- // unregister callbacks to this fix from Atom class
- atom->delete_callback(id,0);
- atom->delete_callback(id,1);
-}
-
-/* ---------------------------------------------------------------------- */
-
-int FixTIRS::setmask()
-{
- int mask = 0;
- mask |= INITIAL_INTEGRATE;
- mask |= POST_FORCE;
- return mask;
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::init()
-{
- if (strstr(update->integrate_style,"respa"))
- nlevels_respa = ((Respa *) update->integrate)->nlevels;
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::setup(int vflag)
-{
- if (strstr(update->integrate_style,"verlet"))
- post_force(vflag);
- else {
- ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
- post_force_respa(vflag,nlevels_respa-1,0);
- ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::min_setup(int vflag)
-{
- post_force(vflag);
-}
-
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::post_force(int vflag)
-{
-
- int *mask = atom->mask;
- int nlocal = atom->nlocal;
- double **f = atom->f;
-
- // Scaling forces.
- for (int i = 0; i < nlocal; i++) {
- if (mask[i] & groupbit) {
- f[i][0] = lambda * f[i][0];
- f[i][1] = lambda * f[i][1];
- f[i][2] = lambda * f[i][2];
- }
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::post_force_respa(int vflag, int ilevel, int iloop)
-{
- if (ilevel == nlevels_respa-1) post_force(vflag);
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::min_post_force(int vflag)
-{
- post_force(vflag);
-}
-
-/* ---------------------------------------------------------------------- */
-
-void FixTIRS::initial_integrate(int vflag)
-{
- // Update the coupling parameter value.
- const bigint t = update->ntimestep - (t0+t_equil);
- const double r_switch = 1.0/t_switch;
-
- if( (t >= 0) && (t <= t_switch) ) {
- lambda = switch_func(t*r_switch);
- dlambda = dswitch_func(t*r_switch);
- }
-
- if( (t >= t_equil+t_switch) && (t <= (t_equil+2*t_switch)) ) {
- lambda = switch_func(1.0 - (t - t_switch - t_equil)*r_switch);
- dlambda = - dswitch_func(1.0 - (t - t_switch - t_equil)*r_switch);
- }
-}
-
-/* ---------------------------------------------------------------------- */
-
-double FixTIRS::compute_vector(int n)
-{
- linfo[0] = lambda;
- linfo[1] = dlambda;
- return linfo[n];
-}
-
-/* ---------------------------------------------------------------------- */
-
-double FixTIRS::switch_func(double t)
-{
- if (sf == 2) return l_initial / (1 + t * (l_initial/l_final - 1));
- if (sf == 3) return l_initial / (1 + log2(1+t) * (l_initial/l_final - 1));
-
- // Default option is sf = 1.
- return l_initial + (l_final - l_initial) * t;
-}
-
-/* ---------------------------------------------------------------------- */
-
-double FixTIRS::dswitch_func(double t)
-{
- double aux = (1.0/l_initial - 1.0/l_final);
- if (sf == 2) return lambda * lambda * aux / t_switch;
- if (sf == 3) return lambda * lambda * aux / (t_switch * log(2) * (1 + t));
-
- // Default option is sf = 1.
- return (l_final-l_initial)/t_switch;
-}
diff --git a/src/USER-MISC/fix_ti_rs.h b/src/USER-MISC/fix_ti_rs.h
deleted file mode 100644
index 0aee21a872..0000000000
--- a/src/USER-MISC/fix_ti_rs.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- ----------------------------------------------------------
- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
- http://lammps.sandia.gov, Sandia National Laboratories
- Steve Plimpton, sjplimp@sandia.gov
-
- Copyright (2003) Sandia Corporation. Under the terms of Contract
- DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
- certain rights in this software. This software is distributed under
- the GNU General Public License.
-
- See the README file in the top-level LAMMPS directory.
-------------------------------------------------------------------------- */
-
-/* ----------------------------------------------------------------------
- Contributing authors:
- Rodrigo Freitas (Unicamp/Brazil) - rodrigohb@gmail.com
- Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
-------------------------------------------------------------------------- */
-
-#ifdef FIX_CLASS
-
-FixStyle(ti/rs,FixTIRS)
-
-#else
-
-#ifndef LMP_FIX_TI_RS_H
-#define LMP_FIX_TI_RS_H
-
-#include "fix.h"
-
-namespace LAMMPS_NS {
-
-class FixTIRS : public Fix {
- public:
- FixTIRS(class LAMMPS *, int, char **);
- ~FixTIRS();
- int setmask();
- void init();
- void setup(int);
- void min_setup(int);
- void post_force(int);
- void post_force_respa(int, int, int);
- void min_post_force(int);
- virtual void initial_integrate(int);
- double compute_vector(int);
-
- private:
- double switch_func(double);
- double dswitch_func(double);
-
- double lambda; // Coupling parameter.
- double dlambda; // Lambda variation with t.
- double l_initial; // Lambda initial value.
- double l_final; // Lambda final value.
- double linfo[2]; // Current lambda status.
- bigint t_switch; // Total switching steps.
- bigint t_equil; // Equilibration time.
- bigint t0; // Initial time.
- int sf; // Switching function option.
- int nlevels_respa;
-};
-
-}
-
-#endif
-#endif
diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp
index edb6a7b2ca..5f3e9d9cdf 100644
--- a/src/USER-MISC/fix_ti_spring.cpp
+++ b/src/USER-MISC/fix_ti_spring.cpp
@@ -12,13 +12,14 @@
------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------
- Contributing authors:
- Rodrigo Freitas (Unicamp/Brazil) - rodrigohb@gmail.com
+ Contributing authors:
+ Rodrigo Freitas (UC Berkeley) - rodrigof@berkeley.edu
+ Mark Asta (UC Berkeley) - mdasta@berkeley.edu
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
------------------------------------------------------------------------- */
-#include
-#include
+#include "stdlib.h"
+#include "string.h"
#include "fix_ti_spring.h"
#include "atom.h"
#include "update.h"
@@ -28,13 +29,25 @@
#include "error.h"
#include "force.h"
-using namespace LAMMPS_NS;
-using namespace FixConst;
+using namespace LAMMPS_NS;
+using namespace FixConst;
+
+static const char cite_ti_spring[] =
+ "ti/spring command:\n\n"
+ "@article{freitas2016,\n"
+ " author={Freitas, Rodrigo and Asta, Mark and de Koning, Maurice},\n"
+ " title={Nonequilibrium free-energy calculation of solids using LAMMPS},\n"
+ " journal={Computational Materials Science},\n"
+ " volume={112},\n"
+ " pages={333--341},\n"
+ " year={2016},\n"
+ " publisher={Elsevier}\n"
+ "}\n\n";
/* ---------------------------------------------------------------------- */
-FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
- Fix(lmp, narg, arg)
+FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
+ Fix(lmp, narg, arg)
{
if (narg < 6 || narg > 8)
error->all(FLERR,"Illegal fix ti/spring command");
@@ -64,7 +77,7 @@ FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
double **x = atom->x;
int *mask = atom->mask;
- imageint *image = atom->image;
+ tagint *image = atom->image;
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; i++) {
@@ -73,22 +86,22 @@ FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) :
}
// Time variables.
- t_switch = force->bnumeric(FLERR,arg[4]); // Number of steps for switching.
- t_equil = force->bnumeric(FLERR,arg[5]); // Number of steps for equilibration.
+ t_switch = atoi(arg[4]); // Switching time.
+ t_equil = atoi(arg[5]); // Equilibration time.
t0 = update->ntimestep; // Initial time.
- if (t_switch <= 0) error->all(FLERR,"Illegal fix ti/spring command");
- if (t_equil <= 0) error->all(FLERR,"Illegal fix ti/spring command");
+ if (t_switch < 0.0) error->all(FLERR,"Illegal fix ti/spring command");
+ if (t_equil < 0.0) error->all(FLERR,"Illegal fix ti/spring command");
// Coupling parameter initialization.
sf = 1;
if (narg > 6) {
- if (strcmp(arg[6], "function") == 0) sf = force->inumeric(FLERR,arg[7]);
+ if (strcmp(arg[6], "function") == 0) sf = atoi(arg[7]);
else error->all(FLERR,"Illegal fix ti/spring switching function");
- if ((sf!=1) && (sf!=2))
+ if ((sf!=1) && (sf!=2))
error->all(FLERR,"Illegal fix ti/spring switching function");
}
- lambda = switch_func(0);
- dlambda = dswitch_func(0);
+ lambda = switch_func(0);
+ dlambda = dswitch_func(0);
espring = 0.0;
}
@@ -151,13 +164,13 @@ void FixTISpring::min_setup(int vflag)
void FixTISpring::post_force(int vflag)
{
// If on the first equilibration do not calculate forces.
- bigint t = update->ntimestep - t0;
+ int t = update->ntimestep - t0;
if(t < t_equil) return;
double **x = atom->x;
double **f = atom->f;
int *mask = atom->mask;
- imageint *image = atom->image;
+ tagint *image = atom->image;
int nlocal = atom->nlocal;
double dx, dy, dz;
@@ -196,22 +209,21 @@ void FixTISpring::min_post_force(int vflag)
/* ---------------------------------------------------------------------- */
-void FixTISpring::initial_integrate(int vflag)
-{
+void FixTISpring::initial_integrate(int vflag)
+{
// Update the coupling parameter value.
- const bigint t = update->ntimestep - (t0+t_equil);
- const double r_switch = 1.0/t_switch;
+ double t = update->ntimestep - (t0+t_equil);
if( (t >= 0) && (t <= t_switch) ) {
- lambda = switch_func(t*r_switch);
- dlambda = dswitch_func(t*r_switch);
+ lambda = switch_func(t/t_switch);
+ dlambda = dswitch_func(t/t_switch);
}
if( (t >= t_equil+t_switch) && (t <= (t_equil+2*t_switch)) ) {
- lambda = switch_func(1.0 - (t - t_switch - t_equil)*r_switch);
- dlambda = - dswitch_func(1.0 - (t - t_switch - t_equil)*r_switch);
+ lambda = switch_func(1.0 - (t - t_switch - t_equil)/t_switch );
+ dlambda = - dswitch_func(1.0 - (t - t_switch - t_equil)/t_switch );
}
-}
+}
/* ----------------------------------------------------------------------
energy of stretched springs
@@ -311,11 +323,11 @@ void FixTISpring::unpack_restart(int nlocal, int nth)
double **extra = atom->extra;
// skip to Nth set of extra values
-
+
int m = 0;
for (int i = 0; i < nth; i++) m += static_cast (extra[nlocal][m]);
m++;
-
+
xoriginal[nlocal][0] = extra[nlocal][m++];
xoriginal[nlocal][1] = extra[nlocal][m++];
xoriginal[nlocal][2] = extra[nlocal][m++];
@@ -343,7 +355,7 @@ int FixTISpring::size_restart(int nlocal)
Switching function.
------------------------------------------------------------------------- */
-double FixTISpring::switch_func(double t)
+double FixTISpring::switch_func(double t)
{
if (sf == 1) return t;
@@ -356,7 +368,7 @@ double FixTISpring::switch_func(double t)
Switching function derivative.
------------------------------------------------------------------------- */
-double FixTISpring::dswitch_func(double t)
+double FixTISpring::dswitch_func(double t)
{
if(sf == 1) return 1.0/t_switch;
diff --git a/src/USER-MISC/fix_ti_spring.h b/src/USER-MISC/fix_ti_spring.h
index bce3421627..9b956e7076 100644
--- a/src/USER-MISC/fix_ti_spring.h
+++ b/src/USER-MISC/fix_ti_spring.h
@@ -1,4 +1,4 @@
-/* -*- c++ -*- ----------------------------------------------------------
+/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
@@ -12,8 +12,9 @@
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
- Contributing authors:
- Rodrigo Freitas (Unicamp/Brazil) - rodrigohb@gmail.com
+ Contributing authors:
+ Rodrigo Freitas (UC Berkeley) - rodrigof@berkeley.edu
+ Mark Asta (UC Berkeley) - mdasta@berkeley.edu
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
------------------------------------------------------------------------- */
@@ -44,7 +45,7 @@ class FixTISpring : public Fix {
void initial_integrate(int);
double compute_scalar();
double compute_vector(int);
-
+
double memory_usage();
void grow_arrays(int);
void copy_arrays(int, int, int);
@@ -65,9 +66,9 @@ class FixTISpring : public Fix {
double lambda; // Coupling parameter.
double dlambda; // Lambda variation with t.
double linfo[2]; // Current lambda status.
- bigint t_switch; // Total switching steps.
- bigint t_equil; // Equilibration time.
- bigint t0; // Initial time.
+ int t_switch; // Total switching steps.
+ int t_equil; // Equilibration time.
+ int t0; // Initial time.
int sf; // Switching function option.
int nlevels_respa;
};
diff --git a/src/comm.cpp b/src/comm.cpp
index 070fd8575a..a47807b410 100644
--- a/src/comm.cpp
+++ b/src/comm.cpp
@@ -87,7 +87,7 @@ Comm::Comm(LAMMPS *lmp) : Pointers(lmp)
} else if (getenv("OMP_NUM_THREADS") == NULL) {
nthreads = 1;
if (me == 0)
- error->warning(FLERR,"OMP_NUM_THREADS environment is not set. "
+ error->message(FLERR,"OMP_NUM_THREADS environment is not set. "
"Defaulting to 1 thread.");
} else {
nthreads = omp_get_max_threads();
diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp
index 71bc74bb54..c44b41928f 100644
--- a/src/comm_brick.cpp
+++ b/src/comm_brick.cpp
@@ -39,9 +39,6 @@
#include "error.h"
#include "memory.h"
-// DEBUG
-#include "update.h"
-
using namespace LAMMPS_NS;
#define BUFFACTOR 1.5
diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp
index 0167b23b18..c7e11f06a0 100644
--- a/src/comm_tiled.cpp
+++ b/src/comm_tiled.cpp
@@ -28,9 +28,6 @@
#include "memory.h"
#include "error.h"
-// DEBUG
-#include "update.h"
-
using namespace LAMMPS_NS;
#define BUFFACTOR 1.5
diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp
index 48d93211a5..d8deaddd28 100644
--- a/src/fix_adapt.cpp
+++ b/src/fix_adapt.cpp
@@ -321,7 +321,8 @@ void FixAdapt::init()
delete[] psuffix;
}
if (ad->pair == NULL) ad->pair = force->pair_match(pstyle,1,nsub);
- if (ad->pair == NULL) error->all(FLERR,"Fix adapt pair style does not exist");
+ if (ad->pair == NULL)
+ error->all(FLERR,"Fix adapt pair style does not exist");
void *ptr = ad->pair->extract(ad->pparam,ad->pdim);
if (ptr == NULL)
@@ -329,11 +330,12 @@ void FixAdapt::init()
// for pair styles only parameters that are 2-d arrays in atom types or
// scalars are supported
+
if (ad->pdim != 2 && ad->pdim != 0)
error->all(FLERR,"Fix adapt pair style param is not compatible");
- if(ad->pdim == 2) ad->array = (double **) ptr;
- if(ad->pdim == 0) ad->scalar = (double *) ptr;
+ if (ad->pdim == 2) ad->array = (double **) ptr;
+ if (ad->pdim == 0) ad->scalar = (double *) ptr;
// if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style
@@ -367,6 +369,7 @@ void FixAdapt::init()
}
// make copy of original pair array values
+
for (int m = 0; m < nadapt; m++) {
Adapt *ad = &adapt[m];
if (ad->which == PAIR && ad->pdim == 2) {
diff --git a/src/fix_ave_atom.cpp b/src/fix_ave_atom.cpp
index cf2842f441..3d8e40ac17 100644
--- a/src/fix_ave_atom.cpp
+++ b/src/fix_ave_atom.cpp
@@ -69,33 +69,33 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) :
if (strcmp(arg[i],"x") == 0) {
which[i] = X;
- argindex[i++] = 0;
+ argindex[i] = 0;
} else if (strcmp(arg[i],"y") == 0) {
which[i] = X;
- argindex[i++] = 1;
+ argindex[i] = 1;
} else if (strcmp(arg[i],"z") == 0) {
which[i] = X;
- argindex[i++] = 2;
+ argindex[i] = 2;
} else if (strcmp(arg[i],"vx") == 0) {
which[i] = V;
- argindex[i++] = 0;
+ argindex[i] = 0;
} else if (strcmp(arg[i],"vy") == 0) {
which[i] = V;
- argindex[i++] = 1;
+ argindex[i] = 1;
} else if (strcmp(arg[i],"vz") == 0) {
which[i] = V;
- argindex[i++] = 2;
+ argindex[i] = 2;
} else if (strcmp(arg[i],"fx") == 0) {
which[i] = F;
- argindex[i++] = 0;
+ argindex[i] = 0;
} else if (strcmp(arg[i],"fy") == 0) {
which[i] = F;
- argindex[i++] = 1;
+ argindex[i] = 1;
} else if (strcmp(arg[i],"fz") == 0) {
which[i] = F;
- argindex[i++] = 2;
+ argindex[i] = 2;
} else if (strncmp(arg[i],"c_",2) == 0 ||
strncmp(arg[i],"f_",2) == 0 ||
diff --git a/src/fix_shear_history.cpp b/src/fix_shear_history.cpp
index 8e8c1bb53b..42d088875b 100644
--- a/src/fix_shear_history.cpp
+++ b/src/fix_shear_history.cpp
@@ -35,7 +35,8 @@ enum{DEFAULT,NPARTNER,PERPARTNER};
FixShearHistory::FixShearHistory(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
- npartner(NULL), partner(NULL), shearpartner(NULL), pair(NULL), ipage(NULL), dpage(NULL)
+ npartner(NULL), partner(NULL), shearpartner(NULL), pair(NULL),
+ ipage(NULL), dpage(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal fix SHEAR_HISTORY commmand");
@@ -698,14 +699,14 @@ int FixShearHistory::unpack_exchange(int nlocal, double *buf)
int FixShearHistory::pack_restart(int i, double *buf)
{
- int m = 0;
- buf[m++] = 4*npartner[i] + 2;
+ int m = 1;
buf[m++] = npartner[i];
for (int n = 0; n < npartner[i]; n++) {
buf[m++] = partner[i][n];
memcpy(&buf[m],&shearpartner[i][dnum*n],dnumbytes);
m += dnum;
}
+ buf[0] = m;
return m;
}
diff --git a/src/version.h b/src/version.h
index 5d6c755518..c55689c662 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "15 Sep 2016"
+#define LAMMPS_VERSION "20 Sep 2016"