# IT4Innovations
# LK 2024

easyblock = 'MakeCp'

name = 'CRYSTAL'
version = '17'
versionsuffix = '-1.0.2'

homepage = 'http://www.crystal.unito.it'
description = """The CRYSTAL package performs ab initio calculations of the ground state energy, energy
gradient, electronic wave function and properties of periodic systems. Hartree-Fock or Kohn-
Sham Hamiltonians (that adopt an Exchange-Correlation potential following the postulates of
Density-Functional Theory) can be used."""

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

sources = ['crystal17_v1_0_2_Linux-ifort17_emt64_Pdistrib.tar.gz']
patches = ['crystal17_v1.0.2-intel-2019b.patch']

checksums = [
    '38fec681f9f7852060e9ebca18f00289a36f049033a70ca4b2eee07e6ba72ede',
    '6aa420695049f3ebcff9166501b69b8846977b67f7959c0c8e33cf0b0daa3916',
]

prebuildopts = "cd build && "
buildopts = 'all'

parallel = 1

files_to_copy = [(['bin/Linux-ifort17_XE_emt64/*/*'], 'bin')]

sanity_check_paths = {
    'files': ['bin/crystal', 'bin/properties', 'bin/Pcrystal', 'bin/Pproperties'],
    'dirs': [],
}

moduleclass = 'chem'