aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Macháček <Hloupy.Honza@centrum.cz>2011-01-17 21:22:28 +0100
committerHonza Macháček <Hloupy.Honza@centrum.cz>2011-01-17 21:22:28 +0100
commitc6e75dee676eba58755f0b4c1d364b587028a5a4 (patch)
tree291e02cdb7b8b50b72470b7ecc9ba6347d7c0988 /sci-libs/wannier90
parentAn ebuild for abinit-6.4.2 using external dependencies as proper Gentoo packa... (diff)
downloadsci-c6e75dee676eba58755f0b4c1d364b587028a5a4.tar.gz
sci-c6e75dee676eba58755f0b4c1d364b587028a5a4.tar.bz2
sci-c6e75dee676eba58755f0b4c1d364b587028a5a4.zip
A wannier90 ebuild for sci-physics/abinit
Diffstat (limited to 'sci-libs/wannier90')
-rw-r--r--sci-libs/wannier90/ChangeLog11
-rw-r--r--sci-libs/wannier90/Manifest5
-rw-r--r--sci-libs/wannier90/files/wannier90-1.1-0001.patch16
-rw-r--r--sci-libs/wannier90/files/wannier90-1.1-0002.patch105
-rw-r--r--sci-libs/wannier90/wannier90-1.2.ebuild73
5 files changed, 210 insertions, 0 deletions
diff --git a/sci-libs/wannier90/ChangeLog b/sci-libs/wannier90/ChangeLog
new file mode 100644
index 000000000..240fd6354
--- /dev/null
+++ b/sci-libs/wannier90/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-libs/wannier90
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*wannier90-1.2 (17 Jan 2011)
+
+ 17 Jan 2011; Honza Macháček <Hloupy.Honza@centrum.cz>
+ +files/wannier90-1.1-0001.patch, +files/wannier90-1.1-0002.patch,
+ +wannier90-1.2.ebuild:
+ A wannier90 ebuild for sci-physics/abinit
+
diff --git a/sci-libs/wannier90/Manifest b/sci-libs/wannier90/Manifest
new file mode 100644
index 000000000..2af76ba15
--- /dev/null
+++ b/sci-libs/wannier90/Manifest
@@ -0,0 +1,5 @@
+AUX wannier90-1.1-0001.patch 616 RMD160 b92b6bf4f80dab94bc560325a8cde388a6c7a844 SHA1 375d6a8ff738e6e6ba55009802e2b651e95fa6e8 SHA256 05398424121dbe53f35559b0e0e372ea841f5dd5a9ede53df66afb805b5ef22a
+AUX wannier90-1.1-0002.patch 5596 RMD160 36dd891904566fef47f601cc436bf0c89e10fcc3 SHA1 8dc7ff37147530a3a63484ef2695d2141bd20433 SHA256 2476ccf3090cbab54b699327df20b81c5aa75bd2b5c0b203841d5ec6128c620a
+DIST wannier90-1.2.tar.gz 5643731 RMD160 4a8035ed4faf5256ad66aa9fe23ac32a86b3abf4 SHA1 b4caaddb6e91afe673c122507e92c6b5fbc7689f SHA256 a76f88eef01c5a40aaa2c74ee393ede8a57bd9085f6b7f2ab656b50c1a30ece4
+EBUILD wannier90-1.2.ebuild 1684 RMD160 9214902906181ad18d33ee4fa17eeb2bec569352 SHA1 8efb14318422bcc5b32625591e25cd5780caac4f SHA256 1a8f2cf3e6b25c93431b92c5a6e6ac704c03b6829d9f774c997bfa7ed29b7664
+MISC ChangeLog 345 RMD160 036eed8591678fe09bea20769bab632de027d012 SHA1 7071d63c088cbfd97174174a528197b6f38580eb SHA256 7a535f6a1afc2f733282c2d7e0a2c71f724ec9f8293a3c9508c5ac253dd2708a
diff --git a/sci-libs/wannier90/files/wannier90-1.1-0001.patch b/sci-libs/wannier90/files/wannier90-1.1-0001.patch
new file mode 100644
index 000000000..e68c5f4fe
--- /dev/null
+++ b/sci-libs/wannier90/files/wannier90-1.1-0001.patch
@@ -0,0 +1,16 @@
+diff -urN wannier90-1.1.old/src/wannier_lib.F90 wannier90-1.1.new/src/wannier_lib.F90
+--- wannier90-1.1.old/src/wannier_lib.F90 2007-12-20 10:58:37.000000000 +0100
++++ wannier90-1.1.new/src/wannier_lib.F90 2008-04-28 17:27:19.000000000 +0200
+@@ -166,6 +166,12 @@
+ exclude_bands_loc(1:num_exclude_bands) = exclude_bands(1:num_exclude_bands)
+ end if
+
++ if (postproc_setup) then
++ call kmesh_write()
++ write(stdout,'(1x,a25,f11.3,a)') 'Time to write kmesh ',io_time(),' (sec)'
++ write(stdout,'(/a)') ' '//trim(seedname)//'.nnkp written.'
++ endif
++
+
+ call kmesh_dealloc()
+ call param_dealloc()
diff --git a/sci-libs/wannier90/files/wannier90-1.1-0002.patch b/sci-libs/wannier90/files/wannier90-1.1-0002.patch
new file mode 100644
index 000000000..391a34ca2
--- /dev/null
+++ b/sci-libs/wannier90/files/wannier90-1.1-0002.patch
@@ -0,0 +1,105 @@
+diff -urN wannier90-1.1.old/src/disentangle.F90 wannier90-1.1.new/src/disentangle.F90
+--- wannier90-1.1.old/src/disentangle.F90 2009-03-07 15:44:11.000000000 +0100
++++ wannier90-1.1.new/src/disentangle.F90 2009-03-07 15:48:05.000000000 +0100
+@@ -1784,9 +1784,9 @@
+ ! [BIG ITERATION LOOP (iter)]
+
+ if (.not.dis_converged) then
+- write(stdout,'(/5x,a)') '<<< Warning: Maximum number of disentanglement &
+- &iterations reached >>>'
+- write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>'
++ write(stdout,'(/5x,a)') &
++ '<<< Warning: Maximum number of disentanglement iterations reached >>>'
++ write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>'
+ endif
+
+ if (icompflag.eq.1) then
+@@ -2551,8 +2551,8 @@
+ ! [BIG ITERATION LOOP (iter)]
+
+ if (.not.dis_converged) then
+- write(stdout,'(/5x,a)') '<<< Warning: Maximum number of disentanglement &
+- &iterations reached >>>'
++ write(stdout,'(/5x,a)') &
++ '<<< Warning: Maximum number of disentanglement iterations reached >>>'
+ write(stdout,'(10x,a)') '<<< Disentanglement convergence criteria not satisfied >>>'
+ endif
+
+diff -urN wannier90-1.1.old/src/overlap.F90 wannier90-1.1.new/src/overlap.F90
+--- wannier90-1.1.old/src/overlap.F90 2009-03-07 15:44:11.000000000 +0100
++++ wannier90-1.1.new/src/overlap.F90 2009-03-07 15:48:36.000000000 +0100
+@@ -141,8 +141,8 @@
+ nn_found=.true.
+ nn=inn
+ else
+- call io_error('Error reading '//trim(seedname)//'.mmn.&
+- & More than one matching nearest neighbour found')
++ call io_error('Error reading '//trim(seedname)// &
++ '.mmn. More than one matching nearest neighbour found')
+ endif
+ endif
+ end do
+diff -urN wannier90-1.1.old/src/parameters.F90 wannier90-1.1.new/src/parameters.F90
+--- wannier90-1.1.old/src/parameters.F90 2009-03-07 15:44:11.000000000 +0100
++++ wannier90-1.1.new/src/parameters.F90 2009-03-07 15:50:46.000000000 +0100
+@@ -1054,8 +1054,9 @@
+ write(stdout,'(1x,a)') '+----------------------------------------------------------------------------+'
+ do nsp=1,num_species
+ do nat=1,atoms_species_num(nsp)
+- write(stdout,'(1x,a1,1x,a2,1x,i3,3F10.5,3x,a1,1x,3F10.5,4x,a1)') '|',atoms_symbol(nsp),nat,atoms_pos_frac(:,nat,nsp),&
+- '|',atoms_pos_cart(:,nat,nsp)*lenconfac,'|'
++ write(stdout,'(1x,a1,1x,a2,1x,i3,3F10.5,3x,a1,1x,3F10.5,4x,a1)') &
++& '|',atoms_symbol(nsp),nat,atoms_pos_frac(:,nat,nsp),&
++& '|',atoms_pos_cart(:,nat,nsp)*lenconfac,'|'
+ end do
+ end do
+ write(stdout,'(1x,a)') '*----------------------------------------------------------------------------*'
+@@ -1073,8 +1074,8 @@
+ write(stdout,'(1x,a)') '| Frac. Coord. l mr r z-axis x-axis Z/a |'
+ write(stdout,'(1x,a)') '+----------------------------------------------------------------------------+'
+ do nsp=1,num_proj
+- write(stdout,'(1x,a1,3(1x,f5.2),1x,i2,1x,i2,1x,i2,3(1x,f6.3),3(1x,f6.3),&
+- & 2x,f4.1,1x,a1)') '|',proj_site(1,nsp),proj_site(2,nsp),&
++ write(stdout,'(1x,a1,3(1x,f5.2),1x,i2,1x,i2,1x,i2,3(1x,f6.3),3(1x,f6.3),2x,f4.1,1x,a1)')&
++& '|',proj_site(1,nsp),proj_site(2,nsp),&
+ proj_site(3,nsp),proj_l(nsp), proj_m(nsp),proj_radial(nsp),&
+ proj_z(1,nsp),proj_z(2,nsp),proj_z(3,nsp),proj_x(1,nsp),&
+ proj_x(2,nsp),proj_x(3,nsp),proj_zona(nsp),'|'
+@@ -2738,8 +2739,8 @@
+ dummy=utility_strip(in_data(line))
+ dummy=adjustl(dummy)
+ pos1=index(dummy,':')
+- if(pos1==0) call io_error('param_read_projection: malformed projection &
+- &definition: '//trim(dummy))
++ if(pos1==0) &
++ call io_error('param_read_projection: malformed projection definition: '//trim(dummy))
+ sites=0
+ ctemp=dummy(:pos1-1)
+ ! Read the atomic site
+@@ -2980,11 +2981,11 @@
+ endif
+ end if
+ if(sites==-1) then
+- if(counter+sum(ang_states) > num_proj) call io_error('param_get_projection: &
+- &too many projections defined')
++ if(counter+sum(ang_states) > num_proj) &
++ call io_error('param_get_projection: too many projections defined')
+ else
+- if(counter+sites*sum(ang_states) > num_proj) call io_error('param_get_projection:&
+- & too many projections defined')
++ if(counter+sites*sum(ang_states) > num_proj) &
++ call io_error('param_get_projection: too many projections defined')
+ end if
+ !
+ if(sites==-1) then
+@@ -3025,8 +3026,8 @@
+
+ ! check there are enough projections and add random projections if required
+ if (.not. lpartrandom) then
+- if (counter.ne.num_proj) call io_error('param_get_projections:&
+- & Fewer projections defined than the number of Wannier functions requested')
++ if (counter.ne.num_proj) call io_error(&
++ 'param_get_projections: Fewer projections defined than the number of Wannier functions requested')
+ else
+ call random_seed()
+ do loop=counter+1,num_proj
diff --git a/sci-libs/wannier90/wannier90-1.2.ebuild b/sci-libs/wannier90/wannier90-1.2.ebuild
new file mode 100644
index 000000000..afefb31cf
--- /dev/null
+++ b/sci-libs/wannier90/wannier90-1.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+
+inherit eutils multilib
+
+DESCRIPTION="Calculates maximally localized Wannier functions (MLWFs)"
+HOMEPAGE="http://www.wannier.org/"
+SRC_URI="http://quasiamore.mit.edu/wannier/code/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples perl test"
+RDEPEND="virtual/blas
+ virtual/lapack
+ perl? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base
+ || (
+ dev-texlive/texlive-latexextra
+ app-text/tetex
+ app-tex/ptex
+ )
+ )"
+
+src_prepare() {
+ # Patch taken from sci-physics/abinit-5.7.3 bundled version
+ epatch "${FILESDIR}"/${PN}-1.1-0001.patch
+ epatch "${FILESDIR}"/${PN}-1.1-0002.patch
+}
+
+src_configure() {
+ cat <<- EOF >> "${S}"/make.sys
+ F90 = $(tc-getFC)
+ FCOPTS = ${FCFLAGS:- ${FFLAGS:- -O2}}
+ LDOPTS = ${LDFLAGS}
+ LIBS = -llapack -lblas
+ EOF
+}
+
+src_compile() {
+ emake -j1 wannier || die "make wannier failed"
+ emake -j1 lib || die "make lib failed"
+ if use doc; then
+ emake -j1 doc || die "make doc failed"
+ fi
+}
+
+src_test() {
+ einfo "Compare the 'Standard' and 'Current' outputs of this test."
+ pushd tests
+ emake test || die
+ cat wantest.log
+}
+
+src_install() {
+ dobin wannier90.x || die "Wannier executable cannot be installed"
+ if use perl; then
+ ( cd utility; dobin kmesh.pl )
+ fi
+ dolib.a libwannier.a || die "libwannier.a cannot be installed"
+ insinto /usr/$(get_libdir)/finclude
+ doins src/*.mod || die
+ if use examples; then
+ mkdir -p ${D}/usr/share/${PN}
+ cp -r examples ${D}/usr/share/${PN}/;
+ fi
+ if use doc; then
+ (cd doc; dodoc *.pdf )
+ fi
+ dodoc README README.install LICENCE CHANGE.log
+}