##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2013-2014 The Cyprus Institute
# Authors:: Thekla Loizou <t.loizou@cyi.ac.cy>
# License:: MIT/GPL
#
##
easyblock = "ConfigureMake"

name = 'ABINIT'
version = '7.4.3'
versionsuffix = '-ETSF_IO-1.0.4'

homepage = 'http://www.abinit.org/'
description = """Abinit is a plane wave pseudopotential code for doing
 condensed phase electronic structure calculations using DFT."""

toolchain = {'name': 'goolf', 'version': '1.4.10'}

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

configopts = '--enable-mpi --enable-mpi-io --with-mpi-prefix=$EBROOTOPENMPI --enable-fallbacks '
configopts += '--with-netcdf-incs="-I$EBROOTNETCDF/include" '
configopts += '--with-netcdf-libs="-L$EBROOTNETCDF/lib -lnetcdf -lnetcdff" '
configopts += '--with-fft-libs="-L$EBROOTFFTW/lib -lfftw3 -lfftw3f" --with-fft-flavor=fftw3 '
configopts += '--with-trio-flavor="netcdf+etsf_io" --enable-gw-dpc'

dependencies = [
    ('netCDF', '4.1.3'),
    ('ETSF_IO', '1.0.4'),
]

sanity_check_paths = {
    'files': ["bin/abinit"],
    'dirs': []
}

moduleclass = 'chem'
