.. _howto.marker_particles:

Visualize internal motion using marker marker 
=============================================

.. figure:: /images/howtos/shear_marker.gif
   :figwidth: 40%
   :align: right
   
   Marker atoms in a crystal being deformed

Marker or tracer particles are a way to make the internal deformation or diffusion within a system visible 
as shown in the simple example on the right. The following recipe explains how to 
make sure that the set of selected marker particles, once defined on the first frame,
remains the same over the entire course of the simulation.

The example animation has been created as follows:

1.  First we apply the :ref:`particles.modifiers.slice` modifier at frame 0 of the simulation (the initial state) to select a stripe of atoms. Activate the modifier's :guilabel:`Create selection` option
    to let the modifier select the atoms instead of deleting them. 

#.  We then apply the :ref:`particles.modifiers.freeze_property` 
    modifier and choose the ``Selection`` particle property as the one
    to be frozen. The modifier automatically takes a snapshot of the particle selection state
    generated by the :ref:`particles.modifiers.slice` modifier and preserves it over time.

#.  Finally the :ref:`particles.modifiers.assign_color` modifier is used to assign a special marker color to the selected particles.
