LAMMPS-Molecular-Dynamics-Simulator/C2/Installation-of-LAMMPS-on-Linux-OS/English
Title of script: Installation of LAMMPS on Linux OS
Author: Dr.Snehalatha Kaliappan, Gopi Kundia, Prasad Baddi.
Keywords: LAMMPS installation, Linux OS, video tutorial.
| Visual Cue | Narration |
| Slide Number 1
Title Slide |
Welcome to this tutorial on Installation of LAMMPS on Linux OS. |
| Slide Number 2
Learning Objectives |
In this tutorial, we will learn to,
|
| Slide Number 3
System Requirements |
Here I am using,
|
| In the browser address bar, type www.lammps.org. | Let us download the required executable packages for LAMMPS installation.
Open any browser and in the address bar type www.lammps.org. |
| Cursor on the main page.
Under the Code column, click on the Download link. |
The website opens with many links.
In the table, under the Code column, click on the Download link. |
| Cursor on the page.
Scroll down the page. |
A web page opens with links to download the LAMMPS installer files.
Scroll down the page. |
| Cursor on the table LAMMPS Stable Release. | You will see a table with LAMMPS Stable Release with a release date.
It is 29 August 2024 for me. This date can be different depending upon the release of the stable version. |
| Cursor on the Manual link. | A link for the Manual is also available in this table.
Click on the link to explore the documentation and other useful information. |
| Click on the Download link in the row.
Show the file in the Downloads folder. |
Click on the Download link in this row.
lammps-stable.tar.gz file downloads to your Downloads folder. |
| right-click on lammps-stable.tar.gz choose, Extract here option. | Locate the file and right-click, choose, Extract here option. |
| Double-click to open the extracted lammps-stable folder. | Double-click to open the extracted lammps-stable folder. |
| Cursor on lammps-29Aug2024 folder.
Double-click on lammps-29Aug2024 folder. |
Here you will see another folder lammps-29Aug2024.
Double-click to open this folder. Here you will see many files. |
| Cursor on src folder.
Right-click on src folder. From the context-menu, choose Open in Terminal option. |
Navigate to the src folder.
Right-click to this folder. From the context-menu, choose Open in Terminal option. |
| Cursor on the path, highlight the path. | The terminal opens, you can see the path for the installer file at the prompt. |
| Type make serial.
Press Enter. |
At the prompt type make serial to build a serial executable.
Press Enter. The compilation may take some time since it is a large project with many features. |
| Text annotation on screen | We can also opt for parallel execution, in which case you have to type “make mpi”.
If MPI is not installed use the command ““sudo apt install mpich” command. MPI: Message Passing Interface. Please check the LAMMPS manual for details. |
| At the prompt, type pwd and press enter. | After the building is complete, we need to set the environment path.
At the prompt, type pwd and press Enter. |
| Type sudo gedit ~/.bashrc
Press enter |
Open bashrc file , type sudo gedit ~/.bashrc command.
bashrc file opens in the text editor. |
| Type,
export PATH= “/path/to/src:$PATH” |
At the end, add this line.
export PATH = “/path/to/src:$PATH” |
| export PATH = “/home/fossee/Downloads/lammps-stable/lammps-29Aug2024/src:$PATH” | In place of the “path” type the path for your installer file.
I am typing the path for my file. |
| Click on Save button at the top. | Save and close the file. |
| Click on plus button at the top left corner. | Click on plus button at the top left corner. |
| At the prompt type lmp_ then press tab. | To verify the installation of LAMMPS, at the prompt type lmp_ then press tab. |
| Cursor on the terminal. | Since I have installed the serial executable, I see lmp_serial at the prompt.
If parallel executable is installed you will see lmp_mpi. |
| Double click to open the src folder in the lammps-29Aug2024 folder.
Cursor on lmp_serial |
You can also open the src folder and locate the lmp_serial file.
This confirms the installation of LAMMPS on your system. |
| Open www.lammps.org website in a browser.
Click on the input script link. |
Let us run an input file to check the LAMMPS installation.
Open the lammps.org website. In the middle of the page, click on the input script link. |
| Use ctrl+c keys to copy and ctrl+v keys to paste. | The page refreshes with an input file.
Copy the script on the page. Paste it in a text editor. |
| Open a new gedit page and copy the input file.
Click on the Save button at the top right corner and save as test,in. |
I am using gedit here.
You can use any text editor of your choice. I am saving it as test.in in the Downloads folder. |
| Annotation on the screen. | Learners please note, avoid naming the input file with uppercase letters or any special characters.
This may result in the program not recognising the input file. |
| Cursor on the terminal. | Run the LAMMPS command in the directory where your input script is located.
The output files are also generated in the same directory by default. You can also provide specific paths on the command line. |
| Cursor on the new terminal.
Type cd Downloads at the prompt. Press Enter. |
Open a new terminal, and change the directory to where the input file is located.
I have saved it in the Downloads folder. I will type cd Downloads at the prompt. Press Enter. |
| Type the following command.
lmp_serial -in test.in Press Enter. |
Type the following command.
lmp_serial -in test.in, Press Enter. |
| Cursor on the terminal. | An output is seen in the terminal. |
| Open examples folder present in the lammps-29Aug2024 folder.
Point to the log file. |
You can test by running some more input files in the examples folder located in the lammps-29Aug2024 folder. |
| Slide Number 4
Summary |
Let's summarize.
In this tutorial we have,
|
| Slide Number 5
Thank you |
Thank you for joining. |