Graphene LAMMPS Simulation - LAMMPS and MD

Overview

The goal of this project is to visualize a sheet of graphene undergoing heating. For this purpose, the method of Molecular Dynamics (MD) was chosen, and the simulation tool was chosen to be LAMMPS- Large-scale Atomic/Molecular Massively Parallel Simulator.

Molecular Dynamics

MD is a method where one solves the Newton equations of motion for an N-body system. Knowing the interactioin forces (potential) between particles, we can numerically calculate the trajectory of each particle (mainly atoms). Getting the position of each particle, we can visualize complex systems with a large number of atoms, which would be very difficult otherwise. For a given system, we should choose the right potential acting between the particles (the potential for metal atoms probably won't be correct for a ceramic material), and select initial conditions.

LAMMPS

LAMMPS is an open-source code, distributed by Sandia National Laboratories. LAMMPS requires an input script, where the user specifies the commands for the simulation. For simple simulations, the commands refer to the type of the particles, the size of the simulation box, boundary conditions, lattice structure etc. LAMMPS provide some default options (e.g. for different lattices) and also provides the option to specify an input for commands (e.g. custom lattice from input file). For a full manual visit LAMMPS web page

LAMMPS Script

This script was used to run one of the simulations in this project.



Click here for this script.

This is a basic LAMMPS script. It has 4 parts- Initialization, Atom creation, Settings and Dynamics. The most important commands are marked with a red arrow and number.

1) dimension - this command specifies the dimensions of the simulation.
2) boundary - this command speicfies the simulation boundary conditions- p stants for periodic. The user can specify different boundary conditions in different dimensions (i.e. periodic in x,y and fixed in z).
3) pair_style - refers to the potential chosen for the simulation. The potential chosen here is the tersoff potential, and the potential file used for calculations must be included in the directory where the script is located. Download the potential filehere.
4) lattice - this command is used to specify the lattice structure or atom positions. LAMMPS has several default lattices such as fcc (face centered cubic) or bcc (body centered cubic). In this script the atom positions were specified using primitive vectors and basis vectors.
5) pair_coeff - refers to the potential chosen. In my simulation it was the tersoff potential.
6) dump - command to specify on how frequently LAMMPS should create an xyz file with atom location. Here, it is supposed to create such a file every 50 steps, for all atom locations, and each file is named "out.diamond.*.xyx". The asterisk will be replpaced with a serial number.
7) fix heating - heating of and area in the simulation box. In this case, heating is for all atoms, and the temprature remains constant at 300K. The last value is the heating rate.

*References for other commands can be found in the LAMMPS manual (link above).

Running a Simulation

*All the simulations in this project were run on Tamnun, so the instructions will refer to that.

In order to run a simulation, you will have to prepare a pbs (Portable Batch System) file. When you run a simulation using a batch file, you place it on a queue on Tamnun (some specific queue), and the system will manage it, and run it according to priority on that queue (there is a way of running the file directly or 'interactively' but it is not recommended).


Here is an example pbs file



Click here for this pbs file.

The rectangles highlight the important information that should be in your pbs file.
Second rectangle- shows the name of the queue you are using. Be sure you type it correctly (it is case-sensitive).
Third rectangle- working directory on Tamnun. You only need to change what goes after the forward slash.
Fourth rectangle- specify the script file name you are using. In this case it is "in.script2". Don't change anything else on this line.

When finished creating the script file and pbs file, you will want to run the job using the command:

qsub filename.pbs

In order to monitor the progress of your job, you can use:

qstat

Back to project main page