git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16053 f3b2605a-c512-4ea7-a41b...
[lammps.git] / doc / src / fix_momentum.txt
blob4f94e2a85784ad330a5e2276503de77db8f16f69
1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
4 :link(ld,Manual.html)
5 :link(lc,Section_commands.html#comm)
7 :line
9 fix momentum command :h3
10 fix momentum/kk command :h3
12 [Syntax:]
14 fix ID group-ID momentum N keyword values ... :pre
16 ID, group-ID are documented in "fix"_fix.html command :ulb,l
17 momentum = style name of this fix command :l
18 N = adjust the momentum every this many timesteps
19 one or more keyword/value pairs may be appended :l
20 keyword = {linear} or {angular} or {rescale} :l
21   {linear} values = xflag yflag zflag
22     xflag,yflag,zflag = 0/1 to exclude/include each dimension
23   {angular} values = none :pre
24   {rescale} values = none :pre
25 :ule
27 [Examples:]
29 fix 1 all momentum 1 linear 1 1 0
30 fix 1 all momentum 1 linear 1 1 1 rescale
31 fix 1 all momentum 100 linear 1 1 1 angular :pre
33 [Description:]
35 Zero the linear and/or angular momentum of the group of atoms every N
36 timesteps by adjusting the velocities of the atoms.  One (or both) of
37 the {linear} or {angular} keywords must be specified.
39 If the {linear} keyword is used, the linear momentum is zeroed by
40 subtracting the center-of-mass velocity of the group from each atom.
41 This does not change the relative velocity of any pair of atoms.  One
42 or more dimensions can be excluded from this operation by setting the
43 corresponding flag to 0.
45 If the {angular} keyword is used, the angular momentum is zeroed by
46 subtracting a rotational component from each atom.
48 This command can be used to insure the entire collection of atoms (or
49 a subset of them) does not drift or rotate during the simulation due
50 to random perturbations (e.g. "fix langevin"_fix_langevin.html
51 thermostatting).
53 The {rescale} keyword enables conserving the kinetic energy of the group
54 of atoms by rescaling the velocities after the momentum was removed.
56 Note that the "velocity"_velocity.html command can be used to create
57 initial velocities with zero aggregate linear and/or angular momentum.
59 :line
61 Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
62 functionally the same as the corresponding style without the suffix.
63 They have been optimized to run faster, depending on your available
64 hardware, as discussed in "Section 5"_Section_accelerate.html
65 of the manual.  The accelerated styles take the same arguments and
66 should produce the same results, except for round-off and precision
67 issues.
69 These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
70 USER-OMP and OPT packages, respectively.  They are only enabled if
71 LAMMPS was built with those packages.  See the "Making
72 LAMMPS"_Section_start.html#start_3 section for more info.
74 You can specify the accelerated styles explicitly in your input script
75 by including their suffix, or you can use the "-suffix command-line
76 switch"_Section_start.html#start_7 when you invoke LAMMPS, or you can
77 use the "suffix"_suffix.html command in your input script.
79 See "Section 5"_Section_accelerate.html of the manual for
80 more instructions on how to use the accelerated styles effectively.
82 [Restart, fix_modify, output, run start/stop, minimize info:]
84 No information about this fix is written to "binary restart
85 files"_restart.html.  None of the "fix_modify"_fix_modify.html options
86 are relevant to this fix.  No global or per-atom quantities are stored
87 by this fix for access by various "output
88 commands"_Section_howto.html#howto_15.  No parameter of this fix can
89 be used with the {start/stop} keywords of the "run"_run.html command.
90 This fix is not invoked during "energy minimization"_minimize.html.
92 [Restrictions:] none
94 [Related commands:]
96 "fix recenter"_fix_recenter.html, "velocity"_velocity.html
98 [Default:] none