name = 'QuantumESPRESSO'
version = '6.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': 'intel', 'version': '2017.00'}
toolchainopts = {'usempi': True}

# major part of this list was determined from espresso/install/plugins_list
sources = [
    'qe-%(version)s.tar.gz',
    'wannier90-1.2.tar.gz',
    'qe-gipaw-6.0.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-latest.tar.gz',
    'want-2.5.1-base.tar.gz',
    'yambo-4.1.2-rev.120.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/224/1044/',  # qe-6.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-5.4.0_yambo-fixes.patch',
#]

# add plumed and uncomment the lines in sources and checksums if the package is downloaded manually
buildopts = 'all w90 gipaw want yambo xspectra'  # plumed

# parallel build tends to fail
parallel = 1

moduleclass = 'chem'
