~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to doc/compute_atom_molecule.txt

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
2
 
 
3
 
:link(lws,http://lammps.sandia.gov)
4
 
:link(ld,Manual.html)
5
 
:link(lc,Section_commands.html#comm)
6
 
 
7
 
:line
8
 
 
9
 
compute atom/molecule command :h3
10
 
 
11
 
[Syntax:]
12
 
 
13
 
compute ID group-ID atom/molecule input1 input2 ... :pre
14
 
 
15
 
ID, group-ID are documented in "compute"_compute.html command :ulb,l
16
 
atom/molecule = style name of this compute command :l
17
 
one or more inputs can be listed :l
18
 
input = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
19
 
  c_ID = per-atom vector calculated by a compute with ID
20
 
  c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
21
 
  f_ID = per-atom vector calculated by a fix with ID
22
 
  f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
23
 
  v_name = per-atom vector calculated by an atom-style variable with name :pre
24
 
:ule
25
 
 
26
 
[Examples:]
27
 
 
28
 
compute 1 all atom/molecule c_ke c_pe
29
 
compute 1 top atom/molecule v_myFormula c_stress\[3\] :pre
30
 
 
31
 
[Description:]
32
 
 
33
 
Define a calculation that sums per-atom values on a per-molecule
34
 
basis, one per listed input.  The inputs can "computes"_compute.html,
35
 
"fixes"_fix.html, or "variables"_variable.html that generate per-atom
36
 
quantities.  Note that attributes stored by atoms, such as mass or
37
 
force, can also be summed on a per-molecule basis, by accessing these
38
 
quantities via the "compute property/atom"_compute_property_atom.html
39
 
command.
40
 
 
41
 
Each listed input is operated on independently.  Only atoms within the
42
 
specified group contribute to the per-molecule sum.  Note that compute
43
 
or fix inputs define their own group which may affect the quantities
44
 
they return.  For example, if a compute is used as an input which
45
 
generates a per-atom vector, it will generate values of 0.0 for atoms
46
 
that are not in the group specified for that compute.
47
 
 
48
 
The ordering of per-molecule quantities produced by this compute is
49
 
consistent with the ordering produced by other compute commands that
50
 
generate per-molecule datums.  Conceptually, them molecule IDs will be
51
 
in ascending order for any molecule with one or more of its atoms in
52
 
the specified group.
53
 
 
54
 
If an input begins with "c_", a compute ID must follow which has been
55
 
previously defined in the input script and which generates per-atom
56
 
quantities.  See the individual "compute"_compute.html doc page for
57
 
details.  If no bracketed integer is appended, the vector calculated
58
 
by the compute is used.  If a bracketed integer is appended, the Ith
59
 
column of the array calculated by the compute is used.  Users can also
60
 
write code for their own compute styles and "add them to
61
 
LAMMPS"_Section_modify.html.
62
 
 
63
 
If an input begins with "f_", a fix ID must follow which has been
64
 
previously defined in the input script and which generates per-atom
65
 
quantities.  See the individual "fix"_fix.html doc page for details.
66
 
Note that some fixes only produce their values on certain timesteps,
67
 
which must be compatible with when compute atom/molecule references
68
 
the values, else an error results.  If no bracketed integer is
69
 
appended, the vector calculated by the fix is used.  If a bracketed
70
 
integer is appended, the Ith column of the array calculated by the fix
71
 
is used.  Users can also write code for their own fix style and "add
72
 
them to LAMMPS"_Section_modify.html.
73
 
 
74
 
If an input begins with "v_", a variable name must follow which has
75
 
been previously defined in the input script.  It must be an
76
 
"atom-style variable"_variable.html.  Atom-style variables can
77
 
reference thermodynamic keywords and various per-atom attributes, or
78
 
invoke other computes, fixes, or variables when they are evaluated, so
79
 
this is a very general means of generating per-atom quantities to sum
80
 
on a per-molecule basis.
81
 
 
82
 
:line
83
 
 
84
 
[Output info:]
85
 
 
86
 
This compute calculates a global vector or global array depending on
87
 
the number of input values.  The length of the vector or number of
88
 
rows in the array is the number of molecules.  If a single input is
89
 
specified, a global vector is produced.  If two or more inputs are
90
 
specified, a global array is produced where the number of columns =
91
 
the number of inputs.  The vector or array can be accessed by any
92
 
command that uses global values from a compute as input.  See "this
93
 
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
94
 
options.
95
 
 
96
 
All the vector or array values calculated by this compute are
97
 
"extensive".
98
 
 
99
 
The vector or array values will be in whatever "units"_units.html the
100
 
input quantities are in.
101
 
 
102
 
[Restrictions:] none
103
 
 
104
 
[Related commands:]
105
 
 
106
 
"compute"_compute.html, "fix"_fix.html, "variable"_variable.html
107
 
 
108
 
[Default:] none