2019-12-31 14:36:56 +08:00
|
|
|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2017-08-18 07:33:44 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
2017-08-18 07:33:44 +08:00
|
|
|
from spack import *
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
class Gaussian(Package):
|
2020-05-21 11:34:03 +08:00
|
|
|
"""Gaussian is a computer program for computational chemistry"""
|
2017-08-18 07:33:44 +08:00
|
|
|
|
|
|
|
homepage = "http://www.gaussian.com/"
|
2019-10-12 17:04:05 +08:00
|
|
|
manual_download = True
|
2017-08-18 07:33:44 +08:00
|
|
|
|
2020-05-21 11:34:03 +08:00
|
|
|
maintainers = ['antoniokaust']
|
|
|
|
|
|
|
|
version('16-B.01', sha256='0b2cf60aa85d2c8c8e7547446e60e8e8cb67eec20e5f13c4a3e4e7616dcdf122')
|
|
|
|
version('09-D.01', sha256='ef14885b5e334b6ec44a93bfd7225c634247dc946416af3087ab055bf05f54cd')
|
|
|
|
|
|
|
|
@property
|
|
|
|
def ver(self):
|
|
|
|
return self.version.string.split('-')[0]
|
|
|
|
|
|
|
|
@property
|
|
|
|
def g_root(self):
|
|
|
|
return join_path(self.prefix, 'g' + self.ver)
|
|
|
|
|
|
|
|
@property
|
|
|
|
def g_bsd(self):
|
|
|
|
return join_path(self.g_root, 'bsd')
|
|
|
|
|
|
|
|
def url_for_version(self, version):
|
|
|
|
return "file://{0}/g{1}.tgz".format(os.getcwd(), version)
|
2017-08-18 07:33:44 +08:00
|
|
|
|
|
|
|
def install(self, spec, prefix):
|
2020-05-21 11:34:03 +08:00
|
|
|
install_tree('.', self.g_root)
|
|
|
|
|
|
|
|
@run_after('install')
|
|
|
|
def bsd_install(self):
|
|
|
|
with working_dir(self.g_root):
|
|
|
|
bsd_install = Executable(join_path('bsd', 'install'))
|
|
|
|
bsd_install()
|
2017-08-18 07:33:44 +08:00
|
|
|
|
2019-11-30 05:00:44 +08:00
|
|
|
def setup_run_environment(self, env):
|
2020-05-21 11:34:03 +08:00
|
|
|
env.set('g' + self.ver + 'root', self.prefix)
|
|
|
|
|
|
|
|
env.prepend_path('GAUSS_EXEDIR', self.g_root)
|
|
|
|
env.prepend_path('GAUSS_EXEDIR', self.g_bsd)
|
|
|
|
|
|
|
|
env.prepend_path('PATH', self.g_root)
|
|
|
|
env.prepend_path('PATH', self.g_bsd)
|
|
|
|
|
|
|
|
env.set('GAUSS_LEXEDIR', join_path(self.g_root, 'linda-exe'))
|
|
|
|
env.set('GAUSS_ARCHDIR', join_path(self.g_root, 'arch'))
|
|
|
|
env.set('GAUSS_BSDDIR', self.g_bsd)
|
|
|
|
env.set('G' + self.ver + 'BASIS', join_path(self.g_root, 'basis'))
|
|
|
|
|
|
|
|
env.prepend_path('LD_LIBRARY_PATH', self.g_root)
|
|
|
|
env.prepend_path('LD_LIBRARY_PATH', self.g_bsd)
|