# Contribution from IT4Innovations National Supercomputing Center, Czech Republic
# Jakub Kropacek, 2022

name = 'XCrySDen'
version = '1.6.2'

homepage = "http://www.xcrysden.org/"
docurls = "http://www.xcrysden.org/Documentation.html"
description = """
XCrySDen is a crystalline and molecular structure visualisation program aiming at display of isosurfaces
and contours, which can be superimposed on crystalline structures and interactively rotated and manipulated.
It also possesses some tools for analysis of properties in reciprocal space such as interactive selection
of k-paths in the Brillouin zone for the band-structure plots, and visualisation of Fermi surfaces.
"""

toolchain = {'name': 'intel', 'version': '2022a'}

source_urls = ["http://www.xcrysden.org/download/"]
sources = [SOURCELOWER_TAR_GZ]
patches = ['XCrySDen-1.6.2-no-bwidget-tcl-download.patch']
checksums = [
    '811736ee598bec1a5b427fd10e4e063a30dd7cadae96a43a50b36ce90a4f503f',  # xcrysden-1.6.2.tar.gz
    'e5f79c77116c6faf441d63f62bb3d22c5520163995b28e505d2168424a587bac',  # XCrySDen-1.6.2-no-bwidget-tcl-download.patch
]

dependencies = [
    ('Togl', '2.0'),
    ('Mesa', '22.0.3'),
    ('libGLU', '9.0.2'),
    ('bwidget', '1.9.15'),
]

sanity_check_commands = [
    'xcrysden --help',
    # requires DISPLAY
    #'xcrysden --xsf $EBROOTXCRYSDEN/share/%(namelower)s-%(version)s/examples/XSF_Files/GaAsH.xsf --print output.png \
    # && rm output.png',
]

moduleclass = 'vis'
