Install gaussian using their scripts (#16723)

* Create VMD recipe

This is a new recipe to install VMD on Spack-managed hosts.

* Fix lint errors.

* Use plain Package

As per peer-review:
- Use Package to build
- Use configure to create a Makefile
- Use install to copy files to prefix directory

* Move VMD package to correct path, duh...

* Restructure description so first short paragraph can be used by module files.

* Add an empty line as suggested by peer-review. That's how you separate paragraphs.

* Remove extra spaces.

* Use setup_build_environment since that's where you're supposed to export OS variblaes. Thanks to peer-review for spotting this.

* Create VMD recipe

This is a new recipe to install VMD on Spack-managed hosts.

* Fix lint errors.

* Use plain Package

As per peer-review:
- Use Package to build
- Use configure to create a Makefile
- Use install to copy files to prefix directory

* Move VMD package to correct path, duh...

* Add Cubist (#16069)

* Add Cubist

* enhance recipe

* Not using OS module anymore

* remove white space

* Fix build shell

* make Flake8 happy

* use bash shell for build

* Convert it To MakefilePackage as per peer-review

* dbcsr: expose all options, check openblas feats (#16034)

* dbcsr: expose all options, check openblas feats

* dbcsr: use Ninja to build, ensure serialized tests

* dbcsr: add myself as maintainer

* MPark.Variant: GCC 7.3.1 Conflict (#16081)

* MPark.Variant: GCC 7.3.1 Conflict

Due to an ICE in this specific patch-release of GCC, compile
errors in downstream packages should be avoided with a clean
conflict.

* Fix superfluous spaces

Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>

* Fix typo

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Move VMD package to correct path, duh...

* Add an empty line as suggested by peer-review. That's how you separate paragraphs.

* New matlab versions (#16086)

* Add new version 1.1.1 (#16087)

* New package bonniepp added (#16091)

* openbabel: fix compilation errors (#16090)

- Disable maeparser as it is broken with CMake
- Added missing dependencies

* singularity: updated maintainer list (#16093)

* New version xrootd-4.11.3 (#16092)

* I added Gaussian 16. I also execute bsd/install to fix scripts instead of filtering them.

* revert VMD so only Gaussian is in my PR.

* revert VMD so only Gaussian is in my PR.

* revert VMD so only Gaussian is in my PR.

* I added myself as a package maintainer.

Co-authored-by: asmaahassan90 <31959389+asmaahassan90@users.noreply.github.com>
Co-authored-by: Tiziano Müller <tiziano.mueller@chem.uzh.ch>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Co-authored-by: Amjad Kotobi <amjadkotbi@gmail.com>
Co-authored-by: athanasio <athanasio@users.noreply.github.com>
Co-authored-by: Carlos Arango Gutierrez <arangogutierrez@gmail.com>
This commit is contained in:
Antonio Arena 2020-05-21 06:34:03 +03:00 committed by GitHub
parent 51ff18ef8d
commit 4118a01774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details. # Spack Project Developers. See the top-level COPYRIGHT file for details.
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * from spack import *
import os import os
@ -11,41 +10,50 @@ class Gaussian(Package):
"""Gaussian is a computer program for computational chemistry""" """Gaussian is a computer program for computational chemistry"""
homepage = "http://www.gaussian.com/" homepage = "http://www.gaussian.com/"
url = "file://{0}/g09.tgz".format(os.getcwd())
manual_download = True manual_download = True
version('09', '7d4c95b535e68e48af183920df427e4e') 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)
def install(self, spec, prefix): def install(self, spec, prefix):
install_tree('.', prefix.bin) install_tree('.', self.g_root)
patch_install_files = ['flc',
'linda8.2/opteron-linux/bin/flc', @run_after('install')
'linda8.2/opteron-linux/bin/LindaLauncher', def bsd_install(self):
'linda8.2/opteron-linux/bin/ntsnet', with working_dir(self.g_root):
'linda8.2/opteron-linux/bin/pmbuild', bsd_install = Executable(join_path('bsd', 'install'))
'linda8.2/opteron-linux/bin/vntsnet', bsd_install()
'ntsnet'
]
for filename in patch_install_files:
if os.path.isfile(filename):
filter_file('/mf/frisch/g09', prefix.bin, join_path(prefix.bin,
filename), string='True')
patch_install_files = ['linda8.2/opteron-linux/bin/ntsnet',
'linda8.2/opteron-linux/bin/vntsnet',
]
for filename in patch_install_files:
if os.path.isfile(filename):
filter_file('/usr/bin/linda', prefix.bin, join_path(prefix.bin,
filename), string='True')
def setup_run_environment(self, env): def setup_run_environment(self, env):
env.set('g09root', self.prefix) env.set('g' + self.ver + 'root', self.prefix)
env.set('GAUSSIANHOME', self.prefix)
env.set('GAUSS_EXEDIR', self.prefix.bin) env.prepend_path('GAUSS_EXEDIR', self.g_root)
env.set('G09_BASIS', self.prefix.bin.basis) env.prepend_path('GAUSS_EXEDIR', self.g_bsd)
env.set('GAUSS_LEXEDIR', join_path(self.prefix.bin, 'linda-exe'))
env.set('GAUSS_ARCHDIR', self.prefix.bin.arch) env.prepend_path('PATH', self.g_root)
env.set('GAUSS_BSDDIR', self.prefix.bin.bsd) env.prepend_path('PATH', self.g_bsd)
env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix.bin,
'linda8.2', 'opteron-linux', 'lib')) env.set('GAUSS_LEXEDIR', join_path(self.g_root, 'linda-exe'))
env.prepend_path('LD_LIBRARY_PATH', self.prefix.bin) 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)