Learning how to use LAMMPS
LAMMPS is an open source software that performs classical molecular dynamics simulations which are nowadays of fundamental importance in materials science. This software isn’t the most user friendly tool and requires some training. Antoine Rincent, a master’s student in our group, worked with this program for a couple of years and learnt how to use it. He presents here different beginner’s guides that may be used as reference material for students that want to start using LAMMPS. The goal of this section is for the reader to save some time at the beginning of their learning process. Please note that the guides are written in french at the moment and will be translated in English soon.
Before learning how to use LAMMPS, it’s important to install it which can be done in multiple ways on different plate-forms! Antoine personally recommends working on a Linux computer, for which the installation works simply by using the application manager. In this case the installation is a simple process and will efficiently run parallel simulations. However, as many students use Windows, Antoine wrote a guide on how to install LAMMPS for Windows:
Introductory exercise: Relaxing a simple supercell at 0K
Now that LAMMPS is installed, it’s a good idea to run a simple script to make sure it works on your machine, below is a .zip containing a simple and fast simulation, with a guide explaining the functions called in this simple simulation :
Ramping up the difficulty: Au-Cu simulations using the Morse potential
Now that you’ve had your first run with LAMMPS, it’s a good idea to do a simulation a little more advanced, but still beginner friendly. In this following .zip is a series of simulations, their goal being to determine the enthalpy of Au-Cu supercells (ordered solid solutions) as a function of both temperature and pressure. Note that the document explaining how to use scripts does not show results, as these are used for a scientific work in progress, however, feel free to run the simulations and process the obtained data.
Advanced LAMMPS simulation: melting using the interface method
Once that’s understood, it’s possible to perform a state-of-the-art simulation. In this example, we use the interface method (which consists of having at the beginning of the simulation a solid/liquid interface) to evaluate the melting temperature of solid phase. This approach yields much better results than a classical simulation in which you would increase temperature and analyze the enthlalpy (as this leads to a mechanical melting at a much higher temperature).
Just under the .zip is a video showing a result of the interface method on an Al-Ni alloy, under the melting temperature, notice the initially solid phase (in the middle) spreading towards the edges of the simulation box.
Additional useful tips
Understanding LAMMPS performance output
To go hand in hand with the above LAMMPS examples, we present here a document on how to evaluate the computational performance at the end of a LAMMPS simulation. We also explain how to diagnose some typical issues occurring during the simulations.
Comprendre les informations de performances de LAMMPS
Using a supercomputer
Should you have the luck of having access to a cluster or a supercomputer to run your simulations, you might find the usage of LAMMPS as being a bit complicated, as it will be entirely off of a command line interface, without a GUI. Here’s a guide on how to use Béluga for LAMMPS, including how to submit jobs and performance benchmarks.
Utilisation de Béluga pour LAMMPS
Animating your results
Finally, either to diagnose an issue with a simulation, or to illustrate it for a meeting or a presentation, it’s useful to know how to make state-of-the-art animations of what you just simulated in LAMMPS at the atomic scale. An example of such a video was presented in a previous section above. For this, Antoine recommend using Ovito and Adobe Premiere Pro (to animate the pictures created using Ovito, but any other software would do), and here’s a guide on my workflow for this specific purpose :