2006-09-22 00:22:34 +08:00
|
|
|
"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
|
|
|
|
|
|
|
|
mass command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
|
|
|
mass I value :pre
|
|
|
|
|
2008-03-01 09:13:20 +08:00
|
|
|
I = atom type (see asterisk form below)
|
2006-09-22 00:22:34 +08:00
|
|
|
value = mass :ul
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
|
|
|
mass 1 1.0
|
|
|
|
mass * 62.5
|
|
|
|
mass 2* 62.5 :pre
|
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2009-05-19 22:57:46 +08:00
|
|
|
Set the mass for all atoms of one or more atom types. Per-type mass
|
|
|
|
values can also be set in the "read_data"_read_data.html data file
|
|
|
|
using the "Masses" keyword. See the "units"_units.html command for
|
|
|
|
what mass units to use.
|
2009-01-20 01:17:01 +08:00
|
|
|
|
|
|
|
The I index can be specified in one of two ways. An explicit numeric
|
|
|
|
value can be used, as in the 1st example above. Or a wild-card
|
|
|
|
asterisk can be used to set the mass for multiple atom types. This
|
|
|
|
takes the form "*" or "*n" or "n*" or "m*n". If N = the number of
|
|
|
|
atom types, then an asterisk with no numeric values means all types
|
|
|
|
from 1 to N. A leading asterisk means all types from 1 to n
|
|
|
|
(inclusive). A trailing asterisk means all types from n to N
|
|
|
|
(inclusive). A middle asterisk means all types from m to n
|
|
|
|
(inclusive).
|
|
|
|
|
|
|
|
A line in a "data file"_read_data.html that follows the "Masses"
|
|
|
|
keyword specifies mass using the same format as the arguments of the
|
|
|
|
mass command in an input script, except that no wild-card asterisk can
|
|
|
|
be used. For example, under the "Masses" section of a data file, the
|
|
|
|
line that corresponds to the 1st example above would be listed as
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
1 1.0 :pre
|
|
|
|
|
2009-01-20 01:17:01 +08:00
|
|
|
Note that the mass command can only be used if the "atom
|
2009-05-19 22:57:46 +08:00
|
|
|
style"_atom_style.html requires per-type atom mass to be set.
|
2011-04-14 05:39:34 +08:00
|
|
|
Currently, all but the {sphere} and {ellipsoid} and {peri} styles do.
|
|
|
|
They require mass to be set for individual particles, not types.
|
|
|
|
Per-atom masses are defined in the data file read by the
|
|
|
|
"read_data"_read_data.html command, or set to default values by the
|
2009-05-19 22:57:46 +08:00
|
|
|
"create_atoms"_create_atoms.html command. Per-atom masses can also be
|
2011-04-14 05:39:34 +08:00
|
|
|
set to new values by the "set mass"_set.html or "set density"_set.html
|
|
|
|
commands.
|
2009-01-20 01:17:01 +08:00
|
|
|
|
|
|
|
Also note that "pair_style eam"_pair_eam.html defines the masses of
|
|
|
|
atom types in the EAM potential file, in which case the mass command
|
|
|
|
is normally not used.
|
|
|
|
|
|
|
|
If you define a "hybrid atom style"_atom_style.html which includes one
|
|
|
|
(or more) sub-styles which require per-type mass and one (or more)
|
2009-09-29 22:10:23 +08:00
|
|
|
sub-styles which require per-atom mass, then you must define both.
|
|
|
|
However, in this case the per-type mass will be ignored; only the
|
|
|
|
per-atom mass will be used by LAMMPS.
|
2009-01-20 01:17:01 +08:00
|
|
|
|
2006-09-22 00:22:34 +08:00
|
|
|
[Restrictions:]
|
|
|
|
|
|
|
|
This command must come after the simulation box is defined by a
|
|
|
|
"read_data"_read_data.html, "read_restart"_read_restart.html, or
|
|
|
|
"create_box"_create_box.html command.
|
|
|
|
|
2009-01-20 01:17:01 +08:00
|
|
|
All masses must be defined before a simulation is run. They must also
|
|
|
|
all be defined before a "velocity"_velocity.html or "fix
|
|
|
|
shake"_fix_shake.html command is used.
|
|
|
|
|
|
|
|
The mass assigned to any type or atom must be > 0.0.
|
2006-09-22 00:22:34 +08:00
|
|
|
|
|
|
|
[Related commands:] none
|
|
|
|
|
|
|
|
[Default:] none
|