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 aveforce command :h3
13 fix ID group-ID aveforce fx fy fz keyword value ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 aveforce = style name of this fix command :l
17 fx,fy,fz = force component values (force units) :l
18 any of fx,fy,fz can be a variable (see below) :pre
19 zero or more keyword/value pairs may be appended to args :l
21 {region} value = region-ID
22 region-ID = ID of region atoms must be in to have added force :pre
27 fix pressdown topwall aveforce 0.0 -1.0 0.0
28 fix 2 bottomwall aveforce NULL -1.0 0.0 region top
29 fix 2 bottomwall aveforce NULL -1.0 v_oscillate region top :pre
33 Apply an additional external force to a group of atoms in such a way
34 that every atom experiences the same force. This is useful for
35 pushing on wall or boundary atoms so that the structure of the wall
36 does not change over time.
38 The existing force is averaged for the group of atoms, component by
39 component. The actual force on each atom is then set to the average
40 value plus the component specified in this command. This means each
41 atom in the group receives the same force.
43 Any of the fx,fy,fz values can be specified as NULL which means the
44 force in that dimension is not changed. Note that this is not the
45 same as specifying a 0.0 value, since that sets all forces to the same
46 average value without adding in any additional force.
48 Any of the 3 quantities defining the force components can be specified
49 as an equal-style "variable"_variable.html, namely {fx}, {fy}, {fz}.
50 If the value is a variable, it should be specified as v_name, where
51 name is the variable name. In this case, the variable will be
52 evaluated each timestep, and its value used to determine the average
55 Equal-style variables can specify formulas with various mathematical
56 functions, and include "thermo_style"_thermo_style.html command
57 keywords for the simulation box parameters and timestep and elapsed
58 time. Thus it is easy to specify a time-dependent average force.
60 If the {region} keyword is used, the atom must also be in the
61 specified geometric "region"_region.html in order to have force added
66 Styles with a suffix are functionally the same as the corresponding
67 style without the suffix. They have been optimized to run faster,
68 depending on your available hardware, as discussed in
69 "Section 5"_Section_accelerate.html of the manual. The
70 accelerated styles take the same arguments and should produce the same
71 results, except for round-off and precision issues.
73 These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
74 USER-OMP and OPT packages, respectively. They are only enabled if
75 LAMMPS was built with those packages. See the "Making
76 LAMMPS"_Section_start.html#start_3 section for more info.
78 You can specify the accelerated styles explicitly in your input script
79 by including their suffix, or you can use the "-suffix command-line
80 switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can
81 use the "suffix"_suffix.html command in your input script.
83 See "Section 5"_Section_accelerate.html of the manual for
84 more instructions on how to use the accelerated styles effectively.
88 [Restart, fix_modify, output, run start/stop, minimize info:]
90 No information about this fix is written to "binary restart
93 The "fix_modify"_fix_modify.html {respa} option is supported by this
94 fix. This allows to set at which level of the "r-RESPA"_run_style.html
95 integrator the fix is adding its forces. Default is the outermost level.
97 This fix computes a global 3-vector of forces, which can be accessed
98 by various "output commands"_Section_howto.html#howto_15. This is the
99 total force on the group of atoms before the forces on individual
100 atoms are changed by the fix. The vector values calculated by this
103 No parameter of this fix can be used with the {start/stop} keywords of
104 the "run"_run.html command.
106 The forces due to this fix are imposed during an energy minimization,
107 invoked by the "minimize"_minimize.html command. You should not
108 specify force components with a variable that has time-dependence for
109 use with a minimizer, since the minimizer increments the timestep as
110 the iteration count during the minimization.
116 "fix setforce"_fix_setforce.html, "fix addforce"_fix_addforce.html