name = 'WIEN2k'
version = '12.1'

homepage = 'http://www.wien2k.at/'
description = """The program package WIEN2k allows to perform electronic structure calculations of solids
 using density functional theory (DFT). It is based on the full-potential (linearized) augmented plane-wave
  ((L)APW) + local orbitals (lo) method, one among the most accurate schemes for band structure calculations.
 WIEN2k is an all-electron scheme including relativistic effects and has many features."""

toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'}

sources = ['%s_%s.tar' % (name, version.split('.')[0])]

patches = ['WIEN2k-12.1_fix-range-array-constructor.patch']

osdependencies = ['libpthread.a']  # delivered by glibc-static or glibc-devel

tests = [
    # test case 1: NaCl
    ('NaCl', '-b', '-i 3', [r'^:DIS.*0.1227', r'^:ENE.*-1248.1427']),
    # test case 2: TiO2
    ('TiO2',
     '-b -numk 1000 -rkmax 7.5',
     '-in1ef -cc 0.00001 -fc 0.5 -i 100',
     [r'^:ENE.*-4018.0761',
      r'^:FGL001.*\s+[0.]+\s+[0.]+\s+[0.]+\s+total forces',
      r'^:FGL002.*14.63.*total forces'
      ])
]

moduleclass = 'chem'
