2013-01-26 00:33:10 +08:00
|
|
|
<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 voronoi/atom command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2013-07-26 23:13:02 +08:00
|
|
|
<PRE>compute ID group-ID voronoi/atom keyword arg ...
|
2013-01-26 00:33:10 +08:00
|
|
|
</PRE>
|
2013-07-26 07:57:01 +08:00
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
|
|
|
|
|
2013-01-26 00:33:10 +08:00
|
|
|
<LI>voronoi/atom = style name of this compute command
|
2013-07-26 07:57:01 +08:00
|
|
|
|
2013-07-26 23:13:02 +08:00
|
|
|
<LI>zero or more keyword/value pairs may be appended
|
|
|
|
|
2013-07-26 07:57:01 +08:00
|
|
|
<LI>keyword = <I>only_group</I> or <I>surface</I> or <I>radius</I> or <I>edge_histo</I> or <I>edge_threshold</I> or <I>face_threshold</I>
|
|
|
|
|
2013-07-26 23:13:02 +08:00
|
|
|
<PRE> <I>only_group</I> = no arg
|
2014-04-18 23:15:16 +08:00
|
|
|
<I>occupation</I> = no arg
|
2013-07-26 07:57:01 +08:00
|
|
|
<I>surface</I> arg = sgroup-ID
|
|
|
|
sgroup-ID = compute the dividing surface between group-ID and sgroup-ID
|
|
|
|
this keyword adds a third column to the compute output
|
|
|
|
<I>radius</I> arg = v_r
|
2014-04-18 23:15:16 +08:00
|
|
|
v_r = radius atom style variable for a poly-disperse Voronoi tessellation
|
2013-07-26 07:57:01 +08:00
|
|
|
<I>edge_histo</I> arg = maxedge
|
2014-04-18 23:15:16 +08:00
|
|
|
maxedge = maximum number of Voronoi cell edges to be accounted in the histogram
|
2013-07-26 07:57:01 +08:00
|
|
|
<I>edge_threshold</I> arg = minlength
|
|
|
|
minlength = minimum length for an edge to be counted
|
|
|
|
<I>face_threshold</I> arg = minarea
|
|
|
|
minarea = minimum area for a face to be counted
|
|
|
|
</PRE>
|
|
|
|
|
2013-01-26 00:33:10 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
2013-07-26 07:57:01 +08:00
|
|
|
<PRE>compute 1 all voronoi/atom
|
|
|
|
compute 2 precipitate voronoi/atom surface matrix
|
|
|
|
compute 3b precipitate voronoi/atom radius v_r
|
|
|
|
compute 4 solute voronoi/atom only_group
|
2013-01-26 00:33:10 +08:00
|
|
|
</PRE>
|
2014-04-18 23:15:16 +08:00
|
|
|
<PRE>compute 5 defects voronoi/atom occupation
|
|
|
|
</PRE>
|
2013-01-26 00:33:10 +08:00
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2013-07-26 07:57:01 +08:00
|
|
|
<P>Define a computation that calculates the Voronoi tessellation of the
|
|
|
|
atoms in the simulation box. The tessellation is calculated using all
|
|
|
|
atoms in the simulation, but non-zero values are only stored for atoms
|
|
|
|
in the group.
|
|
|
|
</P>
|
|
|
|
<P>By default two quantities per atom are calculated by this compute.
|
|
|
|
The first is the volume of the Voronoi cell around each atom. Any
|
|
|
|
point in an atom's Voronoi cell is closer to that atom than any other.
|
|
|
|
The second is the number of faces of the Voronoi cell, which is also
|
|
|
|
the number of nearest neighbors of the atom in the middle of the cell.
|
|
|
|
</P>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<P>If the <I>only_group</I> keyword is specified the tessellation is performed
|
|
|
|
only with respect to the atoms contained in the compute group. This is
|
|
|
|
equivalent to deleting all atoms not contained in the group prior to
|
|
|
|
evaluating the tessellation.
|
2013-01-26 00:33:10 +08:00
|
|
|
</P>
|
2013-07-26 07:57:01 +08:00
|
|
|
<P>If the <I>surface</I> keyword is specified a third quantity per atom is
|
2014-04-18 23:15:16 +08:00
|
|
|
computed: the Voronoi cell surface of the given atom. <I>surface</I> takes
|
2013-07-26 07:57:01 +08:00
|
|
|
a group ID as an argument. If a group other than <I>all</I> is specified,
|
2014-04-18 23:15:16 +08:00
|
|
|
only the Voronoi cell facets facing a neighbor atom from the specified
|
2013-07-26 07:57:01 +08:00
|
|
|
group are counted towards the surface area.
|
2013-01-26 00:33:10 +08:00
|
|
|
</P>
|
2013-07-26 07:57:01 +08:00
|
|
|
<P>In the example above, a precipitate embedded in a matrix, only atoms
|
|
|
|
at the surface of the precipitate will have non-zero surface area, and
|
2014-04-18 23:15:16 +08:00
|
|
|
only the outward facing facets of the Voronoi cells are counted (the
|
2013-07-26 07:57:01 +08:00
|
|
|
hull of the precipitate). The total surface area of the precipitate
|
|
|
|
can be obtained by running a "reduce sum" compute on c_2[3]
|
|
|
|
</P>
|
|
|
|
<P>If the <I>radius</I> keyword is specified with an atom style variable as
|
2014-04-18 23:15:16 +08:00
|
|
|
the argument, a poly-disperse Voronoi tessellation is
|
2013-07-26 07:57:01 +08:00
|
|
|
performed. Examples for radius variables are
|
|
|
|
</P>
|
|
|
|
<PRE>variable r1 atom (type==1)*0.1+(type==2)*0.4
|
|
|
|
compute radius all property/atom radius
|
|
|
|
variable r2 atom c_radius
|
|
|
|
</PRE>
|
|
|
|
<P>Here v_r1 specifies a per-type radius of 0.1 units for type 1 atoms
|
|
|
|
and 0.4 units for type 2 atoms, and v_r2 accesses the radius property
|
|
|
|
present in atom_style sphere for granular models.
|
|
|
|
</P>
|
|
|
|
<P>The <I>edge_histo</I> keyword activates the compilation of a histogram of
|
2014-04-18 23:15:16 +08:00
|
|
|
number of edges on the faces of the Voronoi cells in the compute
|
2013-07-26 07:57:01 +08:00
|
|
|
group. The argument maxedge of the this keyword is the largest number
|
2014-04-18 23:15:16 +08:00
|
|
|
of edges on a single Voronoi cell face expected to occur in the
|
2013-07-26 07:57:01 +08:00
|
|
|
sample. This keyword adds the generation of a global vector with
|
|
|
|
maxedge+1 entries. The last entry in the vector contains the number of
|
|
|
|
faces with with more than maxedge edges. Since the polygon with the
|
|
|
|
smallest amount of edges is a triangle, entries 1 and 2 of the vector
|
|
|
|
will always be zero.
|
|
|
|
</P>
|
|
|
|
<P>The <I>edge_threshold</I> and <I>face_threshold</I> keywords allow the
|
|
|
|
suppression of edges below a given minimum length and faces below a
|
|
|
|
given minimum area. Ultra short edges and ultra small faces can occur
|
2014-04-18 23:15:16 +08:00
|
|
|
as artifacts of the Voronoi tessellation. These keywords will affect
|
2013-07-26 07:57:01 +08:00
|
|
|
the neighbor count and edge histogram outputs.
|
|
|
|
</P>
|
2014-04-18 23:15:16 +08:00
|
|
|
<P>If the <I>occupation</I> keyword is specified the tessellation is only
|
|
|
|
performed for the first invocation of the compute and then stored.
|
|
|
|
For all following invocations of the compute the number of atoms in
|
|
|
|
each Voronoi cell in the stored tessellation is counted. In this mode
|
|
|
|
the compute returns a per-atom array with 2 columns. The first column
|
2014-04-30 06:23:31 +08:00
|
|
|
is the number of atoms currently in the Voronoi volume defined by this
|
|
|
|
atom at the time of the first invocation of the compute (note that the
|
2014-04-18 23:15:16 +08:00
|
|
|
atom may have moved significantly). The second column contains the
|
2014-04-30 06:23:31 +08:00
|
|
|
total number of atoms sharing the Voronoi cell of the stored
|
|
|
|
tessellation at the location of the current atom. Numbers in column
|
|
|
|
one can be any positive integer including zero, while column two
|
|
|
|
values will always be greater than zero. Column one data can be used
|
|
|
|
to locate vacancies (the coordinates are given by the atom coordinates
|
|
|
|
at the time step when the compute was first invoked), while column two
|
|
|
|
data can be used to identify interstitial atoms.
|
2014-04-18 23:15:16 +08:00
|
|
|
</P>
|
2013-07-26 07:57:01 +08:00
|
|
|
<HR>
|
|
|
|
|
2013-01-26 00:33:10 +08:00
|
|
|
<P>The Voronoi calculation is performed by the freely available <A HREF = "http://math.lbl.gov/voro++">Voro++
|
|
|
|
package</A>, written by Chris Rycroft at UC Berkeley and LBL,
|
|
|
|
which must be installed on your system when building LAMMPS for use
|
2013-07-26 07:57:01 +08:00
|
|
|
with this compute. See instructions on obtaining and installing the
|
|
|
|
Voro++ software in the src/VORONOI/README file.
|
2013-01-26 00:33:10 +08:00
|
|
|
</P>
|
|
|
|
|
|
|
|
|
|
|
|
<P>IMPORTANT NOTE: The calculation of Voronoi volumes is performed by
|
|
|
|
each processor for the atoms it owns, and includes the effect of ghost
|
|
|
|
atoms stored by the processor. This assumes that the Voronoi cells of
|
|
|
|
owned atoms are not affected by atoms beyond the ghost atom cut-off
|
|
|
|
distance. This is usually a good assumption for liquid and solid
|
|
|
|
systems, but may lead to underestimation of Voronoi volumes in low
|
|
|
|
density systems. By default, the set of ghost atoms stored by each
|
|
|
|
processor is determined by the cutoff used for
|
|
|
|
<A HREF = "pair_style.html">pair_style</A> interactions. The cutoff can be set
|
2013-01-26 00:37:12 +08:00
|
|
|
explicitly via the <A HREF = "communicate.html">communicate cutoff</A> command.
|
2013-01-26 00:33:10 +08:00
|
|
|
</P>
|
2013-02-15 07:59:38 +08:00
|
|
|
<P>IMPORTANT NOTE: The Voro++ package performs its calculation in 3d.
|
|
|
|
This should still work for a 2d LAMMPS simulation, to effectively
|
2013-07-26 07:57:01 +08:00
|
|
|
compute Voronoi "areas", so long as the z-dimension of the box is
|
2013-02-15 07:59:38 +08:00
|
|
|
roughly the same (or smaller) compared to the separation of the atoms.
|
|
|
|
Typical values for the z box dimensions in a 2d LAMMPS model are -0.5
|
2013-03-11 22:52:39 +08:00
|
|
|
to 0.5, which satisfies the criterion for most <A HREF = "units.html">units</A>
|
2013-02-15 07:59:38 +08:00
|
|
|
systems. Note that you define the z extent of the simulation box for
|
|
|
|
2d simulations when using the <A HREF = "create_box.html">create_box</A> or
|
|
|
|
<A HREF = "read_data.html">read_data</A> commands.
|
|
|
|
</P>
|
2013-01-26 00:33:10 +08:00
|
|
|
<P><B>Output info:</B>
|
|
|
|
</P>
|
2014-04-18 23:15:16 +08:00
|
|
|
<P>This compute calculates a per-atom array with 2 columns. In regular
|
|
|
|
dynamic tessellation mode the first column is the Voronoi volume, the
|
|
|
|
second is the neighbor count, as described above (read above for the
|
|
|
|
output data in case the <I>occupation</I> keyword is specified).
|
|
|
|
These values can be accessed by any command that
|
2013-01-26 00:33:10 +08:00
|
|
|
uses per-atom values from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
|
|
|
|
15</A> for an overview of LAMMPS output
|
|
|
|
options.
|
|
|
|
</P>
|
|
|
|
<P>The Voronoi cell volume will be in distance <A HREF = "units.html">units</A> cubed.
|
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>This compute is part of the VORONOI package. It is only enabled if
|
|
|
|
LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
|
|
|
|
LAMMPS</A> section for more info.
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "dump.html">dump custom</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|