# IT4Innovations 2018

easyblock = 'CMakeMake'

name = 'RELION'
version = '2.1'
versionsuffix = '-DP'

homepage = 'http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page'
description = """RELION (for REgularised LIkelihood OptimisatioN, pronounce rely-on) is a stand-alone local_computer
 program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class
 averages in electron cryo-microscopy (cryo-EM)."""

toolchain = {'name': 'foss', 'version': '2017a'}
toolchainopts = {'opt': True}

source_urls = ['https://github.com/3dem/relion/archive']
sources = ['%(version)s.tar.gz']

builddependencies = [
    ('CMake', '3.9.1', '', True),
]

dependencies = [
    ('X11', '20160819', '', True),
    ('libpng', '1.6.29', '', True),
    ('CUDA', '9.0.176', '', True),
]

separate_build_dir = True

configopts = '-DCUDA_ARCH=35 -DDoublePrec_GPU=ON'

modluafooter = 'add_property("arch","gpu")'

moduleclass = 'bio'