name = 'QuantumESPRESSO'
version = '5.4.0'

homepage = 'http://www.pwscf.org/'
description = """Quantum ESPRESSO  is an integrated suite of 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': 'foss', 'version': '2016.04'}
toolchainopts = {'usempi': True}

# major part of this list was determined from espresso/install/plugins_list
sources = [
    'espresso-%(version)s.tar.gz',
    'wannier90-1.2.tar.gz',
    'atomic-%(version)s.tar.gz',
    'neb-%(version)s.tar.gz',
    'PHonon-%(version)s.tar.gz',
    # must be downloaded manually from
    # http://qe-forge.org/gf/project/q-e/scmsvn/?action=browse&path=%2F%2Acheckout%2A%2Ftags%2FQE-5.2.1%2Fespresso%2Farchive%2Fplumed-1.3-qe.tar.gz&revision=11758
    # gets updated without changes to filename, cfr. http://qe-forge.org/pipermail/q-e-commits/2015-June/007359.html
    # 'plumed-1.3-qe-r11758.tar.gz',
    'pwcond-%(version)s.tar.gz',
    'tddfpt-%(version)s.tar.gz',
    'want-2.5.1-base.tar.gz',
    'yambo-3.4.2.tgz',
    'xspectra-%(version)s.tar.gz',
]
#missing_sources = [
#    'sax-2.0.3.tar.gz',  # nowhere to be found
#]
#source_urls = [
#    'http://files.qe-forge.org/index.php?file=',  # all sources, except espresso*.tar.gz
#    'http://qe-forge.org/gf/download/frsrelease/211/968/',  # espresso-5.4.0.tar.gz
#    'http://qe-forge.org/gf/download/frsrelease/153/618/',  # want-2.5.1-base.tar.gz
#    'http://qe-forge.org/gf/download/frsrelease/208/932/',  # yambo-3.4.2.tgz
#]

patches = [
    'QuantumESPRESSO-%(version)s_yambo-fixes.patch',
]

# source checksums
#checksums = [
#    '8bb78181b39bd084ae5cb7a512c1cfe7',  # espresso-5.4.0.tar.gz
#    'a1e9611b9a82941c23426028d112186e',  # wannier90-1.2.tar.gz
#    '24dc0d8bf5cf4eb4dc38e1c18a80b3ee',  # atomic-5.4.0.tar.gz
#    '254f929259fb06036b78c493cf18e5d6',  # neb-5.4.0.tar.gz
#    'f641fe9dcf0ec8f1e47d74e3c7c39705',  # PHonon-5.4.0.tar.gz
    # 'f094031c6d13a0e00022daf4d7c847c7',  # plumed-1.3-qe-r11758.tar.gz
#    '31c1cd8cd76752833a9205d456093d0a',  # pwcond-5.4.0.tar.gz
#    '2101533a627644ef467b60d400977eab',  # tddfpt-5.4.0.tar.gz
#    'ac365daebbe380bf4019235eacf71079',  # want-2.5.1-base.tar.gz
#    'f0820a0f42dfc81ce3811af647bed777',  # yambo-3.4.2.tgz
#    '95080929c87389cd15cf765048cfc9d2',  # xspectra-5.4.0.tar.gz
#]

# gipaw excluded due to: configure: error: Cannot compile against this version of Quantum-Espresso
# add plumed and uncomment the lines in sources and checksums if the package is downloaded manually
buildopts = 'all'  # plumed

# parallel build tends to fail
parallel = 1

moduleclass = 'chem'
