Beginners Tutorial

Asking for help
If you get stuck somewhere, please reach out to us on the #tutorial channel on our Workshop Slack. An invitation to this Slack will be sent to all registered attendees ahead of the workshop.

Preparation

To avoid spending time on compilation and installation of LAMMPS and related software, we prepared pre-compiled packages for Linux, MacOS, and Windows.

Each package comes with pre-compiled verisons of the latest LAMMPS stable release, along with some tools for visualization and launcher that will initialize a command-line interface and install necessary Python dependencies.

IMPORTANT

If you are attending the beginner session during the workshop please try to install the package AHEAD OF TIME and follow the instructions in the README to verify you have a working setup. We will assume all attendees have done that.


1

Install the tutorial LAMMPS package for your platform

lammps-stable-win64-x86_64.zip
SHA256: 2beee70e787c153bc64f4073e44434457c6684c95ed0e41c6512278ad6cedc04
lammps-stable-macos-universal.dmg
SHA256: cda3a16985a02bf00b5593df338400e228136b861976c6d43965d19b347854c9
lammps-stable-linux-x86_64
SHA256: bb44260125061dbbd443cdc35085aceb9323e2b9439c2f6a963d5b3bcdb2cf9f

Windows

Download the Windows package and find it in your Downloads folder. Extract the ZIP file via Right-Click -> Extract all

The Windows package contains a LAMMPS folder, which contains an embedded Python installation and all LAMMPS binaries, two launchers for opening up a CLI terminal either with Windows Terminal (Installable via Microsoft Store) or PowerShell (installed by default), and a README.txt

MacOS

Download the MacOS DMG file and open it. The mounted disk image will have a graphical installer, which instructs you to drag the LAMMPS app into your Applications folder. Doing so will require admin rights.

Follow the steps in the README to ensure the application can be executed.

Linux

Download the Linux package and find it in your Downloads folder. Extract the tarball either via Right-Click -> Extract, or using a terminal with the tar command:


    cd ~/Downloads
    tar xzf lammps-stable-linux-x86_64.tar.gz
    

The Linux package contains a LAMMPS folder, a launcher for opening up a CLI terminal, and a README.txt


2

Download the LAMMPS Tutorial files and extract them


Download Tutorial Files

Download the ZIP file and extract it at a location of your choice. The rest of these instructions assume you extracted the folder in your Downloads folder.


3

Start the LAMMPS command-line

Windows

Use the LAMMPS (Windows Terminal) or LAMMPS (PowerShell) launcher to create a new terminal to work in

If you want to familiarize yourself with PowerShell, you can find tutorials from Microsoft.

MacOS

Launch the LAMMPS app to create a new terminal to work in

Linux

Double-click the LAMMPS CLI launcher

This will open up a terminal, that if successful, will display that the LAMMPS command-line environment has been loaded

For people not familiar with Linux in general, it will be beneficial to look up some Linux tutorials on the web and practice a little bit working on Linux (if you want to use LAMMPS on any HPC facility in the future, you will have to learn it anyway). E.g., there are tutorials in multiple languages on Linux Journey like Command Line, Text-Fu, and Advanced Text-Fu.


4

Read the tutorial/README.txt file

The README explains how to quickly try out all the software tools that will be used in the tutorial. Please do this (one time) in advance of the tutorial, so that you will be familiar with the tools when we start the first hands-on session of the tutorial.

Windows

Open a LAMMPS terminal and go to the extracted tutorial folder. Here we assume you extracted it in your Downloads folder.


    cd $Env:USERPROFILE\Downloads
    

MacOS/Linux

Open a LAMMPS terminal and go to the extracted tutorial folder. Here we assume you extracted it in your Downloads folder.


    cd ~/Downloads/tutorial
    

Known issues

MacOS: LAMMPS.app is damaged and can’t be opened. You should move it to the Trash

  • Verify that the download was not corrupted

    shasum -a 256 ~/Downloads/lammps-stable-macos-universal.dmg
    # string should match the SHA256 at the top of this page
    
  • Open Terminal and run the following command:

    Warning
    Only proceed if the file was not corrupted during download. The following command disables protections that would normally keep your computer safe from malicious code. If the checksum does not match, redownload the file until it matches.
    # this will clear security attributes in the installed App
    # including remove the "this App was downloaded from the Internet" notice
    sudo xattr -cr /Applications/LAMMPS.app/