name = 'NAMD'
version = '2.9'
versionsuffix = '-mpi'

homepage = 'http://www.ks.uiuc.edu/Research/namd/'
description = """NAMD is a parallel molecular dynamics code designed for high-performance simulation of large biomolecular systems."""

# AMD/intel cpu
toolchain = {'name': 'intel', 'version': '2017c'}
import os
if os.environ.get("CLUSTERNAME") in ["KAROLINA"]:
    toolchainopts = {'opt': True, 'pic': True, 'usempi': True, 'optarch': 'march=core-avx2'}
#    prebuildopts = "echo %(builddir)s && while read i; do echo $i; sed 's|-xHost|-march=core-avx2|g' -i $i; done < <(grep xHost %(builddir)s -R | cut -d ':' -f 1 | sort -u) && "
else:
    toolchainopts = {'opt': True, 'pic': True, 'usempi': True}


sources = ['NAMD_%(version)s_Source.tar.gz']

dependencies = [
    ('Tcl', '8.6.7', '', ('GCC', '6.3.0-2.27')),
    ('FFTW', '3.3.8', '', True),
]

charm_arch = 'mpi-linux-x86_64'

moduleclass = 'chem'
