Name: wannier90 Version: 1.2 Release: 2%{?dist} Summary: Maximally-localised Wannier functions Group: Applications/Engineering License: GPLv2+ URL: http://wannier.org/ Source0: http://quasiamore.mit.edu/wannier/code/wannier90-%{version}.tar.gz # Patch to enable building of shared library Patch0: wannier90-1.1-shlib.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc-gfortran # For test phase BuildRequires: perl(Cwd) # Linear algebra: use ATLAS BuildRequires: atlas-devel # For documentation BuildRequires: tex(latex) %description Wannier90 is a program for calculating maximally-localised Wannier functions (MLWF) from a set of Bloch energy bands that may or may not be attached to or mixed with other bands. The formalism works by minimising the total spread of the MLWF in real space. This is done in the space of unitary matrices that describe rotations of the Bloch bands at each k-point. As a result, wannier90 is independent of the basis set used in the underlying calculation to obtain the Bloch states. Therefore, it may be interfaced straightforwardly to any electronic structure code. The locality of MLWF can be exploited to compute band-structure, density of states and Fermi surfaces at modest computational cost. Furthermore, wannier90 is able to output MLWF for visualisation and other post-processing purposes. Wannier functions are already used in a wide variety of applications. These include analysis of chemical bonding in real space; calculation of dielectric properties via the modern theory of polarisation; and as an accurate and minimal basis set in the construction of model Hamiltonians for large-scale systems, in linear-scaling quantum Monte Carlo calculations, and for efficient computation of material properties, such as the anomalous Hall coefficient. %package devel Summary: Development modules for Wannier90 Group: Development/Languages Requires: %{name} = %{version}-%{release} %description devel This package contains Fortran modules for Wannier90. %package doc Summary: Documentation for Wannier90 Group: Documentation %if 0%{?fedora} > 10 || 0%{?rhel} > 5 BuildArch: noarch %endif %description doc This package contains the tutorial and user's guide for Wannier90. %prep %setup -q %patch0 -p1 -b .sharedlib # Remove executable flag from utility that is included in doc chmod 644 utility/kmesh.pl # Convert documentation for file in CHANGE.log; do sed "s|\r||g" $file > $file.new && \ touch -r $file $file.new && \ mv $file.new $file done %build # Generate make.sys echo "F90 = gfortran" > make.sys echo "FCOPTS = %{optflags} -fPIC" >> make.sys echo "LDOPTS = %{optflags} -fPIC" >> make.sys # Use ATLAS echo "LIBS = -L%{_libdir}/atlas -lf77blas -latlas -llapack" >> make.sys # Use reference LAPACK #echo "LIBS = -lblas -llapack" >> make.sys make -C src %{?_smp_mflags} prog # Build documentation make -C doc/user_guide make -C doc/tutorial %install rm -rf %{buildroot} # Binary & library install -D -p -m 755 wannier90.x %{buildroot}%{_bindir}/wannier90.x # Must install as executable so that find-debuginfo catches this install -D -p -m 755 libwannier.so %{buildroot}%{_libdir}/libwannier.so # Fortran module files mkdir -p %{buildroot}%{_fmoddir} install -p -m 644 src/*.mod %{buildroot}%{_fmoddir}/ %clean rm -rf %{buildroot} %check # Set path so that wannier finds its library export LD_LIBRARY_PATH=`pwd` make test %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc CHANGE.log LICENCE README utility/ examples/ %{_bindir}/wannier90.x %{_libdir}/libwannier.so %files devel %defattr(-,root,root,-) %{_fmoddir}/w90_*.mod %files doc %defattr(-,root,root,-) %doc doc/tutorial.pdf doc/user_guide.pdf %changelog * Tue Feb 16 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.2-2 - Link library correctly against ATLAS. * Wed Jan 27 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.2-1 - Update to 1.2. * Wed Sep 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-6 - Fix location of Fortran modules. - Fix check phase. - Use ATLAS instead of reference BLAS & LAPACK. * Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat May 16 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-4 - Fix EPEL build by adding explicit BR: blas-devel. * Fri May 15 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-3 - Link binary against shared library. - Put library back into main package. * Tue Apr 21 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-2 - Break libs into own package. * Tue Apr 21 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.1-1 - First release.