name = 'QuantumESPRESSO'
version = '5.2.1'

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': 'intel', 'version': '2015b'}
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.1-rev61.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/199/855/',  # espresso-5.2.1.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/184/723/',  # yambo-3.4.1-rev61.tgz
]

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

# source checksums
checksums = [
    'da3ec5302e4343804e65de60f6004c2d',  # espresso-5.2.1.tar.gz
    'a1e9611b9a82941c23426028d112186e',  # wannier90-1.2.tar.gz
    '6f6ce6f9b73d521340e7f6d60dce5e1c',  # atomic-5.2.1.tar.gz
    '586906007c57fff33c0ee2193998eb4d',  # neb-5.2.1.tar.gz
    '9549d79f294f5b5f1a7b504858b4b587',  # PHonon-5.2.1.tar.gz
    'f094031c6d13a0e00022daf4d7c847c7',  # plumed-1.3-qe-r11758.tar.gz
    '4ec8075f78dfa606812c911ca22cad01',  # pwcond-5.2.1.tar.gz
    'cca5b395001067e5a521e6d58e7ad7b0',  # tddfpt-5.2.1.tar.gz
    'ac365daebbe380bf4019235eacf71079',  # want-2.5.1-base.tar.gz
    '03ea2fda7a2f34f7d8ee6130fca23817',  # yambo-3.4.1-rev61.tgz
    '406b0573fbb695c0bb5d33e85a424d37',  # xspectra-5.2.1.tar.gz
]

# gipaw excluded due to: configure: error: Cannot compile against this version of Quantum-Espresso
buildopts = 'all w90 want yambo plumed xspectra'

# parallel build tends to fail
parallel = 1

moduleclass = 'chem'
