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 compute torque/chunk command :h3
13 compute ID group-ID torque/chunk chunkID :pre
15 ID, group-ID are documented in "compute"_compute.html command
16 torque/chunk = style name of this compute command
17 chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
21 compute 1 fluid torque/chunk molchunk :pre
25 Define a computation that calculates the torque on multiple chunks of
28 In LAMMPS, chunks are collections of atoms defined by a "compute
29 chunk/atom"_compute_chunk_atom.html command, which assigns each atom
30 to a single chunk (or no chunk). The ID for this command is specified
31 as chunkID. For example, a single chunk could be the atoms in a
32 molecule or atoms in a spatial bin. See the "compute
33 chunk/atom"_compute_chunk_atom.html doc page and "Section
34 6.23"_Section_howto.html#howto_23 for details of how chunks can be
35 defined and examples of how they can be used to measure properties of
38 This compute calculates the 3 components of the torque vector for eqch
39 chunk, due to the forces on the individual atoms in the chunk around
40 the center-of-mass of the chunk. The calculation includes all effects
41 due to atoms passing thru periodic boundaries.
43 Note that only atoms in the specified group contribute to the
44 calculation. The "compute chunk/atom"_compute_chunk_atom.html command
45 defines its own group; atoms will have a chunk ID = 0 if they are not
46 in that group, signifying they are not assigned to a chunk, and will
47 thus also not contribute to this calculation. You can specify the
48 "all" group for this command if you simply want to include atoms with
51 NOTE: The coordinates of an atom contribute to the chunk's torque in
52 "unwrapped" form, by using the image flags associated with each atom.
53 See the "dump custom"_dump.html command for a discussion of
54 "unwrapped" coordinates. See the Atoms section of the
55 "read_data"_read_data.html command for a discussion of image flags and
56 how they are set for each atom. You can reset the image flags
57 (e.g. to 0) before invoking this compute by using the "set
58 image"_set.html command.
60 The simplest way to output the results of the compute torque/chunk
61 calculation to a file is to use the "fix ave/time"_fix_ave_time.html
64 compute cc1 all chunk/atom molecule
65 compute myChunk all torque/chunk cc1
66 fix 1 all ave/time 100 1 100 c_myChunk\[*\] file tmp.out mode vector :pre
70 This compute calculates a global array where the number of rows = the
71 number of chunks {Nchunk} as calculated by the specified "compute
72 chunk/atom"_compute_chunk_atom.html command. The number of columns =
73 3 for the 3 xyz components of the torque for each chunk. These values
74 can be accessed by any command that uses global array values from a
75 compute as input. See "Section 6.15"_Section_howto.html#howto_15
76 for an overview of LAMMPS output options.
78 The array values are "intensive". The array values will be in
79 force-distance "units"_units.html.
85 "variable torque() function"_variable.html