<HTML>
<CENTER><A HREF = "https://sparta.github.io">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> 
</CENTER>






<HR>

<H3>fix vibmode command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID vibmode 
</PRE>
<UL><LI>ID is documented in <A HREF = "fix.html">fix</A> command
<LI>vibmode = style name of this fix command 
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 vibmode 
</PRE>
<P><B>Description:</B>
</P>
<P>Enable multiple vibrational energy levels, defined on a per-species
basis, to be used in a simulation.  This fix is meant to be used with
the <A HREF = "collide_modify.html">collide_modify vibrate discrete</A> setting
which means that the vibrational energy of each (non-monoatomic)
particle is discretized across one or more energy modes, each with its
own characteristic vibrational temperature.  This fix allocates
per-particle storage for the mode indices and also has code to
populate the multiple levels appropriately when particles are created.
Collisions between pairs of particles will then transfer energy
between the different modes of the two particles.
</P>
<P>An overview of how to run simulations with multiple vibrational energy
modes is given in the <A HREF = "Section_howto.html#howto_12">Section 4.12</A>.
This includes use of the <A HREF = "species.html">species</A> command with its
<I>vibfile</I> option, and the use of the <A HREF = "collide_modify.html">collide_modify vibrate
discrete</A> command.  The section also lists all the
commands that can be used in an input script to invoke various options
associated with the vibrational energy modes.  All of them depend on
this fix vibmode command being defined.
</P>
<P>Internally, this fix defines a custom particle attribute named
"vibmode".  It is an integer array with N values per particle.  N is
the maximum number of energy modes for any species defined in the
simulation.  The number of energy modes is half the vibrational
degrees of freedom defined for each species.  See the "species"
command for how the degrees of freedom and associated vibrational
temperatures and other properties are defined for each mode for each
species.
</P>
<P>Each of the N values is an integer count for the 
</P>
<HR>

<P><B>Restart, output info:</B>
</P>
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
files</A>.
</P>
<P>However, the values of the custom particle attribute defined by this
fix are written to the restart file.  Namely the integer values stored
in "vibmode" for each particle.  As explained on the
<A HREF = "read_restart.html">read_restart</A> doc page these values can be
re-assigned to particles when a restart file is read, if a new fix
vibmode command is specified in the restart script before the first
<A HREF = "run.html">run</A> command is used.
</P>
<P>No global or per-particle or per-grid quantities are stored by this
fix for access by various output commands.
</P>
<P>However, the custom particle attributes defined by this fix can be
accessed by the <A HREF = "dump.html">dump particle</A> command, as p_vibmode.  That
means those per-particle values can be written to particle dump files.
</P>
<P><B>Restrictions:</B>
</P>
<P>This fix is required if "collide_modify vibrate discrete" is used and
there is one or more species defined which haave multiple vibrational
energy modes (2 or more).  In this scenario, if it is not defined, an
error will occur when a "create_particles" or <A HREF = "run.html">run</A> command
is issued.  Conversely, if no species has multiple vibrational modes,
this fix cannot be used.
</P>
<P>Defining this fix after particles have been created will not populate
the vibrational energy modes of particles that already exist.  An
exception is if the <A HREF = "read_restart.html">read_restart</A> command is used
to read in particles from a previous simulation where this fix was
used.  In that case, defining this fix after reading the restart file
will enable the particles to keep their previous vibrational energy
mode values.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "collide_modify.html">collide_modify vibrate discrete</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>
