reduced PLINCS communication with H-bond constraints
[gromacs.git] / admin / gromacs.spec
blob24681975c3faa6b5482a6a15536cdb9d75ac6367
1 Name: gromacs
2 Version: 4.5
3 Release: 7%{?dist}
4 Summary: GROMACS binaries
5 Group: Applications/Engineering
6 License: GPLv2+
7 URL: http://www.gromacs.org
8 Source0: ftp://ftp.gromacs.org/pub/gromacs/gromacs-%{version}.tar.gz
9 Source1: ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf
10 Source2: gromacs-template-makefile-single
11 Source3: gromacs-template-makefile-double
12 Source4: gromacs-template-makefile-mpi-single
13 Source5: gromacs-template-makefile-mpi-double
14 Source6: gromacs-README.fedora
16 # Add shebangs to scripts
17 Patch0: gromacs-GMXRC.patch
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 Requires: gromacs-common = %{version}-%{release}
22 BuildRequires: fftw-devel
23 BuildRequires: gsl-devel
24 BuildRequires: openmpi-devel
26 %if 0%{?rhel} == 4
27 BuildRequires: blas
28 BuildRequires: lapack
29 BuildRequires: xorg-x11-devel
30 %else
31 BuildRequires: blas-devel
32 BuildRequires: lapack-devel
33 BuildRequires: libX11-devel
34 %endif
36 # Check for mpi-selector or environment-modules
38 %define selector 0
39 %define modules 0
41 %if 0%{?fedora} > 9
42 %define modules 1
43 %endif
45 %if 0%{?rhel} == 4
46 %define selector 1
47 %endif
49 %if 0%{?rhel} == 5
50 %define selector 1
51 %endif
53 %if %modules == 1
54 BuildRequires: environment-modules
55 %endif
57 %if %selector == 1
58 BuildRequires: mpi-selector
59 %endif
62 %description
63 GROMACS is a versatile and extremely well optimized package
64 to perform molecular dynamics computer simulations and
65 subsequent trajectory analysis. It is developed for
66 biomolecules like proteins, but the extremely high
67 performance means it is used also in several other field
68 like polymer chemistry and solid state physics.
70 This package provides single and double precision binaries.
71 The documentation is in the package gromacs-common.
73 N.B. All binaries have names starting with g_, for example
74 mdrun has been renamed to g_mdrun.
76 %package libs
77 Summary: GROMACS libraries
78 Group: Applications/Engineering
79 Requires: gromacs-common = %{version}-%{release}
80 # Need to have this so that yum doesn't pull atlas instead
81 Requires: blas
82 Requires: lapack
84 %description libs
85 GROMACS is a versatile and extremely well optimized package
86 to perform molecular dynamics computer simulations and
87 subsequent trajectory analysis. It is developed for
88 biomolecules like proteins, but the extremely high
89 performance means it is used also in several other field
90 like polymer chemistry and solid state physics.
92 This package provides runtime libraries needed for the
93 single and double precision binaries.
96 %package mpi
97 Summary: GROMACS MPI binaries
98 Group: Applications/Engineering
99 Requires: gromacs-common = %{version}-%{release}
100 # Need to have this so that yum doesn't pull atlas instead
101 Requires: blas
102 Requires: lapack
104 %description mpi
105 GROMACS is a versatile and extremely well optimized package
106 to perform molecular dynamics computer simulations and
107 subsequent trajectory analysis. It is developed for
108 biomolecules like proteins, but the extremely high
109 performance means it is used also in several other field
110 like polymer chemistry and solid state physics.
112 This package provides MPI single precision and double
113 precision binaries.
116 %package common
117 Summary: GROMACS shared data and documentation
118 Group: Applications/Engineering
120 %description common
121 GROMACS is a versatile and extremely well optimized package
122 to perform molecular dynamics computer simulations and
123 subsequent trajectory analysis. It is developed for
124 biomolecules like proteins, but the extremely high
125 performance means it is used also in several other field
126 like polymer chemistry and solid state physics.
128 This package includes architecture independent data and
129 documentation.
132 %package devel
133 Summary: GROMACS header files and development libraries
134 Group: Applications/Engineering
135 Requires: gromacs-common = %{version}-%{release}
136 Requires: gromacs-libs = %{version}-%{release}
138 %description devel
139 GROMACS is a versatile and extremely well optimized package
140 to perform molecular dynamics computer simulations and
141 subsequent trajectory analysis. It is developed for
142 biomolecules like proteins, but the extremely high
143 performance means it is used also in several other field
144 like polymer chemistry and solid state physics.
146 This package contains header files, development libraries,
147 and a program example for the GROMACS molecular
148 dynamics software. You need it if you want to write your
149 own analysis programs.
152 %package mpi-devel
153 Summary: GROMACS MPI development libraries
154 Group: Applications/Engineering
155 Requires: gromacs-mpi-libs = %{version}-%{release}
156 Requires: gromacs-devel = %{version}-%{release}
157 # Need to have this so that yum doesn't install LAM instead
158 Requires: openmpi
160 %description mpi-devel
161 GROMACS is a versatile and extremely well optimized package
162 to perform molecular dynamics computer simulations and
163 subsequent trajectory analysis. It is developed for
164 biomolecules like proteins, but the extremely high
165 performance means it is used also in several other field
166 like polymer chemistry and solid state physics.
168 This package contains development libraries for GROMACS MPI.
169 You need it if you want to write your own analysis programs.
172 %package mpi-libs
173 Summary: GROMACS libraries
174 Group: Applications/Engineering
175 Requires: gromacs-common = %{version}-%{release}
176 # Need to have this so that yum doesn't install LAM instead
177 Requires: openmpi
178 # Need to have this so that yum doesn't pull atlas instead
179 Requires: blas
180 Requires: lapack
182 %description mpi-libs
183 GROMACS is a versatile and extremely well optimized package
184 to perform molecular dynamics computer simulations and
185 subsequent trajectory analysis. It is developed for
186 biomolecules like proteins, but the extremely high
187 performance means it is used also in several other field
188 like polymer chemistry and solid state physics.
190 This package provides runtime libraries needed for the
191 MPI single and double precision binaries.
194 %package bash
195 Summary: GROMACS bash completion
196 Group: Applications/Engineering
197 Requires: bash-completion
199 %description bash
200 GROMACS is a versatile and extremely well optimized package
201 to perform molecular dynamics computer simulations and
202 subsequent trajectory analysis. It is developed for
203 biomolecules like proteins, but the extremely high
204 performance means it is used also in several other field
205 like polymer chemistry and solid state physics.
207 This package provides the needed
208 bash completion for GROMACS
211 %package zsh
212 Summary: GROMACS zsh support
213 Group: Applications/Engineering
214 Requires: zsh
216 %description zsh
217 GROMACS is a versatile and extremely well optimized package
218 to perform molecular dynamics computer simulations and
219 subsequent trajectory analysis. It is developed for
220 biomolecules like proteins, but the extremely high
221 performance means it is used also in several other field
222 like polymer chemistry and solid state physics.
224 This package provides scripts needed to run GROMACS with
225 zsh, also it provides zsh completion.
228 %package csh
229 Summary: GROMACS csh support
230 Group: Applications/Engineering
231 Requires: csh
233 %description csh
234 GROMACS is a versatile and extremely well optimized package
235 to perform molecular dynamics computer simulations and
236 subsequent trajectory analysis. It is developed for
237 biomolecules like proteins, but the extremely high
238 performance means it is used also in several other field
239 like polymer chemistry and solid state physics.
241 This package provides scripts needed to run GROMACS with
242 csh and a completion script.
244 %package tutor
245 Summary: GROMACS tutorial files
246 Group: Applications/Engineering
247 Requires: gromacs-common = %{version}-%{release}
249 %description tutor
250 GROMACS is a versatile and extremely well optimized package
251 to perform molecular dynamics computer simulations and
252 subsequent trajectory analysis. It is developed for
253 biomolecules like proteins, but the extremely high
254 performance means it is used also in several other field
255 like polymer chemistry and solid state physics.
257 This package provides tutorials for the use of GROMACS.
259 %prep
260 %setup -q
261 %patch0 -p1
263 # Fix incorrect permission
264 chmod a-x src/tools/gmx_xpm2ps.c
268 %build
269 # Assembly kernels haven't got .note.GNU-stack sections
270 # because of incompatibilies with Microsoft Assembler.
271 # Add noexecstack to compiler flags
273 export CFLAGS="%optflags -Wa,--noexecstack -fPIC"
274 export LIBS="-lblas -llapack"
276 # Single precision
277 mkdir single
278 cd single
279 ln -s ../configure .
280 %configure --enable-shared \
281 --disable-static --enable-float \
282 --with-external-blas --with-external-lapack \
283 --with-gsl --with-x
284 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
285 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
287 make %{?_smp_mflags}
288 cd ..
290 # Double precision
291 mkdir double
292 cd double
293 ln -s ../configure .
294 %configure --disable-rpath --enable-shared \
295 --disable-static --disable-float \
296 --with-external-blas --with-external-lapack \
297 --with-gsl --with-x \
298 --program-suffix=_d
299 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
300 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
302 make %{?_smp_mflags}
303 cd ..
305 # Load MPI enviroment
307 %if %modules == 1
308 . /etc/profile.d/modules.sh
309 module load %{_libdir}/openmpi/*/openmpi.module
310 %endif
312 %if %selector == 1
313 # Set MPI environment
314 mpi-selector --set `mpi-selector --list | grep openmpi`
315 source /etc/profile.d/mpi-selector.sh
316 %endif
319 # MPI, single precision
321 mkdir mpi-single
322 cd mpi-single
323 ln -s ../configure .
324 %configure --enable-shared \
325 --disable-static --enable-float \
326 --with-external-blas --with-external-lapack \
327 --with-gsl --with-x --enable-mpi \
328 --program-suffix=_mpi
329 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
330 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
332 make %{?_smp_mflags} mdrun
333 #make %{?_smp_mflags}
334 cd ..
336 # MPI, double precision
337 mkdir mpi-double
338 cd mpi-double
339 ln -s ../configure .
340 %configure --enable-shared \
341 --disable-static --disable-float \
342 --with-external-blas --with-external-lapack \
343 --with-gsl --with-x --enable-mpi \
344 --program-suffix=_mpi_d
345 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
346 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
348 make %{?_smp_mflags} mdrun
349 #make %{?_smp_mflags}
350 cd ..
353 %install
354 rm -rf %{buildroot}
356 # Single precision
357 cd single
358 make DESTDIR=%{buildroot} INSTALL="install -p" install
359 cd ..
361 # Double precision
362 cd double
363 make DESTDIR=%{buildroot} INSTALL="install -p" install
364 cd ..
368 # MPI, single precision
369 cd mpi-single
370 make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
371 cd ..
373 # MPI, double precision
374 cd mpi-double
375 make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
376 cd ..
378 # Install manual & packager's note
379 install -cpm 644 %{SOURCE1} .
380 install -cpm 644 %{SOURCE6} README.fedora
382 # Remove broken makefiles generated by build process
383 rm -rf %{buildroot}%{_datadir}/%{name}/template/Makefil*
384 # Install template makefiles
385 install -cpm 644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/template/Makefile.single
386 install -cpm 644 %{SOURCE3} %{buildroot}%{_datadir}/%{name}/template/Makefile.double
387 install -cpm 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.single
388 install -cpm 644 %{SOURCE5} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.double
391 # Fix GMXRC file permissions
392 chmod a+x %{buildroot}%{_bindir}/GMXRC %{buildroot}%{_bindir}/GMXRC.*
394 # Rename binaries and man pages to prevent clashes
395 # (This is done here so that we don't need to mess with machine generated makefiles.
396 for bin in anadock do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp highway luck make_edi make_ndx mdrun mk_angndx ngmx pdb2gmx protonate sigeps tpbconv trjcat trjconv trjorder wheel x2top xpm2ps xrama ; do
397 mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/g_${bin}
398 mv %{buildroot}%{_bindir}/${bin}_d %{buildroot}%{_bindir}/g_${bin}_d
399 done
401 for bin in demux.pl xplor2gmx.pl; do
402 mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/g_${bin}
403 done
405 # MPI-enabled binaries (list will continue when the makefile has
406 # the possibility to compile all mpi-enabled files
407 for mpibin in mdrun; do
408 mv %{buildroot}%{_bindir}/${mpibin}_mpi %{buildroot}%{_bindir}/g_${mpibin}_mpi
409 mv %{buildroot}%{_bindir}/${mpibin}_mpi_d %{buildroot}%{_bindir}/g_${mpibin}_mpi_d
410 done
412 # Man pages
413 for bin in anadock do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp highway make_edi make_ndx mdrun mk_angndx ngmx pdb2gmx protonate sigeps tpbconv trjcat trjconv trjorder wheel x2top xpm2ps xrama ; do
414 mv %{buildroot}%{_mandir}/man1/${bin}.1 %{buildroot}%{_mandir}/man1/g_${bin}.1
415 mv %{buildroot}%{_mandir}/man1/${bin}_d.1 %{buildroot}%{_mandir}/man1/g_${bin}_d.1
416 done
418 # Move completion files around
419 chmod a-x %{buildroot}%{_bindir}/completion.*
420 # Zsh
421 mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
422 mv %{buildroot}%{_bindir}/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/gromacs
423 # Bash
424 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
425 mv %{buildroot}%{_bindir}/completion.bash %{buildroot}/etc/bash_completion.d/gromacs
426 # Tcsh
427 mv %{buildroot}%{_bindir}/completion.csh .
429 # Remove .la files
430 rm -rf %{buildroot}/%{_libdir}/*.la
432 # Post install for libs
434 %post libs -p /sbin/ldconfig
436 %postun libs -p /sbin/ldconfig
438 %post mpi-libs -p /sbin/ldconfig
440 %postun mpi-libs -p /sbin/ldconfig
443 %clean
444 rm -rf %{buildroot}
449 # Files section
451 %files
452 %defattr(-,root,root,-)
453 %{_bindir}/*
454 %exclude %{_bindir}/g_mdrun_mpi
455 %exclude %{_bindir}/g_mdrun_mpi_d
456 %exclude %{_bindir}/GMXRC*
458 %files libs
459 %defattr(-,root,root,-)
460 %{_libdir}/libgmx.so.*
461 %{_libdir}/libgmx_d.so.*
462 %{_libdir}/libgmxana.so.*
463 %{_libdir}/libgmxana_d.so.*
464 %{_libdir}/libmd.so.*
465 %{_libdir}/libmd_d.so.*
467 %files mpi
468 %defattr(-,root,root,-)
469 %{_bindir}/g_mdrun_mpi
470 %{_bindir}/g_mdrun_mpi_d
473 %files mpi-libs
474 %defattr(-,root,root,-)
475 %{_libdir}/libgmx_mpi.so.*
476 %{_libdir}/libgmx_mpi_d.so.*
477 %{_libdir}/libmd_mpi.so.*
478 %{_libdir}/libmd_mpi_d.so.*
482 %files common
483 %defattr(-,root,root,-)
484 %doc AUTHORS COPYING README manual-4.0.pdf README.fedora
485 %{_bindir}/GMXRC
486 %{_bindir}/GMXRC.bash
487 %{_mandir}/man1/*
488 %{_datadir}/%{name}
489 %exclude %{_datadir}/%{name}/template
490 %exclude %{_datadir}/%{name}/tutor
492 %files devel
493 %defattr(-,root,root,-)
494 %{_includedir}/%{name}
495 %{_libdir}/libgmx.so
496 %{_libdir}/libgmx_d.so
497 %{_libdir}/libgmxana.so
498 %{_libdir}/libgmxana_d.so
499 %{_libdir}/libmd.so
500 %{_libdir}/libmd_d.so
501 %{_datadir}/%{name}/template
502 %exclude %{_datadir}/%{name}/template/Makefile.mpi.*
504 %files mpi-devel
505 %defattr(-,root,root,-)
506 %{_libdir}/libgmx_mpi.so
507 %{_libdir}/libgmx_mpi_d.so
508 %{_libdir}/libmd_mpi.so
509 %{_libdir}/libmd_mpi_d.so
510 %{_datadir}/%{name}/template/Makefile.mpi.*
513 %files zsh
514 %defattr(-,root,root,-)
515 %{_datadir}/zsh/site-functions/gromacs
516 %{_bindir}/GMXRC.zsh
518 %files bash
519 %defattr(-,root,root,-)
520 %config(noreplace) %{_sysconfdir}/bash_completion.d/gromacs
523 %files csh
524 %defattr(-,root,root,-)
525 %doc completion.csh
526 %{_bindir}/GMXRC.csh
528 %files tutor
529 %defattr(-,root,root,-)
530 %{_datadir}/%{name}/tutor
533 %changelog
534 * Wed Jan 14 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-7
535 - Update manual to latest version.
536 - Removed Requires: blas and lapack.
538 * Mon Nov 10 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-6
539 - Update to 4.0.2.
541 * Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-5
542 - Add Requires: blas too.
544 * Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-4
545 - Update to 4.0.1.
546 - Add Requires: lapack and openmpi to prevent yum from pulling atlas and lam
547 instead.
549 * Wed Oct 15 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-3
550 - Rename also man pages.
552 * Mon Oct 13 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-2
553 - Added noreplace to bash completion file.
554 - Changed double precision mpi binary suffix to _mpi_d.
556 * Sun Oct 12 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-1
557 - Update to Gromacs 4.0.
558 - Remove module system and patch file names to begin with g_.
560 * Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.15.rc3
561 - Changed location of binaries.
562 - Removed conflict of module file, as the program is binary compatible with older versions.
564 * Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.14.rc3
565 - The gromacs module is loaded automatically and it conflicts with gromacs3.
567 * Tue Oct 07 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.13.rc3
568 - Renamed module files from %%{name}-%%{version} to %%{name}.
570 * Mon Oct 06 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.12.rc3
571 - Fix BR to get GROMACS to build in mock for epel-4.
573 * Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.11.rc3
574 - Fix to get GROMACS to build in mock for epel-5.
576 * Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.10.rc3
577 - Implement module system & remove binary renaming.
578 - No need for autoreconf anymore.
579 - Update to rc3.
581 * Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.9.rc2
582 - Fall back to autoreconf due to binary renaming.
584 * Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.8.rc2
585 - Modified install commands to preserve timestamps.
587 * Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.7.rc2
588 - Even more review fixes.
589 - Binaries renamed:
590 highway -> g_highway
591 luck -> g_luck
592 sigeps -> g_sigeps
593 wheel -> g_wheel
595 * Thu Oct 02 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.6.rc2
596 - Final review fixes.
598 * Wed Oct 01 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.5.rc2
599 - Strip down requires by branching tutor to its own package.
601 * Tue Sep 30 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.4.rc2
602 - Extensive package review fixes.
603 - Unclear licenses on some files, filed upstream bug 217.
604 http://bugzilla.gromacs.org/show_bug.cgi?id=217
606 * Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.3.rc2
607 - Move .so files to -devel package.
608 - Remove .la files.
610 * Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.2.rc2
611 - Implement out-of-tree-builds.
612 - Add --noexecstack to CFLAGS.
613 - Remove execstack procedure and prelink from buildreqs.
614 - Filed upstream bug 215 to add .note.GNU-stack .
615 - Fix incorrect file permission on src/tools/gmx_xpm2ps.c .
617 * Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.1.rc2
618 - Alphabetized buildrequires.
619 - Changed gromacs-share to gromacs-common.
621 * Fri Sep 26 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.0.rc2
622 - Initial build.