# IT4Innovations
# LK 2025

easyblock = 'MakeCp'

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

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-ifort19_i64_Pdistrib.tar.gz']

patches = ['CRYSTAL17-mpibin-Linux-ifort19_i64.patch']

checksums = [
    'a56a7bff92a960291f7a603d4db579b694c6fe6733fc20df47957d60c44108a1',
    '1be380b5fd926a13fdbdccfab75f0fca3b30fa7f7cefdf658c0ca50db2a63202',
]

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

parallel = 1

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

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

moduleclass = 'chem'