Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93181434
compute.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 26, 20:00
Size
5 KB
Mime Type
text/html
Expires
Thu, Nov 28, 20:00 (2 d)
Engine
blob
Format
Raw Data
Handle
22591045
Attached To
rLAMMPS lammps
compute.html
View Options
<HTML>
<CENTER><A
HREF =
"http://lammps.sandia.gov"
>
LAMMPS WWW Site
</A>
-
<A
HREF =
"Manual.html"
>
LAMMPS Documentation
</A>
-
<A
HREF =
"Section_commands.html#comm"
>
LAMMPS Commands
</A>
</CENTER>
<HR>
<H3>
compute command
</H3>
<P><B>
Syntax:
</B>
</P>
<PRE>
compute ID group-ID style args
</PRE>
<UL><LI>
ID = user-assigned name for the computation
<LI>
group-ID = ID of the group of atoms to perform the computation on
<LI>
style = one of a list of possible style names (see below)
<LI>
args = arguments used by a particular style
</UL>
<P><B>
Examples:
</B>
</P>
<PRE>
compute 1 all temp
compute newtemp flow temp/partial 1 1 0
compute 3 all ke/atom
</PRE>
<P><B>
Description:
</B>
</P>
<P>
Create a computation that will be performed on a group of atoms.
</P>
<P>
In LAMMPS, a "compute" is used in several ways. There are two kinds
of computes, "global" computes that calculate one or more values for
the entire group of atoms, and "per-atom" computes that calculate one
or more values for each atom in the group. The latter has the word
"atom" in its style name.
</P>
<P>
The results of global computes can be output via the
<A
HREF =
"thermo_style.html"
>
thermo_style
custom
</A>
or
<A
HREF =
"fix_ave_time.html"
>
fix ave/time
</A>
command.
Or the values can be referenced in a
<A
HREF =
"variable.html"
>
variable equal
</A>
command. The results of computes that calculate a global temperature
or pressure can be used by fixes that do thermostatting or
barostatting and when atom velocities are created.
</P>
<P>
The results of per-atom computes can be output via the
<A
HREF =
"dump.html"
>
dump
custom
</A>
command or the
<A
HREF =
"fix_ave_spatial.html"
>
fix
ave/spatial
</A>
command. Or the per-atom values can
be time-averaged via the
<A
HREF =
"fix_ave_atom.html"
>
fix ave/atom
</A>
command and
then output via the
<A
HREF =
"dump.html"
>
dump custom
</A>
or
<A
HREF =
"fix_ave_spatial.html"
>
fix
ave/spatial
</A>
commands.
</P>
<P>
LAMMPS creates its own global computes for thermodynamic output. Two
computes are always created, named "thermo_temp" and
"thermo_pressure", as if these commands had been invoked:
</P>
<PRE>
compute thermo_temp all temp
compute thermo_pressure all pressure thermo_temp
</PRE>
<P>
Additional computes are created if the thermo style requires it. See
the documentation for the
<A
HREF =
"thermo_style.html"
>
thermo_style
</A>
command.
</P>
<P>
The dumping of atom snapshots and fixes that compute temperature or
pressure also create computes as required. These are discussed in the
documentation for the
<A
HREF =
"dump.html"
>
dump custom
</A>
and specific
<A
HREF =
"fix.html"
>
fix
</A>
commands.
</P>
<P>
In all these cases, the default computes can be replaced by computes
defined by the user in the input script, as described by the
<A
HREF =
"thermo_modify.html"
>
thermo_modify
</A>
,
<A
HREF =
"fix_modify.html"
>
fix modify
</A>
, and
<A
HREF =
"dump.html"
>
dump
</A>
commands.
</P>
<P>
Properties of either a default of user-defined compute can be modified
via the
<A
HREF =
"compute_modify.html"
>
compute_modify
</A>
command.
</P>
<P>
Computes can be deleted with the
<A
HREF =
"uncompute.html"
>
uncompute
</A>
command.
</P>
<P>
Code for new computes can be added to LAMMPS (see
<A
HREF =
"Section_modify.html"
>
this
section
</A>
of the manaul) and the results of their
calculations accessed in the various ways described above.
</P>
<P>
Each compute style has its own doc page which describes its arguments
and what it does. Here is an alphabetic list of compute styles
defined in LAMMPS:
</P>
<UL><LI><A
HREF =
"compute_attribute_atom.html"
>
attribute/atom
</A>
- attribute (x,v,f,etc) of each atom
<LI><A
HREF =
"compute_centro_atom.html"
>
centro/atom
</A>
- centro-symmetry parameter for each atom
<LI><A
HREF =
"compute_coord_atom.html"
>
coord/atom
</A>
- coordination number for each atom
<LI><A
HREF =
"compute_ebond_atom.html"
>
ebond/atom
</A>
- bond energy for each atom
<LI><A
HREF =
"compute_epair_atom.html"
>
epair/atom
</A>
- pairwise energy for each atom
<LI><A
HREF =
"compute_ke_atom.html"
>
ke/atom
</A>
- kinetic energy for each atom
<LI><A
HREF =
"compute_pressure.html"
>
pressure
</A>
- total pressure and pressure tensor
<LI><A
HREF =
"compute_rotate_dipole.html"
>
rotate/dipole
</A>
- rotational energy of dipolar atoms
<LI><A
HREF =
"compute_rotate_gran.html"
>
rotate/gran
</A>
- rotational energy of granular atoms
<LI><A
HREF =
"compute_stress_atom.html"
>
stress/atom
</A>
- stress tensor for each atom
<LI><A
HREF =
"compute_sum_atom.html"
>
sum/atom
</A>
- sum 2 or more quantities for each atom
<LI><A
HREF =
"compute_temp.html"
>
temp
</A>
- temperature of group of atoms
<LI><A
HREF =
"compute_temp_asphere.html"
>
temp/asphere
</A>
- temperature of aspherical particles
<LI><A
HREF =
"compute_temp_deform.html"
>
temp/deform
</A>
- temperature excluding box deformation velocity
<LI><A
HREF =
"compute_temp_dipole.html"
>
temp/dipole
</A>
- temperature of point dipolar particles
<LI><A
HREF =
"compute_temp_partial.html"
>
temp/partial
</A>
- temperature excluding one or more dimensions of velocity
<LI><A
HREF =
"compute_temp_ramp.html"
>
temp/ramp
</A>
- temperature excluding ramped velocity component
<LI><A
HREF =
"compute_temp_region.html"
>
temp/region
</A>
- temperature of a region of atoms
<LI><A
HREF =
"compute_variable.html"
>
variable
</A>
- calculate a scalar value from a variable
<LI><A
HREF =
"compute_variable_atom.html"
>
variable/atom
</A>
- calculate a formula for each atom
</UL>
<P><B>
Restrictions:
</B>
none
</P>
<P><B>
Related commands:
</B>
</P>
<P><A
HREF =
"uncompute.html"
>
uncompute
</A>
,
<A
HREF =
"compute_modify.html"
>
compute_modify
</A>
</P>
<P><B>
Default:
</B>
none
</P>
</HTML>
Event Timeline
Log In to Comment