File: compute_atom_molecule.txt

package info (click to toggle)
lammps 0~20120615.gite442279-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 128,448 kB
  • sloc: cpp: 321,874; fortran: 15,187; ansic: 11,007; python: 7,889; perl: 2,915; sh: 2,088; makefile: 924; f90: 374; objc: 238; lisp: 169; csh: 16; tcl: 6
file content (108 lines) | stat: -rw-r--r-- 4,535 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
"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

compute atom/molecule command :h3

[Syntax:]

compute ID group-ID atom/molecule input1 input2 ... :pre

ID, group-ID are documented in "compute"_compute.html command :ulb,l
atom/molecule = style name of this compute command :l
one or more inputs can be listed :l
input = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
  c_ID = per-atom vector calculated by a compute with ID
  c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
  f_ID = per-atom vector calculated by a fix with ID
  f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
  v_name = per-atom vector calculated by an atom-style variable with name :pre
:ule

[Examples:]

compute 1 all atom/molecule c_ke c_pe
compute 1 top atom/molecule v_myFormula c_stress[3] :pre

[Description:]

Define a calculation that sums per-atom values on a per-molecule
basis, one per listed input.  The inputs can "computes"_compute.html,
"fixes"_fix.html, or "variables"_variable.html that generate per-atom
quantities.  Note that attributes stored by atoms, such as mass or
force, can also be summed on a per-molecule basis, by accessing these
quantities via the "compute property/atom"_compute_property_atom.html
command.

Each listed input is operated on independently.  Only atoms within the
specified group contribute to the per-molecule sum.  Note that compute
or fix inputs define their own group which may affect the quantities
they return.  For example, if a compute is used as an input which
generates a per-atom vector, it will generate values of 0.0 for atoms
that are not in the group specified for that compute.

The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums.  Conceptually, them molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.

If an input begins with "c_", a compute ID must follow which has been
previously defined in the input script and which generates per-atom
quantities.  See the individual "compute"_compute.html doc page for
details.  If no bracketed integer is appended, the vector calculated
by the compute is used.  If a bracketed integer is appended, the Ith
column of the array calculated by the compute is used.  Users can also
write code for their own compute styles and "add them to
LAMMPS"_Section_modify.html.

If an input begins with "f_", a fix ID must follow which has been
previously defined in the input script and which generates per-atom
quantities.  See the individual "fix"_fix.html doc page for details.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with when compute atom/molecule references
the values, else an error results.  If no bracketed integer is
appended, the vector calculated by the fix is used.  If a bracketed
integer is appended, the Ith column of the array calculated by the fix
is used.  Users can also write code for their own fix style and "add
them to LAMMPS"_Section_modify.html.

If an input begins with "v_", a variable name must follow which has
been previously defined in the input script.  It must be an
"atom-style variable"_variable.html.  Atom-style variables can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to sum
on a per-molecule basis.

:line

[Output info:]

This compute calculates a global vector or global array depending on
the number of input values.  The length of the vector or number of
rows in the array is the number of molecules.  If a single input is
specified, a global vector is produced.  If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs.  The vector or array can be accessed by any
command that uses global values from a compute as input.  See "this
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.

All the vector or array values calculated by this compute are
"extensive".

The vector or array values will be in whatever "units"_units.html the
input quantities are in.

[Restrictions:] none

[Related commands:]

"compute"_compute.html, "fix"_fix.html, "variable"_variable.html

[Default:] none