1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 fix adapt/fep command :h3
13 fix ID group-ID adapt/fep N attribute args ... keyword value ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 adapt/fep = style name of this fix command :l
17 N = adapt simulation settings every this many timesteps :l
18 one or more attribute/arg pairs may be appended :l
19 attribute = {pair} or {kspace} or {atom} :l
20 {pair} args = pstyle pparam I J v_name
21 pstyle = pair style name, e.g. lj/cut
22 pparam = parameter to adapt over time
23 I,J = type pair(s) to set parameter for
24 v_name = variable with name that calculates value of pparam
26 v_name = variable with name that calculates scale factor on K-space terms
27 {atom} args = aparam v_name
28 aparam = parameter to adapt over time
29 I = type(s) to set parameter for
30 v_name = variable with name that calculates value of aparam :pre
31 zero or more keyword/value pairs may be appended :l
32 keyword = {scale} or {reset} or {after} :l
33 {scale} value = {no} or {yes}
34 {no} = the variable value is the new setting
35 {yes} = the variable value multiplies the original setting
36 {reset} value = {no} or {yes}
37 {no} = values will remain altered at the end of a run
38 {yes} = reset altered values to their original values at the end
40 {after} value = {no} or {yes}
41 {no} = parameters are adapted at timestep N
42 {yes} = parameters are adapted one timestep after N :pre
47 fix 1 all adapt/fep 1 pair soft a 1 1 v_prefactor
48 fix 1 all adapt/fep 1 pair soft a 2* 3 v_prefactor
49 fix 1 all adapt/fep 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes
50 fix 1 all adapt/fep 10 atom diameter 1 v_size :pre
54 Change or adapt one or more specific simulation attributes or settings
55 over time as a simulation runs.
57 This is an enhanced version of the "fix adapt"_fix_adapt.html command
60 It is possible to modify the charges of chosen atom types only,
61 instead of scaling all the charges in the system. :ulb,l
63 There is a new option {after} for better compatibility with "fix
67 This version is suited for free energy calculations using
68 "compute ti"_compute_ti.html or "compute fep"_compute_fep.html.
70 If {N} is specified as 0, the specified attributes are only changed
71 once, before the simulation begins. This is all that is needed if the
72 associated variables are not time-dependent. If {N} > 0, then changes
73 are made every {N} steps during the simulation, presumably with a
74 variable that is time-dependent.
76 Depending on the value of the {reset} keyword, attributes changed by
77 this fix will or will not be reset back to their original values at
78 the end of a simulation. Even if {reset} is specified as {yes}, a
79 restart file written during a simulation will contain the modified
82 If the {scale} keyword is set to {no}, then the value the parameter is
83 set to will be whatever the variable generates. If the {scale}
84 keyword is set to {yes}, then the value of the altered parameter will
85 be the initial value of that parameter multiplied by whatever the
86 variable generates. I.e. the variable is now a "scale factor" applied
87 in (presumably) a time-varying fashion to the parameter. Internally,
88 the parameters themselves are actually altered; make sure you use the
89 {reset yes} option if you want the parameters to be restored to their
90 initial values after the run.
92 If the {after} keyword is set to {yes}, then the parameters are
93 changed one timestep after the multiple of N. In this manner, if a fix
94 such as "fix ave/time" is used to calculate averages at every N
95 timesteps, all the contributions to the average will be obtained with
96 the same values of the parameters.
100 The {pair} keyword enables various parameters of potentials defined by
101 the "pair_style"_pair_style.html command to be changed, if the pair
102 style supports it. Note that the "pair_style"_pair_style.html and
103 "pair_coeff"_pair_coeff.html commands must be used in the usual manner
104 to specify these parameters initially; the fix adapt command simply
105 overrides the parameters.
107 The {pstyle} argument is the name of the pair style. If "pair_style
108 hybrid or hybrid/overlay"_pair_hybrid.html is used, {pstyle} should be
109 a sub-style name. For example, {pstyle} could be specified as "soft"
110 or "lubricate". The {pparam} argument is the name of the parameter to
111 change. This is the current list of pair styles and parameters that
112 can be varied by this fix. See the doc pages for individual pair
113 styles and their energy formulas for the meaning of these parameters:
115 "born"_pair_born.html: a,b,c: type pairs:
116 "buck"_pair_buck.html: a,c: type pairs:
117 "coul/cut"_pair_coul.html: scale: type pairs:
118 "coul/debye"_pair_coul.html: scale: type pairs:
119 "coul/long"_pair_coul.html: scale: type pairs:
120 "lj/cut"_pair_lj.html: epsilon,sigma: type pairs:
121 "lj/expand"_pair_lj_expand.html: epsilon,sigma,delta: type pairs:
122 "lubricate"_pair_lubricate.html: mu: global:
123 "gauss"_pair_gauss.html: a: type pairs:
124 "soft"_pair_soft.html: a: type pairs :tb(c=3,s=:)
126 NOTE: It is easy to add new potentials and their parameters to this
127 list. All it typically takes is adding an extract() method to the
128 pair_*.cpp file associated with the potential.
130 Some parameters are global settings for the pair style, e.g. the
131 viscosity setting "mu" for "pair_style lubricate"_pair_lubricate.html.
132 Other parameters apply to atom type pairs within the pair style,
133 e.g. the prefactor "a" for "pair_style soft"_pair_soft.html.
135 Note that for many of the potentials, the parameter that can be varied
136 is effectively a prefactor on the entire energy expression for the
137 potential, e.g. the lj/cut epsilon. The parameters listed as "scale"
138 are exactly that, since the energy expression for the
139 "coul/cut"_pair_coul.html potential (for example) has no labeled
140 prefactor in its formula. To apply an effective prefactor to some
141 potentials, multiple parameters need to be altered. For example, the
142 "Buckingham potential"_pair_buck.html needs both the A and C terms
143 altered together. To scale the Buckingham potential, you should thus
144 list the pair style twice, once for A and once for C.
146 If a type pair parameter is specified, the {I} and {J} settings should
147 be specified to indicate which type pairs to apply it to. If a global
148 parameter is specified, the {I} and {J} settings still need to be
149 specified, but are ignored.
151 Similar to the "pair_coeff command"_pair_coeff.html, I and J can be
152 specified in one of two ways. Explicit numeric values can be used for
153 each, as in the 1st example above. I <= J is required. LAMMPS sets
154 the coefficients for the symmetric J,I interaction to the same values.
156 A wild-card asterisk can be used in place of or in conjunction with
157 the I,J arguments to set the coefficients for multiple pairs of atom
158 types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
159 number of atom types, then an asterisk with no numeric values means
160 all types from 1 to N. A leading asterisk means all types from 1 to n
161 (inclusive). A trailing asterisk means all types from n to N
162 (inclusive). A middle asterisk means all types from m to n
163 (inclusive). Note that only type pairs with I <= J are considered; if
164 asterisks imply type pairs where J < I, they are ignored.
166 IMPROTANT NOTE: If "pair_style hybrid or
167 hybrid/overlay"_pair_hybrid.html is being used, then the {pstyle} will
168 be a sub-style name. You must specify I,J arguments that correspond
169 to type pair values defined (via the "pair_coeff"_pair_coeff.html
170 command) for that sub-style.
172 The {v_name} argument for keyword {pair} is the name of an
173 "equal-style variable"_variable.html which will be evaluated each time
174 this fix is invoked to set the parameter to a new value. It should be
175 specified as v_name, where name is the variable name. Equal-style
176 variables can specify formulas with various mathematical functions,
177 and include "thermo_style"_thermo_style.html command keywords for the
178 simulation box parameters and timestep and elapsed time. Thus it is
179 easy to specify parameters that change as a function of time or span
180 consecutive runs in a continuous fashion. For the latter, see the
181 {start} and {stop} keywords of the "run"_run.html command and the
182 {elaplong} keyword of "thermo_style custom"_thermo_style.html for
185 For example, these commands would change the prefactor coefficient of
186 the "pair_style soft"_pair_soft.html potential from 10.0 to 30.0 in a
187 linear fashion over the course of a simulation:
189 variable prefactor equal ramp(10,30)
190 fix 1 all adapt 1 pair soft a * * v_prefactor :pre
194 The {kspace} keyword used the specified variable as a scale factor on
195 the energy, forces, virial calculated by whatever K-Space solver is
196 defined by the "kspace_style"_kspace_style.html command. If the
197 variable has a value of 1.0, then the solver is unaltered.
199 The {kspace} keyword works this way whether the {scale} keyword
200 is set to {no} or {yes}.
204 The {atom} keyword enables various atom properties to be changed. The
205 {aparam} argument is the name of the parameter to change. This is the
206 current list of atom parameters that can be varied by this fix:
208 charge = charge on particle
209 diameter = diameter of particle :ul
211 The {I} argument indicates which atom types are affected. A wild-card
212 asterisk can be used in place of or in conjunction with the I argument
213 to set the coefficients for multiple atom types.
215 The {v_name} argument of the {atom} keyword is the name of an
216 "equal-style variable"_variable.html which will be evaluated each time
217 this fix is invoked to set the parameter to a new value. It should be
218 specified as v_name, where name is the variable name. See the
219 discussion above describing the formulas associated with equal-style
220 variables. The new value is assigned to the corresponding attribute
221 for all atoms in the fix group.
223 If the atom parameter is {diameter} and per-atom density and per-atom
224 mass are defined for particles (e.g. "atom_style
225 granular"_atom_style.html), then the mass of each particle is also
226 changed when the diameter changes (density is assumed to stay
229 For example, these commands would shrink the diameter of all granular
230 particles in the "center" group from 1.0 to 0.1 in a linear fashion
231 over the course of a 1000-step simulation:
233 variable size equal ramp(1.0,0.1)
234 fix 1 center adapt 10 atom diameter * v_size :pre
236 For "rRESPA time integration"_run_style.html, this fix changes
237 parameters on the outermost rRESPA level.
241 [Restart, fix_modify, output, run start/stop, minimize info:]
243 No information about this fix is written to "binary restart
244 files"_restart.html. None of the "fix_modify"_fix_modify.html options
245 are relevant to this fix. No global or per-atom quantities are stored
246 by this fix for access by various "output
247 commands"_Section_howto.html#howto_15. No parameter of this fix can
248 be used with the {start/stop} keywords of the "run"_run.html command.
249 This fix is not invoked during "energy minimization"_minimize.html.
255 "compute fep"_compute_fep.html, "fix adapt"_fix_adapt.html, "compute
260 The option defaults are scale = no, reset = no, after = no.