← back to the examples

Triangulated surfaces around groups of atoms

This is a demonstration of using fix graphics/chunk to visualize the shape of groups of atoms.

The fix builds a triangulated surface around each chunk of atoms — as defined by a compute chunk/atom command — using a Delaunay triangulation and alpha shape extraction, so the surface follows the shape of the chunk instead of enclosing it in a plain convex hull. The dump image command then renders the result in one of two styles:

  • In the animation on the left, the surface is rendered as wireframe for the peptide molecule in the peptide example. The wireframe mesh allows to see rather well what is inside the triangulated surface.
  • The animation on the right combines both styles in a periodic simulation box using the rhodo benchmark example where has a peptide molecules, lipid molecules and water. The lipids (green) and water (blue) are rendered as separate solid surfaces and restricted to a subregion of the box and thuse the details are hidden and the peptides and are visible with a wireframe mesh around its atoms. The view also rotates to show the three-dimensional shape of the surfaces using an equal style variable derived from the timestep number for the view angle instead of as fixed number.

For more information, see the LAMMPS Visualization Howto.