# IT4Innovations 2022
# JK

easyblock = 'PythonBundle'

name = 'fromage'
version = '1.1.0'
docurls = 'https://fromage.readthedocs.io/'

homepage = 'https://github.com/Crespo-Otero-group/fromage'
description = """
fromage (FRamewOrk for Molecular AGgregate Excitations) is a Python framework designed to facilitate
the study of molecular aggregates in the excited state. It contains utilities for geometry manipulation going from
periodic to finite models, exciton analysis and ONIOM calculations.
"""

toolchain = {'name': 'foss', 'version': '2021b'}
import os
if os.environ.get("CLUSTERNAME") in ["KAROLINA"]:
    toolchainopts = {'optarch': 'march=core-avx2'}

dependencies = [
    ('SciPy-bundle', '2021.10'),
    ('SWIG', '4.0.2'),
]

#use_pip = True
skipsteps = ['sanitycheck']
sanity_pip_check = False

# stahnout zdrojak z githubu
exts_list = [
    (name, version, {
        'sources': 'v%(version)s.tar.gz',
        'checksums': ['88e5108a0081d3c306d34d5abb7b6e10a5b4dc0e886e28a27c5f56c9a79002ee'],
    }),
]

sanity_check_paths = {
    'files': [
    'bin/fro_assign_charges.py', 'bin/fro_coupling.py', 'bin/fro_dimer_tools.py',
    'bin/fro_exciton_classification.py', 'bin/fro_pick_mol.py', 'bin/fro_pop_stat.py',
    'bin/fro_prep_run.py', 'bin/fro_run.py', 'bin/fro_uc_tools.py', 'bin/fro_volumetrics.py'
],
    'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

postinstallcmds = [
    'git clone https://github.com/Crespo-Otero-group/Ewald.git',
    'cc -o Ewald-bin Ewald/Ewald.c Ewald/randome.c -lscalapack -lflexiblas -lgfortran -lm -Wno-error',
    'mv Ewald-bin %(installdir)s/bin/Ewald'
]

moduleclass = 'python'
