# IT4Innovations

name = 'QuantumESPRESSO'
version = '6.3'

homepage = 'https://www.quantum-espresso.org'
description = """Quantum ESPRESSO  is an integrated suite of local_computer codes
 for electronic-structure calculations and materials modeling at the nanoscale.
 It is based on density-functional theory, plane waves, and pseudopotentials
  (both norm-conserving and ultrasoft).
"""

toolchain = {'name': 'intel', 'version': '2017a'}
toolchainopts = {'usempi': True, 'openmp': True}

# major part of this list was determined from espresso/install/plugins_list
# - There is currently no plumed version that works for QME 6.3
# - Yambo is better to install outside of QM-E, there are problems
#   building it with openmp turned on and the intel toolchain and there is
#   no added benefit to build it inside QM-E
# - Want is never installed in bin/ (since it first shows up in 4.2) so
#   don't bother building it here.
source_urls = [
    'https://github.com/QEF/q-e/releases/download/qe-%(version)s/',
    'https://github.com/dceresoli/qe-gipaw/archive/',
    'http://www.wannier.org/code/',  # wannier90-2.1.0.tar.gz
]
sources = [
    'qe-%(version)s.tar.gz',
    {'filename': 'qe-gipaw-%(version)s.tar.gz', 'download_filename': '%(version)s.tar.gz'},
    'wannier90-2.1.0.tar.gz',
]
patches = [
    '%(name)s-%(version)s_drop_LIBS_before_configure_of_fox.patch'
]
checksums = [
    '5d15f7cbb30ccb2e2e6722bc1cdf10a3aae909ae786654b0990068ed1846ad65',  # qe-6.3.tar.gz
    '090edfcc186047a12c596ec13fdb29c187ab33d91a44c08371f23e779bb15f1e',  # qe-gipaw-6.3.tar.gz
    'ee90108d4bc4aa6a1cf16d72abebcb3087cf6c1007d22dda269eb7e7076bddca',  # wannier90-2.1.0.tar.gz
    # QuantumESPRESSO-6.3_drop_LIBS_before_configure_of_fox.patch
    '714fef8be920a5a7c6afe81a7364978c00d76d6d39f79b8b18862c1598ea6af3',
]

dependencies = [
    ('HDF5', '1.10.2'),
    ('ELPA', '2016.11.001.pre'),
    ('libxc', '4.2.3'),
]

# The third party packages should be installed separately and added as
# dependencies.  The exception is w90, which is force built, and gipaw
# which depends on qe source
buildopts = 'all gwl xspectra couple epw gipaw w90'

# parallel build tends to fail
parallel = 1

moduleclass = 'chem'
