summaryrefslogtreecommitdiffstats
path: root/academic
diff options
context:
space:
mode:
author Giancarlo Dessi2023-09-03 04:28:06 +0200
committer Willy Sudiarto Raharjo2023-09-03 04:37:13 +0200
commit469fecd96428e7a5df4fa313f10f09a60a4baba1 (patch)
treefb929dafad90d9d6f0fa3a4be76761e610d194e5 /academic
parent2ee53a3a4ecf04b1480129a8a58e4706073d5852 (diff)
downloadslackbuilds-469fecd96428e7a5df4fa313f10f09a60a4baba1.tar.gz
academic/lammps: Added (molecular simulator).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/lammps/README48
-rw-r--r--academic/lammps/README.SBo209
-rw-r--r--academic/lammps/lammps.SlackBuild358
-rw-r--r--academic/lammps/lammps.info22
-rw-r--r--academic/lammps/slack-desc19
5 files changed, 656 insertions, 0 deletions
diff --git a/academic/lammps/README b/academic/lammps/README
new file mode 100644
index 0000000000..2a2f19c3ee
--- /dev/null
+++ b/academic/lammps/README
@@ -0,0 +1,48 @@
+LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
+Simulator.
+
+It is a classical molecular dynamics simulation code designed to
+run efficiently on parallel computers. It was developed at Sandia
+National Laboratories, a US Department of Energy facility.
+
+A basic installation of LAMMPS can be enhanced enabling the build of
+internal or external extensions (packages) that add methods and/or
+give support to third parts libraries or platforms.
+
+Dependencies strictly needed to build LAMMPS with most internal
+packages enabled are already present in a full installation of
+Slackware 15.0 and the slackbuild can be launched without any other
+dependency not released with the official Slackware. Only openmpi is
+highly recommended since LAMMPS takes advantage of the parallel
+computation. Furthermore some packages require it as strictly
+dependency. Instead of openmpi LAMMPS can be build with the support
+of mpich, although the latter does not support the enabling of a
+package (OPENMP). If any MPI platform is found in the system, LAMMPS
+will be built anyway but with a reduced functionality.
+
+Other optional dependencies available in Slackbuilds.org are
+autodetected and allow the enabling of some additional packages: HDF5,
+OpenBLAS, python3-numpy, voro++, PLUMED, netcdf. Other packages need
+third parts libraries given by downloaded extrafile and bundled in
+the application during the compilation. The slackbuild prevent the
+download during the build, so you have to download these extrafiles
+listed in lammps.info. Optional dependencies and the download of
+extrafiles are not needed if you do not require the respective
+packages.
+
+Warning: except to GPU, all packages are enabled by default if no
+dependencies are required (or they dependencies are found in the
+system), but you have to disable the packages that require the
+extrafiles listed in lammps.info if you do not download them,
+otherwise the build fails during the check of cmake.
+For GPU package you can try:
+ GPU=yes ./lammps.SlackBuild
+or
+ GPU=yes STATIC_OCL=yes ./lammps.SlackBuild
+The latter uses an internal static OpenCL loader.
+
+See README.SBo for a full list of available packages and their
+dependencies.
+
+Some packages available in the source of LAMMPS cannot be enabled for
+reasons reported in README.SBo.
diff --git a/academic/lammps/README.SBo b/academic/lammps/README.SBo
new file mode 100644
index 0000000000..07a8c3d1d2
--- /dev/null
+++ b/academic/lammps/README.SBo
@@ -0,0 +1,209 @@
+Table of contents
+
+1. HOW TO DISABLE NOT REQUIRED PACKAGES
+2. INTERDEPENDENT PACKAGES
+3. EXTERNAL PACKAGES
+4. LIST OF PACKAGES AND RELATED REQUIREMENTS
+5. PACKAGES NOT AVAILABLE
+6. NOTES
+
+1. HOW TO DISABLE NOT REQUIRED PACKAGES
+
+Almost all packages that are supported by your system and dependencies
+installed (autodetected) are enabled by default. You can disable those
+not required in three different ways:
+A. edit the code of the slackbuild
+ for example, a package enabled by default has this condition:
+ atc="" [ "${ATC:-no}" = "yes" ] && atc="-DPKG_ATC=yes "
+ if you want to disable it you have to edit as following:
+ atc="" [ "${ATC:-no}" = "yes" ] && atc="-DPKG_ATC=yes "
+B. remove the variables not required from the global $packages at line
+ 221. The script will not pass the related flags to cmake)
+ for example, if you want to disable AMOEBA and ATC you have to
+ remove the strings $amoeba and $atc from packages=$amoeba$asphere...
+C. pass to the script the related environment variable as following
+ AMOEBA=no ATC=no ./lammps.SlackBuild
+
+2. INTERDEPENDENT PACKAGES
+
+ The enabling of some packages require that also other packages are
+ enabled. For example, the ATC package require also MANYBODY enabled.
+ The script or cmake check if this condition is not respected, so all
+ required additional packages will be enabled automatically
+
+3. EXTERNAL PACKAGES
+
+ Various packages are build as bundled features that interface LAMMPS
+ to third part software that it should already installed in your
+ system. These deps are released with the official Slackware (fftw
+ for example) or available in Slackbuilds.org. Some packages require
+ the download of additional sources (listed in lammps.info). Please
+ make sure to download all required extrafiles if the dependent
+ package is enable. If you do not do this, the process will fail or
+ starts the download during the compilation.
+
+4. LIST OF PACKAGES AND RELATED REQUIREMENTS
+
+ For description of each package see the documentation on line at
+ https://docs.lammps.org/Packages_list.html
+
+ Dependencies available in the official Slackware are not reported.
+-----------------------------------------------------------------------
+PACKAGE ; ENV. VARIABLE ; ENABLED ALSO ; EXTERNAL DEPENDENCIES
+-----------------------------------------------------------------------
+AMOEBA ; AMOEBA ; ;
+ASPHERE ; ASPHERE ; ;
+ATC ; ATC ; MANYBODY ;
+AWPMD ; AWPMD ; ;
+BOCS ; BOCS ; ;
+BODY ; BODY ; ;
+BPM ; BPM ; ;
+BROWNIAN ; BROWNIAN ; ;
+CG-DNA ; CGDNA ; ASPHERE \
+ MOLECULE ;
+CG-SPICA ; CGSPICA ; ;
+CLASS2 ; CLASS2 ; ;
+COLLOID ; COLLOID ; ;
+COLVARS ; COLVARS ; ;
+COMPRESS ; COMPRESS ; ;
+CORESHELL ; CORESHELL ; ;
+DIELECTRIC ; DIELECTRIC ; EXTRA-PAIR \
+ KSPACE ;
+DIFFRACTION ; DIFFRACTION ; ;
+DIPOLE ; DIPOLE ; ;
+DPD-BASIC ; DPDBASIC ; ;
+DPD-MESO ; DPDMESO ; ;
+DPD-REACT ; DPDREACT ; ;
+DPD-SMOOTH ; DPDSMOOTH ; ;
+DRUDE ; DRUDE ; ;
+EFF ; EFF ; ;
+ELECTRODE ; ELECTRODE ; KSPACE ; OpenBLAS (optional)
+EXTRA-COMPUTE ; EXTRACOMPUTE ; ;
+EXTRA-DUMP ; EXTRADUMP ; ;
+EXTRA-FIX ; EXTRAFIX ; ;
+EXTRA-MOLECULE ; EXTRAMOLECULE ; ;
+EXTRA-PAIR ; EXTRAPAIR ; ;
+FEP ; FEP ; ;
+GPU ; GPU ; ; see NOTES
+GRANULAR ; GRANULAR ; ;
+H5MD ; H5MD ; ; hdf5 (needed)
+INTEL ; INTEL ; OPENMP ; see NOTES
+INTERLAYER ; INTERLAYER ; ;
+KOKKOS ; KOKKOS ; ; see NOTES
+KSPACE ; KSPACE ; ;
+LATBOLTZ ; LATBOLTZ ; ; see NOTES
+LEPTON ; LEPTON ; ;
+MACHDYN ; MACHDYN ; ;
+MANIFOLD ; MANIFOLD ; ;
+MANYBODY ; MANYBODY ; ;
+MC ; MC ; ;
+MDI ; MDI ; ; download extrasource
+MEAM ; MEAM ; ;
+MESONT ; MESONT ; MOLECULE ; download data file
+MGPT ; MGPT ; ;
+MISC ; MISC ; ;
+ML-HDNNP ; MLHDNNP ; ; download extrasource
+ML-IAP ; MLIAP ; ML-SNAP \
+ PYTHON ; python3-numpy (needed)
+ML-PACE ; MLPACE ; ; download extrasource
+ML-POD ; MLPOD ; ;
+ML-RANN ; MLRANN ; ;
+ML-SNAP ; MLSNAP ; ;
+MOFFF ; MOFFF ; ;
+MOLECULE ; MOLECULE ; ;
+NETCDF ; NETCDF ; ; netcdf
+OPENMP ; OPENMP ; ; openmpi (needed) \
+ (mpich not supported)
+OPT ; OPT ; ;
+ORIENT ; ORIENT ; ;
+PERI ; PERI ; ;
+PHONON ; PHONON ; KSPACE ;
+PLUMED ; PLUMED ; ; PLUMED
+POEMS ; POEMS ; ;
+PTM ; PTM ; ;
+PYTHON ; PYTHON ; ;
+QEQ ; QEQ ; ;
+QTB ; QTB ; ;
+REACTION ; REACTION ; ;
+REAXFF ; REAXFF ; ;
+REPLICA ; REPLICA ; ;
+RIGID ; RIGID ; ;
+SCAFACOS ; SCAFACOS ; ; download extrasource \
+ openmpi/mpich (needed)
+SHOCK ; SHOCK ; ;
+SMTBQ ; SMTBQ ; ;
+SPH ; SPH ; ;
+SPIN ; SPIN ; ;
+SRD ; SRD ; ;
+TALLY ; TALLY ; ;
+UEF ; UEF ; ;
+VORONOI ; VORONOI ; ; voro++
+YAFF ; YAFF ; ;
+-----------------------------------------------------------------------
+
+5. PACKAGES NOT AVAILABLE
+
+Some packages, available in the source, are not supported in this
+slackbuild for various reasons. These are:
+- ADIOS: requires a library not available in Slackware or SBo.
+- KIM: requires the download of extrasource during the compilation
+ which cannot prevented by a predownload.
+- ML-QUIP: the version for non-commercial uses can be downloaded only
+ during the compilation. A preventive download is allowed
+ only via git.
+- MOLFILE: this package supports the VMD plugin that is must be built
+ and installed only by sources or packages downloaded after
+ registration
+- MPIIO: this packages is unmantained and it should be enabled with
+ caution
+- MSCG: requires the download of extrasource during the compilation or
+ the installation in the system. This library is free and open
+ source but the anonymous download is not permitted.
+- QMMM: requires a library that can be built and installed from source
+ downloaded after registration
+- VTK: not available at the moment because the build fails. It is
+ possible that this is caused by the VTK built in my system: the
+ issue is a conflict with the support of VTK to openmpi in my
+ built. I have to make some tests to find the problem.
+
+6. NOTES
+
+The GPU package supports OpenCL, CUDA and HIP by setting the
+appropriate build configuration. See the documentation on line if you
+would extend the functionality of LAMMPS adapted to you hardware. This
+slackbuild sets a basic configuration build the package with OpenCL.
+LAMMPS can be build linking the system OpenCL or using a static
+internal OpenCL loader. To enable the build with the internal OpenCL
+you have to download the extrasource from the link indicated in
+lammps.info and pass the variable STATIC_OCL=yes to the slackbuild.
+The enabling of this package gives different results depending on the
+hardware/software configurations, so it is disabled by default because
+we have to apply additional settings to prevent the issues (build
+failures and segmentation faults). With a basic configuration I enabled
+it in a Slackware current with a an old Nvidia GPU and driver and
+using the system OpenCL (the bundled OpenCL gives segmentation fault).
+In other tests (Slackware 15 with older Nvidia GPU and driver,
+Slackware 32-bit in virtual machine) the build not works. You could
+passing GPU=yes (and eventually STATIC_OCL=yes) to the slackbuild to
+try if it works in your system with a basic configuration, but it is no
+guaranteed.
+
+The INTEL package takes advantage in build and runtime of an advanced
+configuration using Intel compilers and hardware it should work also
+with other with reduced performances. If detected, the build takes
+advantage of the parallelism (MPI and tbb, for example).
+
+KOKKOS is another package that enhance the functionality of LAMMPS
+taking advandage of the parallel computation. Since its build requires
+resources and a build with a single core seems very long, I set the
+enabling by default only for 64-bit architectures because I do not know
+how it can be useful in 32-bit systems.
+
+The LATBOLTZ package must be enabled only if LAMMPS is built with the
+support to MPI (openmpi or mpich). The script allows the enabling of
+LATBOLTZ if one of these dependencies are found in the system.
+
+By default, LAMMPS will be built with Python anyway, even if packages
+that require it will not be enabled. If you want disable the support
+to Python, you have to launch the slackbuild with
+ PYTHON=no ./lammps.SlackBuild
diff --git a/academic/lammps/lammps.SlackBuild b/academic/lammps/lammps.SlackBuild
new file mode 100644
index 0000000000..87ca1fe027
--- /dev/null
+++ b/academic/lammps/lammps.SlackBuild
@@ -0,0 +1,358 @@
+#!/bin/bash
+
+# Slackware build script for lammps
+
+# Copyright 2023 Giancarlo Dessi, Cagliari, IT
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=lammps
+VERSION=${VERSION:-2023.08.02}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+SRCNAM=lammps-stable
+SRCVERSION=${SRCVERSION:-2Aug2023}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+# First detect if openmpi or mpich are installed, so we can build LAMMPS with the
+# parallel computing and enable some packages
+MP=""
+mpi=""
+if pkg-config --exists ompi; then
+ MP="openmpi";
+ mpi="-DBUILD_OMP=yes "
+fi
+if pkg-config --exists mpich; then
+ MP="mpich";
+ mpi="-DBUILD_MPI=yes "
+fi
+
+# These internal packages are enabled by default.
+# If you do not require some of them you have to edit the conditions in this block
+# otherwise pass the respective environment variables set to "no" to the script
+# for each package not desired
+# (for example: AMOEBA=no ASPHERE=no ./lammps.SlackBuild)
+
+amoeba="" [ "${AMOEBA:-yes}" = "yes" ] && amoeba="-DPKG_AMOEBA=yes "
+asphere="" ; [ "${ASPHERE:-yes}" = "yes" ] && asphere="-DPKG_ASPHERE=yes "
+atc="" ; [ "${ATC:-yes}" = "yes" ] && atc="-DPKG_ATC=yes "
+awpmd="" ; [ "${AWPMD:-yes}" = "yes" ] && awpmd="-DPKG_AWPMD=yes "
+bocs="" ; [ "${BOCS:-yes}" = "yes" ] && bocs="-DPKG_BOCS=yes "
+body="" ; [ "${BODY:-yes}" = "yes" ] && body="-DPKG_BODY=yes "
+bpm="" ; [ "${BPM:-yes}" = "yes" ] && bpm="-DPKG_BPM=yes "
+brownian="" ; [ "${BROWNIAN:-yes}" = "yes" ] && brownian="-DPKG_BROWNIAN=yes "
+cgdna="" ; [ "${CGDNA:-yes}" = "yes" ] && cgdna="-DPKG_CG-DNA=yes "
+cgspica="" ; [ "${CGSPICA:-yes}" = "yes" ] && cgspica="-DPKG_CG-SPICA=yes "
+class2="" ; [ "${CLASS2:-yes}" = "yes" ] && class2="-DPKG_CLASS2=yes "
+colloid="" ; [ "${COLLOID:-yes}" = "yes" ] && colloid="-DPKG_COLLOID=yes "
+colvars="" ; [ "${COLVARS:-yes}" = "yes" ] && colvars="-DPKG_COLVARS=yes "
+compress="" ; [ "${COMPRESS:-yes}" = "yes" ] && compress="-DPKG_COMPRESS=yes "
+coreshell="" ; [ "${CORESHELL:-yes}" = "yes" ] && coreshell="-DPKG_CORESHELL=yes "
+dielectric="" ; [ "${DIELECTRIC:-yes}" = "yes" ] && dielectric="-DPKG_DIELECTRIC=yes "
+diffraction="" ; [ "${DIFFRACTION:-yes}" = "yes" ] && diffraction="-DPKG_DIFFRACTION=yes "
+dipole="" ; [ "${DIPOLE:-yes}" = "yes" ] && dipole="-DPKG_DIPOLE=yes "
+dpdbasic="" ; [ "${DPDBASIC:-yes}" = "yes" ] && dpdbasic="-DPKG_DPD-BASIC=yes "
+dpdmeso="" ; [ "${DPDMESO:-yes}" = "yes" ] && dpdmeso="-DPKG_DPD-MESO=yes "
+dpdreact="" ; [ "${DPDREACT:-yes}" = "yes" ] && dpdreact="-DPKG_DPD-REACT=yes "
+dpdsmooth="" ; [ "${DPDSMOOTH:-yes}" = "yes" ] && dpdsmooth="-DPKG_DPD-SMOOTH=yes "
+drude="" ; [ "${DRUDE:-yes}" = "yes" ] && drude="-DPKG_DRUDE=yes "
+eff="" ; [ "${EFF:-yes}" = "yes" ] && eff="-DPKG_EFF=yes "
+electrode="" ; [ "${ELECTRODE:-yes}" = "yes" ] && electrode="-DPKG_ELECTRODE=yes "
+extracompute="" ; [ "${EXTRACOMPUTE:-yes}" = "yes" ] && extracompute="-DPKG_EXTRA-COMPUTE=yes "
+extradump="" ; [ "${EXTRADUMP:-yes}" = "yes" ] && extradump="-DPKG_EXTRA-DUMP=yes "
+extrafix="" ; [ "${EXTRAFIX:-yes}" = "yes" ] && extrafix="-DPKG_EXTRA-FIX=yes "
+extramolecule="" ; [ "${EXTRAMOLECULE:-yes}" = "yes" ] && extramolecule="-DPKG_EXTRA-MOLECULE=yes "
+extrapair="" ; [ "${EXTRAPAIR:-yes}" = "yes" ] && extrapair="-DPKG_EXTRA-PAIR=yes "
+fep="" ; [ "${FEP:-yes}" = "yes" ] && fep="-DPKG_FEP=yes "
+granular="" ; [ "${GRANULAR:-yes}" = "yes" ] && granular="-DPKG_GRANULAR=yes "
+intel="" ; [ "${INTEL:-yes}" = "yes" ] && intel="-DPKG_INTEL=yes "
+interlayer="" ; [ "${INTERLAYER:-yes}" = "yes" ] && interlayer="-DPKG_INTERLAYER=yes "
+kspace="" ; [ "${KSPACE:-yes}" = "yes" ] && kspace="-DPKG_KSPACE=yes "
+lepton="" ; [ "${LEPTON:-yes}" = "yes" ] && lepton="-DPKG_LEPTON=yes "
+machdyn="" ; [ "${MACHDYN:-yes}" = "yes" ] && machdyn="-DPKG_MACHDYN=yes "
+manifold="" ; [ "${MANIFOLD:-yes}" = "yes" ] && manifold="-DPKG_MANIFOLD=yes "
+manybody="" ; [ "${MANYBODY:-yes}" = "yes" ] && manybody="-DPKG_MANYBODY=yes "
+mc="" ; [ "${MC:-yes}" = "yes" ] && mc="-DPKG_MC=yes "
+mdi="" ; [ "${MDI:-yes}" = "yes" ] && mdi="-DPKG_MDI=yes -DDOWNLOAD_MDI=yes "
+meam="" ; [ "${MEAM:-yes}" = "yes" ] && meam="-DPKG_MEAM=yes "
+mesont="" ; [ "${MESONT:-yes}" = "yes" ] && mesont="-DPKG_MESONT=yes "
+mgpt="" ; [ "${MGPT:-yes}" = "yes" ] && mgpt="-DPKG_MGPT=yes "
+misc="" ; [ "${MISC:-yes}" = "yes" ] && misc="-DPKG_MISC=yes "
+mlhdnnp="" ; [ "${MLHDNNP:-yes}" = "yes" ] && mlhdnnp="-DPKG_ML-HDNNP=yes "
+mliap="" ; [ "${MLIAP:-yes}" = "yes" ] && mliap="-DPKG_ML-IAP=yes -DMLIAP_ENABLE_PYTHON=autodetected "
+mlpace="" ; [ "${MLPACE:-yes}" = "yes" ] && mlpace="-DPKG_ML-PACE=yes "
+mlpod="" ; [ "${MLPOD:-yes}" = "yes" ] && mlpod="-DPKG_ML-POD=yes "
+mlrann="" ; [ "${MLRANN:-yes}" = "yes" ] && mlrann="-DPKG_ML-RANN=yes "
+mlsnap="" ; [ "${MLSNAP:-yes}" = "yes" ] && mlsnap="-DPKG_ML-SNAP=yes "
+mofff="" ; [ "${MOFFF:-yes}" = "yes" ] && mofff="-DPKG_MOFFF=yes "
+molecule="" ; [ "${MOLECULE:-yes}" = "yes" ] && molecule="-DPKG_MOLECULE=yes "
+opt="" ; [ "${OPT:-yes}" = "yes" ] && opt="-DPKG_OPT=yes "
+orient="" ; [ "${ORIENT:-yes}" = "yes" ] && orient="-DPKG_ORIENT=yes "
+peri="" ; [ "${PERI:-yes}" = "yes" ] && peri="-DPKG_PERI=yes "
+phonon="" ; [ "${PHONON:-yes}" = "yes" ] && phonon="-DPKG_PHONON=yes "
+plugin="" ; [ "${PLUGIN:-yes}" = "yes" ] && plugin="-DPKG_PLUGIN=yes "
+poems="" ; [ "${POEMS:-yes}" = "yes" ] && poems="-DPKG_POEMS=yes "
+ptm="" ; [ "${PTM:-yes}" = "yes" ] && ptm="-DPKG_PTM=yes "
+qeq="" ; [ "${QEQ:-yes}" = "yes" ] && qeq="-DPKG_QEQ=yes "
+qtb="" ; [ "${QTB:-yes}" = "yes" ] && qtb="-DPKG_QTB=yes "
+reaction="" ; [ "${REACTION:-yes}" = "yes" ] && reaction="-DPKG_REACTION=yes "
+reaxff="" ; [ "${REAXFF:-yes}" = "yes" ] && reaxff="-DPKG_REAXFF=yes "
+replica="" ; [ "${REPLICA:-yes}" = "yes" ] && replica="-DPKG_REPLICA=yes "
+rigid="" ; [ "${RIGID:-yes}" = "yes" ] && rigid="-DPKG_RIGID=yes "
+shock="" ; [ "${SHOCK:-yes}" = "yes" ] && shock="-DPKG_SHOCK=yes "
+smtbq="" ; [ "${SMTBQ:-yes}" = "yes" ] && smtbq="-DPKG_SMTBQ=yes "
+sph="" ; [ "${SPH:-yes}" = "yes" ] && sph="-DPKG_SPH=yes "
+spin="" ; [ "${SPIN:-yes}" = "yes" ] && spin="-DPKG_SPIN=yes "
+srd="" ; [ "${SRD:-yes}" = "yes" ] && srd="-DPKG_SRD=yes "
+tally="" ; [ "${TALLY:-yes}" = "yes" ] && tally="-DPKG_TALLY=yes "
+uef="" ; [ "${UEF:-yes}" = "yes" ] && uef="-DPKG_UEF=yes "
+yaff="" ; [ "${YAFF:-yes}" = "yes" ] && yaff="-DPKG_YAFF=yes "
+
+# If OpenBLAS is installed ELECTRODE will be enabled using the system LAPACK
+# otherwise a bundled linear algebra is used. To force the use of internal
+# linear algebra edit the CMake flag setting "-DUSE_INTERNAL_LINALG=yes "
+if [ "$electrode" = "-DPKG_ELECTRODE=yes " ]; then
+ if pkg-config --exists openblas; then
+ electrode=$electrode"-DUSE_INTERNAL_LINALG=no "
+ fi
+fi
+
+if [ "${PYTHON:-yes}" = "yes" ]; then
+ python="-DPKG_PYTHON=yes "
+else
+ python=""
+ mliap=""
+fi
+
+# The GPU package requires some basic settings that may be customized through environment
+# variables. For advanced options requiring specific hardware configurations (GPU) see the
+# documentation in lammps.org
+# This package causes many issues depending on the hardware/software configuration (build
+# failure or segmentation fault) that require additional settings to be solved, so it is
+# disabled by default.
+if [ "${GPU:-no}" = "yes" ]; then
+ # by default the GPU package is enabled using bundled OpenCL ICD loader library/headers
+ # but users may prefer the local opencl installed in the system
+ opencl_loader="yes" ; [ "${STATIC_OCL:-no}" = "no" ] && opencl_loader="no"
+ gpu="-DPKG_GPU=yes -DGPU_API=opencl -DUSE_STATIC_OPENCL_LOADER=${opencl_loader} "
+else
+ opencl_loader=""
+ gpu=""
+fi
+
+# Following conditions enable by default all packages that require dependencies if these
+# are installed in the system
+
+latboltz=""
+openmp=""
+scafacos=""
+if [ "$MP" = "openmpi" ]; then
+ latboltz="" ; [ "${LATBOLTZ:-yes}" = "yes" ] && latboltz="-DPKG_LATBOLTZ=yes "
+ openmp="" ; [ "${OPENMP:-yes}" = "yes" ] && openmp="-DPKG_OPENMP=yes "
+ scafacos="" ; [ "${SCAFACOS:-yes}" = "yes" ] && scafacos="-DPKG_SCAFACOS=yes "
+fi
+
+if [ "$MP" = "mpich" ]; then
+ latboltz="" ; [ "${LATBOLTZ:-yes}" = "yes" ] && latboltz="-DPKG_LATBOLTZ=yes "
+ scafacos="" ; [ "${SCAFACOS:-yes}" = "yes" ] && scafacos="-DPKG_SCAFACOS=yes "
+fi
+
+if pkg-config --exists plumed; then
+ plumed="" ; [ "${PLUMED:-yes}" = "yes" ] && plumed="-DPKG_PLUMED=yes -DDOWNLOAD_PLUMED=no "
+else
+ plumed=""
+fi
+
+netcdf=""
+if pkg-config --exists netcdf; then
+ netcdf="" ; [ "${NETCDF:-yes}" = "yes" ] && netcdf="-DPKG_NETCDF=yes "
+fi
+
+voronoi=""
+if [ -f /usr/bin/voro++ ]; then
+ voronoi="" ; [ "${VORONOI:-yes}" = "yes" ] && voronoi="-DPKG_VORONOI=yes "
+fi
+
+h5md=""
+if [ -f /usr/bin/h5cc ]; then
+ h5md="" ; [ "${H5MD:-yes}" = "yes" ] && h5md="-DPKG_H5MD=yes "
+fi
+
+# This shouldn't need in 32-bit architectures, however it significantly extends the build times
+# and absorbs many resources. Openmpi is strictly required.
+kokkos=""
+if [ "$ARCH" = "x86_64" ]; then
+ if [ "${KOKKOS:-yes}" = "yes" ] ; then
+ kokkos="-DPKG_KOKKOS=yes -DKokkos_ARCH_NATIVE=yes -DKokkos_ENABLE_OPENMP=yes "
+ fi
+ if [ "$MP" != "openmpi" ]; then
+ kokkos=""
+ fi
+fi
+
+# All required cmake flags related to packages are included in a single global variable
+packages=$amoeba$asphere$atc$awpmd$bocs$body$bpm$brownian$cgdna$cgspica$class2$colloid\
+$colvars$compress$coreshell$dielectric$diffraction$dipole$dpdbasic$dpdmeso$dpdreact\
+$dpdsmooth$drude$eff$electrode$extracompute$extradump$extrafix$extramolecule$extrapair\
+$fep$gpu$granular$h5md$intel$interlayer$kokkos$kspace$latboltz$lepton$machdyn$manifold\
+$manybody$mc$mdi$meam$mesont$mgpt$misc$mlhdnnp$mliap$mlpace$mlpod$mlrann$mlsnap$mofff\
+$molecule$netcdf$openmp$opt$orient$peri$phonon$plugin$plumed$poems$ptm$qeq$qtb$reaction\
+$reaxff$replica$rigid$scafacos$shock$smtbq$sph$spin$srd$tally$uef$voronoi$yaff
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf ${SRCNAM}_${SRCVERSION}
+tar xvf $CWD/${SRCNAM}_${SRCVERSION}.tar.gz
+cd ${SRCNAM}_${SRCVERSION}
+
+echo -e "\nFLAGS FOR PACKAGES ENABLED:\n "$packages"\n"
+
+echo -e "FLAGS FOR PYTHON:\n "$python
+
+echo -e "\nFLAGS FOR MPI:\n "$mpi
+
+if [ "$mesont" != "" ]; then
+ cp -a $CWD/C_10_10.mesocnt ./potentials
+ if [ "$molecule" = "" ]; then
+ echo -e "\n\033[33mYou have enabled the package MESONT. Since this package requires also "
+ echo -e "the package MOLECULE, the build of MOLECULE will be automatically enabled\033[0m\n"
+ packages=$packages" -DPKG_MOLECULE=yes "
+ fi
+fi
+
+if [ "$MP" = "" ]; then
+ echo -e "\n\033[33m******************** WARNING ********************\n"
+ echo " no API supporting MPI (mpich or openmpi) are "
+ echo " installed on your system. This does not affect "
+ echo " the build and installation of LAMMPS, but some "
+ echo " packages cannot be enabled and other may work "
+ echo " not optimally. "
+ echo -e "\n*************************************************\n\033[0m"
+fi
+
+# Prepare directories to move the extrafiles needed to build some packages
+mkdir -p cmake/build
+
+if [ "$opencl_loader" = "yes" ]; then
+ mkdir -p cmake/build/_deps
+ cp -a $CWD/opencl-loader-2022.01.04.tar.gz cmake/build/_deps
+fi
+
+if [ "$mdi" != "" ]; then
+ mkdir -p cmake/build/mdi_build_ext/src/
+ cp -a $CWD/MDI_Library-1.4.16.tar.gz cmake/build/mdi_build_ext/src/v1.4.16.tar.gz
+fi
+
+if [ "$mlhdnnp" != "" ]; then
+ mkdir -p cmake/build/n2p2_build-prefix/src/
+ cp -a $CWD/n2p2-2.2.0.tar.gz cmake/build/n2p2_build-prefix/src/v2.2.0.tar.gz
+fi
+
+if [ "$mlpace" != "" ]; then
+ cp -a $CWD/lammps-user-pace-v.2023.01.3.fix.tar.gz cmake/build/libpace.tar.gz
+fi
+
+if [ "$scafacos" != "" ]; then
+ mkdir -p cmake/build/scafacos_build-prefix/src
+ cp -a $CWD/scafacos-1.0.1.tar.gz cmake/build/scafacos_build-prefix/src
+fi
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# The Source has not a CMakeLists.txt file in the root directory we
+# need to change in the cmake directory
+cd cmake
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ $mpi \
+ $python \
+ $packages \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+#Since the build installs man in /usr/share we move the directory in /usr
+mv -v $PKG/usr/share/man $PKG/usr
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+#Since the build installs etc as subfolder of /usr (?), we move it in the root directory
+mv -v $PKG/usr/etc $PKG
+
+cd $TMP/${SRCNAM}_${SRCVERSION}
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/academic/lammps/lammps.info b/academic/lammps/lammps.info
new file mode 100644
index 0000000000..f5375a9bc5
--- /dev/null
+++ b/academic/lammps/lammps.info
@@ -0,0 +1,22 @@
+PRGNAM="lammps"
+VERSION="2023.08.02"
+HOMEPAGE="https://www.lammps.org"
+DOWNLOAD="https://github.com/lammps/lammps/archive/stable_2Aug2023/lammps-stable_2Aug2023.tar.gz \
+ https://download.lammps.org/potentials/C_10_10.mesocnt \
+ https://download.lammps.org/thirdparty/opencl-loader-2022.01.04.tar.gz \
+ https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz \
+ https://github.com/CompPhysVienna/n2p2/archive/v2.2.0.tar.gz \
+ https://github.com/ICAMS/lammps-user-pace/archive/v.2023.01.3.fix.tar.gz \
+ https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz"
+MD5SUM="276af48be230518d8a281387838d6efd \
+ 68b5ca26283968fd9889aa0a37f7b7fb \
+ 8d3a801e87a2c6653bf0e27707063914 \
+ 407db44e2d79447ab5c1233af1965f65 \
+ a2d9ab7f676b3a74a324fc1eda0a911d \
+ 4f0b3b5b14456fe9a73b447de3765caa \
+ bd46d74e3296bd8a444d731bb10c1738"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="openmpi"
+MAINTAINER="Giancarlo Dessi"
+EMAIL="slack@giand.it"
diff --git a/academic/lammps/slack-desc b/academic/lammps/slack-desc
new file mode 100644
index 0000000000..c082c858ab
--- /dev/null
+++ b/academic/lammps/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+lammps: lammps (LAMMPS Molecular Dynamics Simulator)
+lammps:
+lammps: LAMMPS stands for
+lammps: Large-scale Atomic/Molecular Massively Parallel Simulator.
+lammps: It was developed at Sandia National Laboratories (US Department of
+lammps: Energy) and is designed to run efficiently on parallel computers.
+lammps:
+lammps:
+lammps: Home page: https://www.lamps.org
+lammps:
+lammps: