summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2020-04-11 17:29:56 -0400
committerGitHub <noreply@github.com>2020-04-11 16:29:56 -0500
commita5f7cc887a2f9e5247d3fbf186ea1725c78fd928 (patch)
tree15e17be58d130bfe0adb1d5214d52253b77cedbd
parent91e22b8ae51968c8fa2956c535a0c2bae62809cd (diff)
downloadspack-a5f7cc887a2f9e5247d3fbf186ea1725c78fd928.tar.gz
spack-a5f7cc887a2f9e5247d3fbf186ea1725c78fd928.tar.bz2
spack-a5f7cc887a2f9e5247d3fbf186ea1725c78fd928.tar.xz
spack-a5f7cc887a2f9e5247d3fbf186ea1725c78fd928.zip
new package: openmm (#16002)
* new package: openmm * dependency adjustments * 1. modify dependencies 2. openmm dynamically compiles cuda kernels during runtime, attempt to set up an environment that will work. * Update var/spack/repos/builtin/packages/openmm/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/openmm/package.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openmm/package.py b/var/spack/repos/builtin/packages/openmm/package.py
new file mode 100644
index 0000000000..2867af4538
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmm/package.py
@@ -0,0 +1,48 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+import os
+
+
+class Openmm(CMakePackage, CudaPackage):
+ """A high performance toolkit for molecular simulation. Use it as
+ a library, or as an application. We include extensive language
+ bindings for Python, C, C++, and even Fortran. The code is open
+ source and actively maintained on Github, licensed under MIT and
+ LGPL. Part of the Omnia suite of tools for predictive biomolecular
+ simulation. """
+
+ homepage = "http://openmm.org/"
+ url = "https://github.com/openmm/openmm/archive/7.4.1.tar.gz"
+
+ version('7.4.1', sha256='e8102b68133e6dcf7fcf29bc76a11ea54f30af71d8a7705aec0aee957ebe3a6d')
+
+ install_targets = ['install', 'PythonInstall']
+
+ depends_on('python@2.7:', type=('build', 'run'))
+ depends_on('cmake@3.1:', type='build')
+ depends_on('doxygen', type='build')
+ depends_on('swig', type='build')
+ depends_on('fftw')
+ depends_on('py-cython', type='build')
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('cuda', when='+cuda', type=('build', 'link', 'run'))
+ extends('python')
+
+ def patch(self):
+ install_string = "set(PYTHON_SETUP_COMMAND \"install " \
+ "--prefix={0}\")".format(self.prefix)
+
+ filter_file(r'set\(PYTHON_SETUP_COMMAND \"install.*',
+ install_string,
+ 'wrappers/python/CMakeLists.txt')
+
+ def setup_run_environment(self, env):
+ spec = self.spec
+ if '+cuda' in spec:
+ env.set('OPENMM_CUDA_COMPILER',
+ self.spec['cuda'].prefix.bin.nvcc)
+ env.prepend_path('PATH',
+ os.path.dirname(self.compiler.cc))