package init

This commit is contained in:
baizg1107 2021-05-07 11:12:46 +08:00
parent 62c225b646
commit 825b45c1cc
7 changed files with 311 additions and 0 deletions

BIN
gromacs-2019.3.tar.gz Normal file

Binary file not shown.

22
gromacs-dssp-path.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/src/gromacs/gmxana/gmx_do_dssp.cpp b/src/gromacs/gmxana/gmx_do_dssp.cpp
index a8aab1bc2..184592b7e 100644
--- a/src/gromacs/gmxana/gmx_do_dssp.cpp
+++ b/src/gromacs/gmxana/gmx_do_dssp.cpp
@@ -445,7 +445,7 @@ int gmx_do_dssp(int argc, char *argv[])
"calling the dssp program. If you do not have the dssp program,",
"get it from http://swift.cmbi.ru.nl/gv/dssp. [THISMODULE] assumes ",
"that the dssp executable is located in ",
- "[TT]/usr/local/bin/dssp[tt]. If this is not the case, then you should",
+ "[TT]/usr/bin/mkdssp[tt]. If this is not the case, then you should",
"set an environment variable [TT]DSSP[tt] pointing to the dssp",
"executable, e.g.: [PAR]",
"[TT]setenv DSSP /opt/dssp/bin/dssp[tt][PAR]",
@@ -590,7 +590,7 @@ int gmx_do_dssp(int argc, char *argv[])
if ((dptr = getenv("DSSP")) == nullptr)
{
- dptr = "/usr/local/bin/dssp";
+ dptr = "/usr/bin/mkdssp";
}
if (!gmx_fexist(dptr))
{

19
gromacs-issue-2366.patch Normal file
View File

@ -0,0 +1,19 @@
diff --git a/src/gromacs/hardware/tests/hardwaretopology.cpp b/src/gromacs/hardware/tests/hardwaretopology.cpp
index ed7897b01..c31d4b9cd 100644
--- a/src/gromacs/hardware/tests/hardwaretopology.cpp
+++ b/src/gromacs/hardware/tests/hardwaretopology.cpp
@@ -185,12 +185,14 @@ TEST(HardwareTopologyTest, NumaCacheSelfconsistency)
}
}
+#ifndef __aarch64__
// Check cache. The hwloc cache detection is fragile and can report
// 0 for line size or associativity (=unknown), so we just check the size.
for (auto &c : hwTop.machine().caches)
{
EXPECT_GT(c.size, 0);
}
+#endif
}
}

266
gromacs.spec Normal file
View File

