Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101213978
compute_variable_atom.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
Thu, Feb 6, 21:25
Size
2 KB
Mime Type
text/html
Expires
Sat, Feb 8, 21:25 (2 d)
Engine
blob
Format
Raw Data
Handle
24115419
Attached To
rLAMMPS lammps
compute_variable_atom.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 variable/atom command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID variable/atom name
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>variable/atom = style name of this compute command
<LI>name = variable name to invoke for each atom
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 flow variable/atom myVar
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates a formula for each atom in the
group. The resulting values can be accessed by any command that uses
per-atom computes, e.g. the <A HREF = "dump.html">dump custom</A> command or <A HREF = "fix_ave_spatial.html">fix
ave/spatial</A> command or <A HREF = "fix_ave_atom.html">fix
ave/atom</A> command.
</P>
<P>The value of the variable evaluation will be 0.0 for atoms not in the
specified compute group.
</P>
<P>The formula is defined by the <A HREF = "variable.html">variable atom</A> command.
A variable of style <I>atom</I> can access properties of the system, such
as volume or temperature, and also reference individual atom
attributes, such as its coordinates or velocity.
</P>
<P>For example, these 3 commands would compute the xy kinectic energy of
atoms in the flow group and include the values in dumped snapshots of
the system.
</P>
<PRE>variable xy atom mult(0.5,add(mult(vx[],vx[]),mult(vy[],vy[])))
compute ke flow variable/atom xy
dump 1 flow custom 1000 dump.flow tag type x y z c_ke
</PRE>
<P>If the dump line were replaced by
</P>
<PRE>fix 1 flow ave/spatial 100 1000 z lower 2.0 ke.profile compute ke
</PRE>
<P>then the xy kinetic energy values would be averaged by z layer and the
layer averages written periodically to the file ke.profile.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "dump.html">dump custom</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>
Event Timeline
Log In to Comment