<p>Note that the mass command can only be used if the <aclass="reference internal"href="atom_style.html"><spanclass="doc">atom style</span></a> requires per-type atom mass to be set.
Currently, all but the <em>sphere</em> and <em>ellipsoid</em> and <em>peri</em> 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
<aclass="reference internal"href="read_data.html"><spanclass="doc">read_data</span></a> command, or set to default values by the
<aclass="reference internal"href="create_atoms.html"><spanclass="doc">create_atoms</span></a> command. Per-atom masses can also be
set to new values by the <aclass="reference internal"href="set.html"><spanclass="doc">set mass</span></a> or <aclass="reference internal"href="set.html"><spanclass="doc">set density</span></a>
commands.</p>
<p>Also note that <aclass="reference internal"href="pair_eam.html"><spanclass="doc">pair_style eam</span></a> and <aclass="reference internal"href="pair_bop.html"><spanclass="doc">pair_style bop</span></a> commands define the masses of atom types in their
respective potential files, in which case the mass command is normally
not used.</p>
<p>If you define a <aclass="reference internal"href="atom_style.html"><spanclass="doc">hybrid atom style</span></a> which includes one
(or more) sub-styles which require per-type mass and one (or more)
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.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions</h2>
<p>This command must come after the simulation box is defined by a
<aclass="reference internal"href="read_data.html"><spanclass="doc">read_data</span></a>, <aclass="reference internal"href="read_restart.html"><spanclass="doc">read_restart</span></a>, or
<p>All masses must be defined before a simulation is run. They must also
all be defined before a <aclass="reference internal"href="velocity.html"><spanclass="doc">velocity</span></a> or <aclass="reference internal"href="fix_shake.html"><spanclass="doc">fix shake</span></a> command is used.</p>
<p>The mass assigned to any type or atom must be > 0.0.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.