summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-02-19 12:39:38 +0100
committeralalazo <massimiliano.culpo@googlemail.com>2016-02-19 12:39:38 +0100
commit30c304748213bee3669c75d4384bad146f68dbd7 (patch)
tree5fd46f0d139744b2154cace563449f152118cb5f /var
parent3c1aa9a4addc722423918593a227a8ca16c1c4e6 (diff)
downloadspack-30c304748213bee3669c75d4384bad146f68dbd7.tar.gz
spack-30c304748213bee3669c75d4384bad146f68dbd7.tar.bz2
spack-30c304748213bee3669c75d4384bad146f68dbd7.tar.xz
spack-30c304748213bee3669c75d4384bad146f68dbd7.zip
gromacs : added package
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fftw/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py56
2 files changed, 58 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
index 4d2b964242..bc129aaf1a 100644
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -47,6 +47,8 @@ class Fftw(Package):
depends_on('mpi', when='+mpi')
+ # TODO : add support for architecture specific optimizations as soon as targets are supported
+
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix,
'--enable-shared',
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
new file mode 100644
index 0000000000..5fe8399308
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -0,0 +1,56 @@
+from spack import *
+
+
+class Gromacs(Package):
+ """
+ GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primarily designed for
+ simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry
+ department of University of Groningen, and is now maintained by contributors in universities and research centers
+ across the world.
+
+ GROMACS is one of the fastest and most popular software packages available and can run on CPUs as well as GPUs.
+ It is free, open source released under the GNU General Public License. Starting from version 4.6, GROMACS is
+ released under the GNU Lesser General Public License.
+ """
+
+ homepage = 'http://www.gromacs.org'
+ url = 'ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.1.2.tar.gz'
+
+ version('5.1.2', '614d0be372f1a6f1f36382b7a6fcab98')
+
+ variant('mpi', default=True, description='Activate MPI support')
+ variant('shared', default=True, description='Enables the build of shared libraries')
+ variant('debug', default=False, description='Enables debug mode')
+ variant('double', default=False, description='Produces a double precision version of the executables')
+
+ depends_on('mpi', when='+mpi')
+
+ depends_on('fftw')
+
+ # TODO : add GPU support
+
+ def install(self, spec, prefix):
+
+ options = []
+
+ if '+mpi' in spec:
+ options.append('-DGMX_MPI:BOOL=ON')
+
+ if '+double' in spec:
+ options.append('-DGMX_DOUBLE:BOOL=ON')
+
+ if '~shared' in spec:
+ options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
+
+ if '+debug' in spec:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
+ else:
+ options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
+
+ options.extend(std_cmake_args)
+
+ with working_dir('spack-build', create=True):
+
+ cmake('..', *options)
+ make()
+ make('install')