# IT4Innovations 2020
# LK

easyblock = 'MakeCp'

name = 'Elk'
version = '6.8.4'
versionsuffix = '-parallel'

homepage = 'http://elk.sourceforge.net/'
description = """An all-electron full-potential linearised
augmented-plane wave (FP-LAPW) code with many advanced features. Written
originally at Karl-Franzens-Universität Graz as a milestone of the
EXCITING EU Research and Training Network, the code is designed to be as
simple as possible so that new developments in the field of density
functional theory (DFT) can be added quickly and reliably.
"""

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

source_urls = [SOURCEFORGE_SOURCE]
sources = [SOURCELOWER_TGZ]
patches = [
   '%(name)s-%(version)s-intel.patch',
]

# make.inc file is generated interactively by "setup" command, creating it here
prebuildopts = 'export OMP_NUM_THREADS=24 && ./setup && '

buildopts = 'all'

runtest = 'test'

parallel = 1

files_to_copy = [(
    [
        'src/elk', 'src/spacegroup/spacegroup', 'src/eos/eos',
        'utilities/elk-bands/elk-bands', 'utilities/elk-optics/elk-optics.py',
        'utilities/wien2k-elk/se.pl'
    ], 'bin'
)]

sanity_check_paths = {
    'files': ['bin/elk', 'bin/spacegroup', 'bin/eos'],
    'dirs': []
}

moduleclass = 'phys'
