Installing LAMMPS in Ubuntu Linux 22.04

Before installing, we need to install ppa: gladky-anton/lammps through a command line.
I tried this first command from lammps documentation page: sudo add-apt-repository ppa:gladky-anton/lammps, I got this error.

Err:6 Index of /gladky-anton/lammps/ubuntu jammy Release
** 404 Not Found [IP: 185.125.190.52 443]**
**Reading package lists… Done **
E: The repository ‘Index of /gladky-anton/lammps/ubuntu jammy Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

With this error message I could not go further installing lammps-stable executable.

I tried to install build and compile with CMAKE, to configure and compile packages when putting ccmake …/cmake to turn packages on, configure and run. I got similar error when put make -j 4, and make install.
Although I am very new to lammps and linux OS, I will appreciate some suggestions to overcome this challenge.

[quote=“Tirmidhi, post:1, topic:43610”]
ps-stable executable.

I don’t recommend installing a binary from a repository, as they’re usually out of date. That one in particular is over 2 years old, IIRC.

Concerning your install and build attempt, can you please give the exact commands you used and the exact errors you received? Because you shouldn’t receive a “similar” error to the repository error when building from source.

1 Like

It looks like the Ubuntu LAMMPS package has been promoted from a PPA to a standard distribution package. As @Michael_Jacobs it is (still) not fully up-to-date, but it does support all recent and supported Ubuntu versions including 22.04LTS. I just did a check on a local installation and simply executing:

apt-get install lammps

Should do the trick. The lammps executable is called lmp:

$ lmp -h

Large-scale Atomic/Molecular Massively Parallel Simulator - 29 Sep 2021 - Update 2

Usage example: lmp -var t 300 -echo screen -in in.alloy

[...]

-var varname value          : set index style variable (-v)

OS: Linux "Ubuntu 22.04 LTS" 5.15.0-39-generic on x86_64

Compiler: GNU C++ 11.2.0 with OpenMP 4.5
C++ standard: C++11
MPI v3.1: Open MPI v4.1.2, package: Debian OpenMPI, ident: 4.1.2, repo rev: v4.1.2, Nov 24, 2021

Accelerator configuration:


Active compile time flags:

-DLAMMPS_GZIP
-DLAMMPS_PNG
-DLAMMPS_JPEG
-DLAMMPS_SMALLBIG
sizeof(smallint): 32-bit
sizeof(imageint): 32-bit
sizeof(tagint):   32-bit
sizeof(bigint):   64-bit

Installed packages:

ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE EXTRA-PAIR GRANULAR KIM 
KSPACE MANYBODY MC MISC MOLECULE MPIIO OPT PERI POEMS PYTHON QEQ REPLICA RIGID 
SHOCK SRD VORONOI 

As can be seen from the configuration info, it is the 29 Sep 2021 stable version, i.e. the previous stable release not the latest (23 June 2022) and it is configured for only a subset of the available packages and no accelerators.

I will update the LAMMPS manual accordingly.

Dear Michael,
Thanks for the response. The command and error were in my previous message. I think it is because of Ubuntu 22.04 LTS jammy Linux that I used. I resolved this by installing Fedora focal 20.04 linux.
Regards,
Tirmidhi

Dear Akohlmey,
Thanks for this information. I had resolved this by installing Ubuntu Fedora 20.04.4 LTS focal release. It is working perfectly now. I am sorry for this late response as I was busy trying to get this solved.
Regards,
Tirmidhi

There is no such thing as “Ubuntu Fedora”. It is either Ubuntu Linux or Fedora Linux.

What you did is the - by far - worst possible solution. You are now using an old version of Linux and a very old version of LAMMPS. As I already alluded to, Anton Gladky’s PPA has not been updated in a long time and seems unmaintained. A while ago I had asked him about updating it and he told me that he doesn’t need to use LAMMPS anymore and would only be interested to continue maintaining the PPA if somebody would compensate him for the effort.

Had you actually installed Fedora Linux (current is version 36), you would be in a much better shape since the binary packages of LAMMPS for Fedora are up-to-date and much more complete. I don’t want to start a flame war of which Linux distribution is the best, but as far as support for pre-compiled LAMMPS packages goes, you will have a hard time to find something done more thoroughly and completely.

Thanks for enlightened me on Linux distribution. I installed Fedora Linux. I think I can upgrade it. I will follow your advice.