Computational Materials Modelling Using LAMMPS

Welcome





This isn't an ordinary video editing. It's a molecular dynamic simulation's visualisation. Here I have made Mono Hydrogen(H) atoms to vibrate. Sounds interesting right! This is a very simple simulation, and you can do it easily. But before doing that you need to understand the software. Don't worry if you don't know. Keep visiting the blog so that you can learn easily.

Software used: LAMMPS
Visualisation done on: OVITO

If you are interested in the above simulation and you want your name to be displayed like that, contact me through E-Mail mentioning the text which you want to display. Keep the text short so that I can generate the simulation as earlier as possible.

What is LAMMPS?

Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS) is an open-source, Molecular dynamics software, basically written on C++, finds it's application in fields like material science, molecular biology, drug discovery and many more. It works on the principle of Statistical mechanic and solves various Newtonian equations for each and every atom specified in the system.
As I am particularly working on materials, I would like to share some of the useful features of LAMMPS:

Statistical mechanics

Classical thermodynamics considers only the macroscopic properties of the system and explain the relationship between those properties. It does not explain how those properties are acquired by the system. Statistical mechanics provides a connection between microscopic and macroscopic behaviour of the system.

Prerequisites

1. Basic knowledge in material science
2. Basics of statistical mechanics
3. LAMMPS software
4. Ovito software
5. Atom text editor (You can also use Notepad instead of Atom if you are a windows user)

Installation and running of LAMMPS

LAMMPS Installation

Installation in windows 


2. Click on 32-bit available versions with all available installer versions or 64-bit available versions with all available installer versions as per your system configuration.

3. Download LAMMPS 32-bit-19 April 2020.exe or LAMMPS 64-bit-19 April 2020.exe as per your system configuration. These are the latest version available when I am making the blog. You can download whatever the latest version available.

Installing and running of OVITO

OVITO Installation

2. Click on Download 
3. Download the ovito as per your system (Windows/Linux/macOS) 
4. You may need to sign in to download it. Do create an account if you are new to it. It’s free. 
5. Then download the ovito basic and install it. Then open it. 
6. Load dump files (which are generated by LAMMPS codes) by dragging it into the ovito.

Input and output files

Input File

Input script of LAMMPS can be written in any text editor. I generally use the Atom text editor. You can also use Notepad. The format of the input script should be ".txt" or ".in". While writing the input script, you should keep in mind that LAMMPS read the script one line at a time. It reads a line, executes it and then it goes to the next line. So be cautious on what command should be executed first. Also, you can add comments to the script wherever you want my just adding # before the comment. Anything after a # will not be executed by LAMMPS.

Molecular static simulation of Argon gas

Input script

#-------------------------------------------------------------------------------------------------------------------------
units metal #What are the units you will use to specify various things in the input file? 
boundary p p p #<Specify periodic boundary condition are needed in all three faces of the simulation box> 
atom_style atomic #<What style of atoms is to be used in the simulation>
log logfile.txt #<Write the log file to this text file. All thermodynamic information is applicable to the entire system>

Molecular dynamics simulation of Argon gas

Input script

#-------------------------------------------------------------------------------------------------------------------------
units metal #What are the units you will use to specify various things in the input file?
boundary p p p #Specify periodic boundary condition are needed in all three faces
atom_style atomic #What style of atoms is to be used in the simulation
log logfile.txt #Write the log file to this text file. All thermodynamic information applicable to the entire system
#================================================
region forbox block 0 45.8 0 45.8 0 45.8 units box
#Refers to an abstract geometric region of space. units box refers to the fact that the size of the box is specified in the units as given in the units command. The name "forbox" refers to the region ID so that you can refer to it somewhere else in this input script.
create_box 1 forbox #Create the box

Interatomic Potential

Force acting between atoms are termed as interatomic potential. It is really important to specify this force in LAMMPS script. We do that using the commands pair_style and pair_coeff. There are different types of potentials available like LJ, EAM, EAM/Alloy etc. pair_style specifies the potential type and pair_coeff specifies potential values.