Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{chem}[foss/2023a] pyWannier90 v2024-01-28 #21831

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
easyblock = 'MakeCp'

name = 'pyWannier90'
local_commit = 'c3f65d7'
version = '2024-01-28'

homepage = 'https://github.com/hungpham2017/pyWannier90'
description = "A Wannier90 Python interface for VASP and PySCF"

toolchain = {'name': 'foss', 'version': '2023a'}

local_wannier90_version = '3.1.0'

sources = [
{
'source_urls': ['https://github.com/hungpham2017/pyWannier90/archive/'],
'download_filename': '%s.tar.gz' % local_commit,
'filename': SOURCE_TAR_GZ
},
{
'source_urls': ['https://github.com/wannier-developers/wannier90/archive/'],
'download_filename': 'v%s.tar.gz' % local_wannier90_version,
'filename': 'Wannier90-%s.tar.gz' % local_wannier90_version,
},
]
checksums = [
{'pyWannier90-2024-01-28.tar.gz': '9828dcdde92b9627cfe888b5be530040c1c51c97f5a3c930d82ef24d862610e3'},
{'Wannier90-3.1.0.tar.gz': '40651a9832eb93dec20a8360dd535262c261c34e13c41b6755fa6915c936b254'},
]

builddependencies = [
('pybind11', '2.11.1'),
]

dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('PySCF', '2.7.0'),
]

local_wannier90_make = 'make -j %(parallel)s F90="$F90" FCOPTS="$FFLAGS -fPIC" LDOPTS="$FFLAGS" '
local_wannier90_make += 'LIBDIR="$LAPACK_LIB_DIR" LIBS="$LIBLAPACK"'

prebuildopts = "sed -i 's/ -undefined dynamic_lookup//g' src/Makefile && "
prebuildopts += "cd %%(builddir)s/wannier90-%s && touch make.inc && " % local_wannier90_version
prebuildopts += "cp %(builddir)s/pyWannier90-*/src/wannier_lib.F90 src/wannier_lib.F90 && "
prebuildopts += local_wannier90_make + " && "
prebuildopts += local_wannier90_make + " lib && "
prebuildopts += "cd %(builddir)s/pyWannier90-*/src && "

buildopts = 'CPP="$CXX" LIBS="-L%%(builddir)s/wannier90-%s $LIBLAPACK -lwannier" ' % local_wannier90_version
# with Intel compilers, use libwannier90_intel as make target
# with GCC compilers, use libwannier90_gf as make target
buildopts += "libwannier90_gf && "
buildopts += """sed -i "s@W90LIB = .*@W90LIB = '%(installdir)s'@g" pywannier90.py"""

files_to_copy = [
(['src/pywannier90.py', 'src/libwannier90.*.%s' % SHLIB_EXT], 'lib/python%(pyshortver)s/site-packages'),
]

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [
"python -c 'import libwannier90'",
"python -c 'import pywannier90'",
]

modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'}

moduleclass = 'chem'
Loading