lammps/doc/compute_sum_atom.txt

50 lines
1.5 KiB
Plaintext

"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 sum/atom command :h3
[Syntax:]
compute ID group-ID sum/atom compute-ID1 compute-ID2 ... :pre
ID, group-ID are documented in "compute"_compute.html command
sum/atom = style name of this compute command
compute-ID1, 2, ... = IDs of computes that calculate per-atom quantities :ul
[Examples:]
compute 1 all sum/atom atomKE atomEpair atomEbond :pre
[Description:]
Define a computation that sums the results of two or more other
computes for each atom in a group. This is useful for summing atom
properties such as pairwise energy, bond energy, kinetic energy, etc.
The resulting values can be accessed by any command that uses per-atom
computes, e.g. the "dump custom"_dump.html command or "fix
ave/spatial"_fix_ave_spatial.html command or "fix
ave/atom"_fix_ave_atom.html command.
The value of the sum will be 0.0 for atoms not in the specified
compute group.
The result of this compute depends on the results generated by the
other computes that it invokes. E.g. if the other computes each
generate a scalar value per atom, so will this compute. If the other
computes each generate a vector of values per atom, so will this
compute. In the latter case, all the other computes must generate
per-atom vectors of the same size.
[Restrictions:] none
[Related commands:]
"compute sum"_compute_sum.html
[Default:] none