easyblock = 'ConfigureMake'

name = 'ABINIT'
version = "7.10.5"

homepage = 'http://www.abinit.org/'
description = """ABINIT is a package whose main program allows one to find the total energy,
 charge density and  electronic structure of systems made of electrons and nuclei (molecules
 and periodic solids) within Density Functional  Theory (DFT), using pseudopotentials and a
 planewave or wavelet basis."""

toolchain = {'name': 'intel', 'version': '2016.02-GCC-4.9'}
toolchainopts = {'usempi': True}

source_urls = ['http://ftp.abinit.org/']
sources = [SOURCELOWER_TAR_GZ]

# ensure mpi and intel toolchain
configopts = '--with-fc-vendor=intel --with-linalg-flavor=mkl --enable-mpi '
configopts += '--with-fft-flavor=fftw3-mkl '
configopts += '--with-fft-libs="$LIBFFT"'

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['abinit', 'aim', 'cut3d', 'conducti', 'mrgddb', 'mrgscr', 'optic']],
    'dirs': ['lib/pkgconfig'],
}

moduleclass = 'chem'
