diff --git a/lammps-stable_29Oct2020.tar.gz b/lammps-stable_29Oct2020.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..53d97d76a612521acf7e9e4efdb068f5ea2d8350 Binary files /dev/null and b/lammps-stable_29Oct2020.tar.gz differ diff --git a/lammps.spec b/lammps.spec new file mode 100644 index 0000000000000000000000000000000000000000..83f7888c7ed64b889e45167b60adaf9c14c34e86 --- /dev/null +++ b/lammps.spec @@ -0,0 +1,158 @@ +%global release_type stable +%global numric_version 20201029 +%global uversion %(v=%{numric_version}; + months=("" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); + d=${v:6:2}; + m=${v:4:2}; + y=${v:0:4}; + echo ${d#0}${months[${m#0}]}${y}) +%global release_tag %{release_type}_%{uversion} + +%global lammps_desc %{expand:LAMMPS is a classical molecular dynamics code with a focus on materials +modeling. It's an acronym for Large-scale Atomic/Molecular Massively +Parallel Simulator. + +LAMMPS has potentials for solid-state materials (metals, semiconductors) +and soft matter (biomolecules, polymers) and coarse-grained or mesoscopic +systems. It can be used to model atoms or, more generically, as a parallel +particle simulator at the atomic, meso, or continuum scale. + +LAMMPS runs on single processors or in parallel using message-passing +techniques and a spatial-decomposition of the simulation domain. Many +of its models have versions that provide accelerated performance on CPUs, +GPUs, and Intel Xeon Phis. The code is designed to be easy to modify or +extend with new functionality.} + +Name: lammps +Version: %{numric_version} +Release: 1 +Summary: Public development project of the LAMMPS MD software package + +License: GPL-2.0 +URL: https://www.lammps.org/ +Source0: https://github.com/%{name}/%{name}/archive/refs/tags/%{release_tag}.tar.gz#/%{name}-%{release_tag}.tar.gz + +BuildRequires: gcc-c++ gcc-gfortran make cmake ffmpeg zlib-devel libpng-devel +BuildRequires: hdf5-devel python3-devel gzip vim-common readline-devel +BuildRequires: kim-api-devel kim-api-examples voro++-devel +Requires: setup + +%description +%{lammps_desc} + + +%package devel +Summary: Development libraries for LAMMPS +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{lammps_desc} + + +%package -n python3-%{name} +Summary: LAMMPS Python interface +Requires: python3 +Requires: %{name}%{?_isa} = %{version}-%{release} +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +%{lammps_desc} + +This package contains LAMMPS Python interface. + + +%package data +Summary: Data files for LAMMPS +BuildArch: noarch + +%description data +%{lammps_desc} + +This package contains data files for LAMMPS. + + +%prep +%autosetup -n %{name}-%{release_tag} + + +%build +%{__mkdir_p} build +pushd build >/dev/null || exit 1 +# disable INTEL features since our x86 platform is run on higon's chip +%cmake -DCMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT:BOOL=OFF \ + -DBUILD_LAMMPS_SHELL=ON \ + -DBUILD_OMP=ON \ + -DBUILD_TOOLS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ + -DCMAKE_TUNE_FLAGS='' \ + -DPKG_GPU=OFF \ + -DPKG_KIM=ON \ + -DPKG_PYTHON=ON \ + -DPKG_USER-H5MD=ON \ + -DPKG_USER-INTEL=OFF \ + -DPKG_VORONOI=ON \ + -DPYTHON_INSTDIR=%{python3_sitelib} \ + ../cmake +%make_build +popd >/dev/null ||: + + +%install +%make_install -C build + +%post +ldconfig || : + + +%postun +ldconfig || : + + +%files +%license LICENSE +%doc README +%{_bindir}/lmp +%{_bindir}/binary2txt +%{_bindir}/chain.x +%{_bindir}/%{name}-shell +%{_bindir}/msi2lmp +%{_libdir}/liblammps.so.* +%{_mandir}/man1/lmp.1* +%{_mandir}/man1/msi2lmp.1* + + +%files devel +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/*.h +%{_libdir}/cmake/LAMMPS +%{_libdir}/liblammps.so +%{_libdir}/pkgconfig/liblammps.pc + + +%files -n python3-%{name} +%{python3_sitelib}/%{name}.py* +%{python3_sitelib}/__pycache__/%{name}* + + +%files data +%license LICENSE +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/potentials +%{_datadir}/%{name}/frc_files +%{_datadir}/icons/hicolor/128x128/apps/%{name}.png +%{_datadir}/icons/hicolor/16x16/apps/%{name}.png +%{_datadir}/icons/hicolor/22x22/apps/%{name}.png +%{_datadir}/icons/hicolor/32x32/apps/%{name}.png +%{_datadir}/icons/hicolor/48x48/apps/%{name}.png +%{_datadir}/icons/hicolor/64x64/apps/%{name}.png +%{_datadir}/icons/%{name}.ico +%{_datadir}/icons/lmpfile.ico +%{_datadir}/applications/%{name}-shell.desktop +%config %{_sysconfdir}/profile.d/%{name}.* + + +%changelog +* Wed Aug 11 2021 herengui - 20201029-1 +- Package init