name = 'QuantumESPRESSO'
version = '4.2'

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': 'goalf', 'version': '1.1.0-no-OFED'}
toolchainopts = {'usempi': True}

sources = [
    'espresso-%(version)s.tar.gz',
    'wannier90-1.2.tar.gz',
    'want-2.3.0.tar.gz',
    'yambo-3.2.1-r.448.tar.gz',
]
source_urls = [
    'http://www.qe-forge.org/gf/download/frsrelease/64/96/',  # espresso-4.2.tar.gz
    'http://www.qe-forge.org/gf/download/frsrelease/64/97/',  # wannier90-1.2.tar.gz
    'http://files.qe-forge.org/index.php?file=',  # want-2.3.0.tar.gz
    'http://www.qe-forge.org/gf/download/frsrelease/64/98/',  # yambo-3.2.1-r.448.tar.gz
]

patches = [
    'QuantumESPRESSO-%(version)s_fix-errors.patch',
    'QuantumESPRESSO-%(version)s_fix-makefile-for-plugins.patch',
    'want-2.3.0_fix-memstat-issue.patch',
    'yambo-3.2.1_fix-objects-files.patch',
    'yambo_fix-configure-LDFLAGS.patch',
]

buildopts = 'all gipaw vdw w90 want gww xspectra yambo'

# parallel build tends to fail
parallel = 1

moduleclass = 'chem'
