forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10354 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
3503b9c828
commit
2efedae09e
|
@ -139,11 +139,12 @@ details on this at the bottom of this page.
|
|||
|
||||
<A NAME = "mod_1"></A><H4>10.1 Atom styles
|
||||
</H4>
|
||||
<P>Classes that define an atom style are derived from the AtomVec class
|
||||
and managed by the Atom class. The atom style determines what
|
||||
quantities are associated with an atom. A new atom style can be
|
||||
created if one of the existing atom styles does not define all
|
||||
the arrays you need to store and communicate with atoms.
|
||||
<P>Classes that define an <A HREF = "atom_style.html">atom style</A> are derived from
|
||||
the AtomVec class and managed by the Atom class. The atom style
|
||||
determines what attributes are associated with an atom. A new atom
|
||||
style can be created if one of the existing atom styles does not
|
||||
define all the attributes you need to store and communicate with
|
||||
atoms.
|
||||
</P>
|
||||
<P>Atom_vec_atomic.cpp is a simple example of an atom style.
|
||||
</P>
|
||||
|
@ -190,6 +191,36 @@ in atom_vec.h. New atom arrays are defined in atom.cpp. Search for
|
|||
the word "customize" and you will find locations you will need to
|
||||
modify.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: It is possible to add some attributes, such as a
|
||||
molecule ID, to atom styles that do not have them via the <A HREF = "fix_property_atom.html">fix
|
||||
property/atom</A> command. This command also
|
||||
allows new custom attributes consisting of extra integer or
|
||||
floating-point values to be added to atoms. See the <A HREF = "fix_property_atom.html">fix
|
||||
property/atom</A> doc page for examples of cases
|
||||
where this is useful and details on how to initialize, access, and
|
||||
output the custom values.
|
||||
</P>
|
||||
<P>New <A HREF = "pair_style.html">pair styles</A>, <A HREF = "fix.html">fixes</A>, or
|
||||
<A HREF = "compute.html">computes</A> can be added to LAMMPS, as discussed below.
|
||||
The code for these classes can use the per-atom properties defined by
|
||||
fix property/atom. The Atom class has a find_custom() method that is
|
||||
useful in this context:
|
||||
</P>
|
||||
<P>int index = find_custom(char *name, int &flag);
|
||||
</P>
|
||||
<P>The "name" of a custom attribute, as specified in the <A HREF = "fix_property_atom.html">fix
|
||||
property/atom</A> command, is checked to verify
|
||||
that it exists and its index is returned. The method also sets flag =
|
||||
0/1 depending on whether it is an integer or floating-point attribute.
|
||||
The vector of values associated with the attribute can then be
|
||||
accessed using the returned index as
|
||||
</P>
|
||||
<P>int *ivector = atom->ivector<B>index</B>;
|
||||
double *dvector = atom->dvector<B>index</B>;
|
||||
</P>
|
||||
<P>Ivector or dvector are vectors of length Nlocal = # of owned atoms,
|
||||
which store the attributes of individual atoms.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<A NAME = "mod_2"></A><H4>10.2 Bond, angle, dihedral, improper potentials
|
||||
|
|
|
@ -137,11 +137,12 @@ details on this at the bottom of this page. :l,ule
|
|||
|
||||
10.1 Atom styles :link(mod_1),h4
|
||||
|
||||
Classes that define an atom style are derived from the AtomVec class
|
||||
and managed by the Atom class. The atom style determines what
|
||||
quantities are associated with an atom. A new atom style can be
|
||||
created if one of the existing atom styles does not define all
|
||||
the arrays you need to store and communicate with atoms.
|
||||
Classes that define an "atom style"_atom_style.html are derived from
|
||||
the AtomVec class and managed by the Atom class. The atom style
|
||||
determines what attributes are associated with an atom. A new atom
|
||||
style can be created if one of the existing atom styles does not
|
||||
define all the attributes you need to store and communicate with
|
||||
atoms.
|
||||
|
||||
Atom_vec_atomic.cpp is a simple example of an atom style.
|
||||
|
||||
|
@ -186,6 +187,36 @@ in atom_vec.h. New atom arrays are defined in atom.cpp. Search for
|
|||
the word "customize" and you will find locations you will need to
|
||||
modify.
|
||||
|
||||
IMPORTANT NOTE: It is possible to add some attributes, such as a
|
||||
molecule ID, to atom styles that do not have them via the "fix
|
||||
property/atom"_fix_property_atom.html command. This command also
|
||||
allows new custom attributes consisting of extra integer or
|
||||
floating-point values to be added to atoms. See the "fix
|
||||
property/atom"_fix_property_atom.html doc page for examples of cases
|
||||
where this is useful and details on how to initialize, access, and
|
||||
output the custom values.
|
||||
|
||||
New "pair styles"_pair_style.html, "fixes"_fix.html, or
|
||||
"computes"_compute.html can be added to LAMMPS, as discussed below.
|
||||
The code for these classes can use the per-atom properties defined by
|
||||
fix property/atom. The Atom class has a find_custom() method that is
|
||||
useful in this context:
|
||||
|
||||
int index = find_custom(char *name, int &flag);
|
||||
|
||||
The "name" of a custom attribute, as specified in the "fix
|
||||
property/atom"_fix_property_atom.html command, is checked to verify
|
||||
that it exists and its index is returned. The method also sets flag =
|
||||
0/1 depending on whether it is an integer or floating-point attribute.
|
||||
The vector of values associated with the attribute can then be
|
||||
accessed using the returned index as
|
||||
|
||||
int *ivector = atom->ivector[index];
|
||||
double *dvector = atom->dvector[index];
|
||||
|
||||
Ivector or dvector are vectors of length Nlocal = # of owned atoms,
|
||||
which store the attributes of individual atoms.
|
||||
|
||||
:line
|
||||
|
||||
10.2 Bond, angle, dihedral, improper potentials :link(mod_2),h4
|
||||
|
|
|
@ -77,7 +77,16 @@ quantities.
|
|||
<TR><TD ><I>wavepacket</I> </TD><TD > charge, spin, eradius, etag, cs_re, cs_im </TD><TD > AWPMD
|
||||
</TD></TR></TABLE></DIV>
|
||||
|
||||
<P>All of the styles define point particles, except the <I>sphere</I>,
|
||||
<P>IMPORTANT NOTE: It is possible to add some attributes, such as a
|
||||
molecule ID, to atom styles that do not have them via the <A HREF = "fix_property_atom.html">fix
|
||||
property/atom</A> command. This command also
|
||||
allows new custom attributes consisting of extra integer or
|
||||
floating-point values to be added to atoms. See the <A HREF = "fix_property_atom.html">fix
|
||||
property/atom</A> doc page for examples of cases
|
||||
where this is useful and details on how to initialize, access, and
|
||||
output the custom values.
|
||||
</P>
|
||||
<P>All of the above styles define point particles, except the <I>sphere</I>,
|
||||
<I>ellipsoid</I>, <I>electron</I>, <I>peri</I>, <I>wavepacket</I>, <I>line</I>, <I>tri</I>, and
|
||||
<I>body</I> styles, which define finite-size particles. See <A HREF = "Section_howto.html#howto_14">Section_howto
|
||||
14</A> for an overview of using finite-size
|
||||
|
|
|
@ -73,7 +73,16 @@ quantities.
|
|||
{tri} | corner points, angular momentum | rigid bodies |
|
||||
{wavepacket} | charge, spin, eradius, etag, cs_re, cs_im | AWPMD :tb(c=3,s=|)
|
||||
|
||||
All of the styles define point particles, except the {sphere},
|
||||
IMPORTANT NOTE: It is possible to add some attributes, such as a
|
||||
molecule ID, to atom styles that do not have them via the "fix
|
||||
property/atom"_fix_property_atom.html command. This command also
|
||||
allows new custom attributes consisting of extra integer or
|
||||
floating-point values to be added to atoms. See the "fix
|
||||
property/atom"_fix_property_atom.html doc page for examples of cases
|
||||
where this is useful and details on how to initialize, access, and
|
||||
output the custom values.
|
||||
|
||||
All of the above styles define point particles, except the {sphere},
|
||||
{ellipsoid}, {electron}, {peri}, {wavepacket}, {line}, {tri}, and
|
||||
{body} styles, which define finite-size particles. See "Section_howto
|
||||
14"_Section_howto.html#howto_14 for an overview of using finite-size
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
end1x, end1y, end1z, end2x, end2y, end2z,
|
||||
corner1x, corner1y, corner1z,
|
||||
corner2x, corner2y, corner2z,
|
||||
corner3x, corner3y, corner3z
|
||||
corner3x, corner3y, corner3z,
|
||||
i_name, d_name
|
||||
</PRE>
|
||||
<PRE> id = atom ID
|
||||
mol = molecule ID
|
||||
|
@ -59,7 +60,9 @@
|
|||
ervel = electron radial velocity
|
||||
erforce = electron radial force
|
||||
end12x, end12y, end12z = end points of line segment
|
||||
coner123x, corner123y, corner123z = corner points of triangle
|
||||
coner123x, corner123y, corner123z = corner points of triangle
|
||||
i_name = custom integer vector with name
|
||||
d_name = custom integer vector with name
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
|
@ -108,6 +111,12 @@ line segment particles and define the end points of each line segment.
|
|||
<I>corner2z</I>, <I>corner3x</I>, <I>corner3y</I>, <I>corner3z</I>, are defined for
|
||||
triangular particles and define the corner points of each triangle.
|
||||
</P>
|
||||
<P>The <I>i_name</I> and <I>d_name</I> attributes refer to custom integer and
|
||||
floating-point properties that have been added to each atom via the
|
||||
<A HREF = "fix_property_atom.html">fix property/atom</A> command. When that command
|
||||
is used specific names are given to each attribute which are what is
|
||||
specified as the "name" portion of <I>i_name</I> or <I>d_name</I>.
|
||||
</P>
|
||||
<P><B>Output info:</B>
|
||||
</P>
|
||||
<P>This compute calculates a per-atom vector or per-atom array depending
|
||||
|
@ -128,7 +137,8 @@ units for q, etc.
|
|||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "dump.html">dump custom</A>, <A HREF = "compute_reduce.html">compute reduce</A>, <A HREF = "fix_ave_atom.html">fix
|
||||
ave/atom</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>
|
||||
ave/atom</A>, <A HREF = "fix_ave_spatial.html">fix ave/spatial</A>,
|
||||
<A HREF = "fix_property_atom.html">fix property/atom</A>
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
|
|
|
@ -27,7 +27,8 @@ input = one or more atom attributes :l
|
|||
end1x, end1y, end1z, end2x, end2y, end2z,
|
||||
corner1x, corner1y, corner1z,
|
||||
corner2x, corner2y, corner2z,
|
||||
corner3x, corner3y, corner3z :pre
|
||||
corner3x, corner3y, corner3z,
|
||||
i_name, d_name :pre
|
||||
id = atom ID
|
||||
mol = molecule ID
|
||||
type = atom type
|
||||
|
@ -52,7 +53,9 @@ input = one or more atom attributes :l
|
|||
ervel = electron radial velocity
|
||||
erforce = electron radial force
|
||||
end12x, end12y, end12z = end points of line segment
|
||||
coner123x, corner123y, corner123z = corner points of triangle :pre
|
||||
coner123x, corner123y, corner123z = corner points of triangle
|
||||
i_name = custom integer vector with name
|
||||
d_name = custom integer vector with name :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
@ -100,6 +103,12 @@ line segment particles and define the end points of each line segment.
|
|||
{corner2z}, {corner3x}, {corner3y}, {corner3z}, are defined for
|
||||
triangular particles and define the corner points of each triangle.
|
||||
|
||||
The {i_name} and {d_name} attributes refer to custom integer and
|
||||
floating-point properties that have been added to each atom via the
|
||||
"fix property/atom"_fix_property_atom.html command. When that command
|
||||
is used specific names are given to each attribute which are what is
|
||||
specified as the "name" portion of {i_name} or {d_name}.
|
||||
|
||||
[Output info:]
|
||||
|
||||
This compute calculates a per-atom vector or per-atom array depending
|
||||
|
@ -120,6 +129,7 @@ units for q, etc.
|
|||
[Related commands:]
|
||||
|
||||
"dump custom"_dump.html, "compute reduce"_compute_reduce.html, "fix
|
||||
ave/atom"_fix_ave_atom.html, "fix ave/spatial"_fix_ave_spatial.html
|
||||
ave/atom"_fix_ave_atom.html, "fix ave/spatial"_fix_ave_spatial.html,
|
||||
"fix property/atom"_fix_property_atom.html
|
||||
|
||||
[Default:] none
|
||||
|
|
|
@ -49,7 +49,8 @@ is ignored by this fix.
|
|||
properties, as explained on the <A HREF = "atom_style.html">atom_style</A> and
|
||||
<A HREF = "read_data.html">read_data</A> doc pages. The latter command allows these
|
||||
properties to be defined for each atom in the system when a data file
|
||||
is read. This fix will augment the set of properties with new ones.
|
||||
is read. This fix will augment the set of properties with new custom
|
||||
ones.
|
||||
</P>
|
||||
<P>This can be useful in at least two scenarios.
|
||||
</P>
|
||||
|
@ -70,12 +71,12 @@ atom styles, so they can be used by atom styles that don't define
|
|||
them.
|
||||
</P>
|
||||
<P>More generally, the <I>i_name</I> and <I>d_name</I> vectors allow one or more
|
||||
new per-atom properties to be defined. Each name must be unique and
|
||||
can use alphanumeric or underscore characters. These vectors can
|
||||
store whatever values you decide are useful in your simulation. As
|
||||
explained below there are several ways to initialize and access and
|
||||
output these values, both via input script commands and in new code
|
||||
that you add to LAMMPS.
|
||||
new custom per-atom properties to be defined. Each name must be
|
||||
unique and can use alphanumeric or underscore characters. These
|
||||
vectors can store whatever values you decide are useful in your
|
||||
simulation. As explained below there are several ways to initialize
|
||||
and access and output these values, both via input script commands and
|
||||
in new code that you add to LAMMPS.
|
||||
</P>
|
||||
<P>This is effectively a simple way to add per-atom properties to a model
|
||||
without needing to write code for a new <A HREF = "atom_style.html">atom style</A>
|
||||
|
@ -177,11 +178,11 @@ dump 1 all custom 100 tmp.dump id x y z c_1<B>1</B> c_1<B>2</B>
|
|||
</PRE>
|
||||
<HR>
|
||||
|
||||
<P>This section is for users who wish to write new pair styles,
|
||||
fixes, or computes that use the per-atom properties defined
|
||||
by this fix.
|
||||
</P>
|
||||
<P>Need to add some details here.
|
||||
<P>If you wish to add new <A HREF = "pair_style.html">pair styles</A>,
|
||||
<A HREF = "fix.html">fixes</A>, or <A HREF = "compute.html">computes</A> that use the per-atom
|
||||
properties defined by this fix, see <A HREF = "Section_modify.html#mod_1">Section
|
||||
modify</A> of the manual which has some details
|
||||
on how the properties can be accessed from added classes.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ The atom style used for a simulation defines a set of per-atom
|
|||
properties, as explained on the "atom_style"_atom_style.html and
|
||||
"read_data"_read_data.html doc pages. The latter command allows these
|
||||
properties to be defined for each atom in the system when a data file
|
||||
is read. This fix will augment the set of properties with new ones.
|
||||
is read. This fix will augment the set of properties with new custom
|
||||
ones.
|
||||
|
||||
This can be useful in at least two scenarios.
|
||||
|
||||
|
@ -60,12 +61,12 @@ atom styles, so they can be used by atom styles that don't define
|
|||
them.
|
||||
|
||||
More generally, the {i_name} and {d_name} vectors allow one or more
|
||||
new per-atom properties to be defined. Each name must be unique and
|
||||
can use alphanumeric or underscore characters. These vectors can
|
||||
store whatever values you decide are useful in your simulation. As
|
||||
explained below there are several ways to initialize and access and
|
||||
output these values, both via input script commands and in new code
|
||||
that you add to LAMMPS.
|
||||
new custom per-atom properties to be defined. Each name must be
|
||||
unique and can use alphanumeric or underscore characters. These
|
||||
vectors can store whatever values you decide are useful in your
|
||||
simulation. As explained below there are several ways to initialize
|
||||
and access and output these values, both via input script commands and
|
||||
in new code that you add to LAMMPS.
|
||||
|
||||
This is effectively a simple way to add per-atom properties to a model
|
||||
without needing to write code for a new "atom style"_atom_style.html
|
||||
|
@ -167,11 +168,11 @@ dump 1 all custom 100 tmp.dump id x y z c_1[1] c_1[2] :pre
|
|||
|
||||
:line
|
||||
|
||||
This section is for users who wish to write new pair styles,
|
||||
fixes, or computes that use the per-atom properties defined
|
||||
by this fix.
|
||||
|
||||
Need to add some details here.
|
||||
If you wish to add new "pair styles"_pair_style.html,
|
||||
"fixes"_fix.html, or "computes"_compute.html that use the per-atom
|
||||
properties defined by this fix, see "Section
|
||||
modify"_Section_modify.html#mod_1 of the manual which has some details
|
||||
on how the properties can be accessed from added classes.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -201,4 +202,3 @@ property/atom"_compute_property_atom.html
|
|||
[Default:]
|
||||
|
||||
The default keyword values are ghost = no.
|
||||
|
||||
|
|
12
doc/set.html
12
doc/set.html
|
@ -23,7 +23,7 @@
|
|||
|
||||
<LI>keyword = <I>type</I> or <I>type/fraction</I> or <I>mol</I> or <I>x</I> or <I>y</I> or <I>z</I> or <I>charge</I> or <I>dipole</I> or <I>dipole/random</I> or <I>quat</I> or <I>quat/random</I> or <I>diameter</I> or <I>shape</I> or <I>length</I> or <I>tri</I> or <I>theta</I> or <I>angmom</I> or <I>mass</I> or <I>density</I> or <I>volume</I> or <I>image</I> or
|
||||
<I>bond</I> or <I>angle</I> or <I>dihedral</I> or <I>improper</I> or
|
||||
<I>meso_e</I> or <I>meso_cv</I> or <I>meso_rho</I>
|
||||
<I>meso_e</I> or <I>meso_cv</I> or <I>meso_rho</I> or <I>i_name</I> or <I>d_name</I>
|
||||
|
||||
<PRE> <I>type</I> value = atom type
|
||||
value can be an atom-style variable (see below)
|
||||
|
@ -82,7 +82,9 @@
|
|||
<I>meso_cv</I> value = heat capacity of SPH particles (need units)
|
||||
value can be an atom-style variable (see below)
|
||||
<I>meso_rho</I> value = density of SPH particles (need units)
|
||||
value can be an atom-style variable (see below)
|
||||
value can be an atom-style variable (see below)
|
||||
<I>i_name</I> value = value for custom integer vector with name
|
||||
<I>d_name</I> value = value for custom floating-point vector with name
|
||||
</PRE>
|
||||
|
||||
</UL>
|
||||
|
@ -349,6 +351,12 @@ capacity, and density of smmothed particle hydrodynamics (SPH)
|
|||
particles. See <A HREF = "USER/sph/SPH_LAMMPS_userguide.pdf">this PDF guide</A> to
|
||||
using SPH in LAMMPS.
|
||||
</P>
|
||||
<P>Keywords <I>i_name</I> and <I>d_name</I> refer to custom integer and
|
||||
floating-point properties that have been added to each atom via the
|
||||
<A HREF = "fix_property_atom.html">fix property/atom</A> command. When that command
|
||||
is used specific names are given to each attribute which are what is
|
||||
specified as the "name" portion of <I>i_name</I> or <I>d_name</I>.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>You cannot set an atom attribute (e.g. <I>mol</I> or <I>q</I> or <I>volume</I>) if
|
||||
|
|
12
doc/set.txt
12
doc/set.txt
|
@ -21,7 +21,7 @@ keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
|
|||
{length} or {tri} or {theta} or {angmom} or \
|
||||
{mass} or {density} or {volume} or {image} or
|
||||
{bond} or {angle} or {dihedral} or {improper} or
|
||||
{meso_e} or {meso_cv} or {meso_rho} :l
|
||||
{meso_e} or {meso_cv} or {meso_rho} or {i_name} or {d_name} :l
|
||||
{type} value = atom type
|
||||
value can be an atom-style variable (see below)
|
||||
{type/fraction} values = type fraction seed
|
||||
|
@ -79,7 +79,9 @@ keyword = {type} or {type/fraction} or {mol} or {x} or {y} or {z} or \
|
|||
{meso_cv} value = heat capacity of SPH particles (need units)
|
||||
value can be an atom-style variable (see below)
|
||||
{meso_rho} value = density of SPH particles (need units)
|
||||
value can be an atom-style variable (see below) :pre
|
||||
value can be an atom-style variable (see below)
|
||||
{i_name} value = value for custom integer vector with name
|
||||
{d_name} value = value for custom floating-point vector with name :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
@ -345,6 +347,12 @@ capacity, and density of smmothed particle hydrodynamics (SPH)
|
|||
particles. See "this PDF guide"_USER/sph/SPH_LAMMPS_userguide.pdf to
|
||||
using SPH in LAMMPS.
|
||||
|
||||
Keywords {i_name} and {d_name} refer to custom integer and
|
||||
floating-point properties that have been added to each atom via the
|
||||
"fix property/atom"_fix_property_atom.html command. When that command
|
||||
is used specific names are given to each attribute which are what is
|
||||
specified as the "name" portion of {i_name} or {d_name}.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
You cannot set an atom attribute (e.g. {mol} or {q} or {volume}) if
|
||||
|
|
Loading…
Reference in New Issue