@ -0,0 +1,266 @@
%global with_opencl 0
%global simd None
%ifarch x86_64
%global simd SSE2
%endif
%ifarch aarch64
%global simd ARM_NEON_ASIMD
%endif
Name: gromacs
Version: 2019.3
Release: 1
Summary: Fast, Free and Flexible Molecular Dynamics
License: GPLv2+ and ASL-2.0 and BSL-1.0 and MIT and LGPL-2.1
URL: http://www.gromacs.org
Source0: https://github.com/gromacs/gromacs/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: ftp://ftp.gromacs.org/pub/manual/manual-%{version}%{?_rc}.pdf
Source2: http://gerrit.gromacs.org/download/regressiontests-%{version}%{?_rc}.tar.gz
Patch0: gromacs-dssp-path.patch
Patch1: gromacs-issue-2366.patch
BuildRequires: gcc-c++ cmake3 >= 3.4.3 openblas-devel fftw-devel gsl-devel hwloc
BuildRequires: hwloc-devel libX11-devel lmfit-devel >= 6.0 environment-modules
%if %{with_opencl}
BuildRequires: ocl-icd-devel opencl-headers
Recommends: gromacs-opencl = %{version}-%{release}
%endif
BuildRequires: tng-devel bash-completion
%define compdir %(pkg-config --variable=completionsdir bash-completion)
%if "%{compdir}" == ""
%define compdir "/etc/bash_completion.d"
%endif
Requires: gromacs-common = %{version}-%{release} gromacs-libs = %{version}-%{release}
Obsoletes: gromacs-ngmx < 5.0.4-1
Obsoletes: gromacs-csh < 2016.1-2
Obsoletes: gromacs-zsh < 2016.1-2
%description
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package provides single and double precision binaries.
The documentation is in the package gromacs-common.
mdrun has been compiled with thread parallellization, so it runs in parallel
on shared memory systems. If you want to run on a cluster, you probably want
to install one of the MPI parallellized packages.
N.B. All binaries have names starting with g_, for example mdrun has been
renamed to g_mdrun.
%package common
Summary: GROMACS shared data and documentation
BuildArch: noarch
Provides: gromacs-bash = %{version}-%{release}
Obsoletes: gromacs-bash < 5.0.4-1
%description common
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package includes architecture independent data and HTML documentation.
%if %{with_opencl}
%package opencl
Summary: GROMACS OpenCL kernels
%description opencl
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package includes the OpenCL kernels.
%endif
%package doc
Summary: GROMACS manual
BuildArch: noarch
Obsoletes: gromacs-common < 5.0.5-2
%description doc
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package the manual in PDF format.
%package devel
Summary: GROMACS header files and development libraries
Requires: gromacs-libs = %{version}-%{release}
Obsoletes: gromacs-mpich-devel < 2016-0.1.20160318gitbec9c87
Obsoletes: gromacs-openmpi-devel < 2016-0.1.20160318gitbec9c87
%description devel
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package contains header files and development libraries for the GROMACS
molecular dynamics software. You need it if you want to write your own analysis
programs.
%package libs
Summary: GROMACS shared libraries
%description libs
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
This package contains libraries needed for operation of GROMACS.
%package openmpi
Summary: GROMACS Open MPI binaries and libraries
Requires: gromacs-common = %{version}-%{release}
%if %{with_opencl}
Recommends: gromacs-opencl = %{version}-%{release}
%endif
Obsoletes: gromacs-openmpi-libs < 2016-0.1.20160318gitbec9c87
BuildRequires: openmpi-devel
%description openmpi
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
mdrun has been compiled with thread parallellization (for running on
a single node) and with Open MPI (for running on multiple nodes).
This package single and double precision binaries and libraries.
%package mpich
Summary: GROMACS MPICH binaries and libraries
Requires: gromacs-common = %{version}-%{release}
%if %{with_opencl}
Recommends: gromacs-opencl = %{version}-%{release}
%endif
Obsoletes: gromacs-mpich-libs < 2016-0.1.20160318gitbec9c87
BuildRequires: mpich-devel
%description mpich
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory analysis.
It is developed for bio-molecules like proteins, but the extremely high
performance means it is used also in several other field like polymer chemistry
and solid state physics.
mdrun has been compiled with thread parallellization (for running on
a single node) and with MPICH (for running on multiple nodes).
This package single and double precision binaries and libraries.
%prep
%setup -q %{?SOURCE2:-a 2} -n gromacs-%{version}%{?_rc}
%patch0 -p1
%patch1 -p1
install -Dpm644 %{SOURCE1} ./serial/docs/manual/gromacs.pdf
rm -r src/external/{fftpack,tng_io,lmfit}
sed -i 's/set(_timeout [0-9]*)/set(_timeout 900)/' src/testutils/TestMacros.cmake
%build
%global defopts \\\
-DBUILD_TESTING:BOOL=ON \\\
-DCMAKE_SKIP_RPATH:BOOL=ON \\\
-DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \\\
-DGMX_BLAS_USER=openblas \\\
-DGMX_BUILD_UNITTESTS:BOOL=ON \\\
-DGMX_EXTERNAL_LMFIT:BOOL=ON \\\
-DGMX_USE_LMFIT=external \\\
-DGMX_EXTERNAL_TNG:BOOL=ON \\\
-DGMX_EXTERNAL_TINYXML2:BOOL=OFF \\\
-DGMX_LAPACK_USER=openblas \\\
-DGMX_USE_RDTSCP=OFF \\\
-DGMX_SIMD=%{simd}
%if %{with_opencl}
%global single -DGMX_GPU:BOOL=ON -DGMX_USE_OPENCL:BOOL=ON
%endif
%global double -DGMX_DOUBLE:BOOL=ON
%global mpi -DGMX_BUILD_MDRUN_ONLY:BOOL=ON -DGMX_MPI:BOOL=ON -DGMX_THREAD_MPI:BOOL=OFF -DGMX_DEFAULT_SUFFIX:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
for p in '' _d ; do
for mpi in '' mpich openmpi ; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
mkdir -p ${mpi:-serial}${p}
pushd ${mpi:-serial}${p}
test -z "${mpi}" && cp -al ../regressiontests* tests/
%{cmake3} %{defopts} \
$(test -n "${mpi}" && echo %{mpi} -DGMX_BINARY_SUFFIX=${MPI_SUFFIX}${p} -DGMX_LIBS_SUFFIX=${MPI_SUFFIX}${p} -DCMAKE_INSTALL_BINDIR=${MPI_BIN} || echo -DGMX_X11=ON) \
$(test -n "$p" && echo %{double} || echo %{?single}) \
..
%make_build
popd
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
done
%install
. /etc/profile.d/modules.sh
for p in '' _d ; do
for mpi in '' mpich openmpi ; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
%make_install -C ${mpi:-serial}${p}
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
done
mkdir -p %{buildroot}%{_docdir}/gromacs
install -pm 644 AUTHORS COPYING README %{buildroot}%{_docdir}/gromacs
install -cpm 644 serial/docs/manual/gromacs.pdf %{buildroot}%{_docdir}/gromacs/manual.pdf
pushd %{buildroot}
rm ./%{_bindir}/GMXRC*
for bin in demux.pl xplor2gmx.pl; do
mv ./%{_bindir}/$bin ./%{_bindir}/g_${bin}
done
mkdir -p ./%{compdir}
for bin in gmx{,_d}; do
cat ./%{_bindir}/gmx-completion{,-$bin}.bash > ./%{compdir}/${bin}
rm ./%{_bindir}/gmx-completion-${bin}.bash
done
rm ./%{_bindir}/gmx-completion.bash ./%{_libdir}/*mpi*/bin/gmx-completion-*mpi*.bash
%ldconfig_scriptlets libs
%check
. /etc/profile.d/modules.sh
for p in '' _d ; do
for mpi in '' mpich openmpi ; do
test -n "${mpi}" && module load mpi/${mpi}-%{_arch}
test -n "${mpi}" && xLD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}${MPI_LIB} || xLD_LIBRARY_PATH=%{buildroot}%{_libdir}
LD_LIBRARY_PATH="${xLD_LIBRARY_PATH}" make -C ${mpi:-serial}${p} VERBOSE=1 %{?_smp_mflags} check
test -n "${mpi}" && module unload mpi/${mpi}-%{_arch}
done
done
%files
%{_bindir}/gmx*
%{_bindir}/g_*
%files common
%{_docdir}/gromacs
%exclude %{_docdir}/gromacs/manual.pdf
%{compdir}/gmx*
%{_mandir}/man1/gmx*.1*
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/template
%if %{with_opencl}
%exclude %{_datadir}/%{name}/opencl
%files opencl
%doc docs/OpenCLTODOList.txt
%{_datadir}/%{name}/opencl
%endif
%files doc
%{_docdir}/gromacs/manual.pdf
%files libs
%{_libdir}/libgromacs*.so.*
%files devel
%{_includedir}/%{name}
%{_libdir}/libgromacs*.so
%{_libdir}/pkgconfig/libgromacs*.pc
%{_datadir}/%{name}/template
%{_datadir}/cmake/gromacs*
%files openmpi
%{_libdir}/openmpi/bin/mdrun_openmpi*
%files mpich
%{_libdir}/mpich/bin/mdrun_mpich*
%changelog
* Fri May 7 2021 baizhonggui <baizhonggui@huawei.com> - 2019.3-1
- package init

4
gromacs.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: gromacs/gromacs
tag_prefix: ^
separator: .

BIN
manual-2019.3.pdf Normal file

Binary file not shown.

Binary file not shown.