lammps: Add support for a number of new LAMMPS add-on packages (#21494)

mliap
user-adios
user-awpmd
user-bocs
user-cgsdk
user-colvars
user-diffraction
user-dpd
user-drude
user-eff
user-fep
user-manifold
user-mesodpd
user-mesont
user-mgpt
user-mofff
user-phonon
user-plumed
user-ptm
user-qtb
user-reaction
user-sdpd
user-smd
user-smtbq
user-sph
user-tally
user-uef
user-yaff
This commit is contained in:
Tom Payerle 2021-02-04 16:29:49 -05:00 committed by GitHub
parent 4ec044817b
commit 935ad53649
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,11 +60,19 @@ def url_for_version(self, version):
supported_packages = ['asphere', 'body', 'class2', 'colloid', 'compress',
'coreshell', 'dipole', 'granular', 'kspace',
'kokkos', 'latte', 'manybody', 'mc', 'meam', 'misc',
'molecule', 'mpiio', 'peri', 'poems', 'python',
'qeq', 'replica', 'rigid', 'shock', 'snap', 'spin',
'srd', 'user-atc', 'user-h5md', 'user-lb',
'user-meamc', 'user-misc', 'user-netcdf', 'user-omp',
'user-reaxc', 'voronoi', 'opt']
'mliap', 'molecule', 'mpiio', 'opt', 'peri', 'poems',
'python', 'qeq', 'replica', 'rigid', 'shock', 'snap',
'spin', 'srd', 'user-atc', 'user-adios',
'user-awpmd', 'user-bocs', 'user-cgsdk',
'user-colvars', 'user-diffraction', 'user-dpd',
'user-drude', 'user-eff', 'user-fep', 'user-h5md',
'user-lb', 'user-manifold', 'user-meamc',
'user-mesodpd', 'user-mesont', 'user-mgpt',
'user-misc', 'user-mofff', 'user-netcdf', 'user-omp',
'user-phonon', 'user-plumed', 'user-ptm', 'user-qtb',
'user-reaction', 'user-reaxc', 'user-sdpd',
'user-smd', 'user-smtbq', 'user-sph', 'user-tally',
'user-uef', 'user-yaff', 'voronoi']
for pkg in supported_packages:
variant(pkg, default=False,
@ -110,6 +118,9 @@ def url_for_version(self, version):
depends_on('ffmpeg', when='+ffmpeg')
depends_on('kokkos+deprecated_code+shared@3.0', when='@20200303+kokkos')
depends_on('kokkos+shared@3.1:', when='@20200505:+kokkos')
depends_on('adios2', when='+user-adios')
depends_on('plumed', when='+user-plumed')
depends_on('eigen@3:', when='+user-smd')
conflicts('+cuda', when='+opencl')
conflicts('+body', when='+poems@:20180628')
@ -122,8 +133,22 @@ def url_for_version(self, version):
conflicts('+user-misc', when='~manybody')
conflicts('%gcc@9:', when='@:20200303+openmp')
conflicts('+kokkos', when='@:20200227')
conflicts('+meam', when='@20181212:')
conflicts('+user-meamc', when='@:20181212')
conflicts(
'+meam', when='@20181212:',
msg='+meam was removed after @20181212, use +user-meamc instead')
conflicts(
'+user-meamc', when='@:20181212',
msg='+user-meamc only added @20181212, use +meam instead')
conflicts(
'+user-reaction', when='@:20200303',
msg='+user-reaction only supported for version 20200505 and later')
conflicts('+mliap', when='~snap')
conflicts(
'+adios +mpi', when='^adios2~mpi',
msg='With +adios, mpi setting for adios2 and lammps must be the same')
conflicts(
'+adios ~mpi', when='^adios2+mpi',
msg='With +adios, mpi setting for adios2 and lammps must be the same')
patch("lib.patch", when="@20170901")
patch("660.patch", when="@20170922")
@ -193,6 +218,18 @@ def cmake_args(self):
args.append('-DFFTW_LIBRARY_DIRS={0}'.format(fftw_prefix.lib))
if '+kokkos' in spec:
args.append('-DEXTERNAL_KOKKOS=ON')
if '+user-adios' in spec:
args.append('-DADIOS2_DIR={0}'.format(self.spec['adios2'].prefix))
if '+user-plumed' in spec:
args.append('-DDOWNLOAD_PLUMED=no')
if '+shared' in self.spec['plumed']:
args.append('-DPLUMED_MODE=shared')
else:
args.append('-DPLUMED_MODE=static')
if '+user-smd' in spec:
args.append('-DDOWNLOAD_EIGEN3=no')
args.append('-DEIGEN3_INCLUDE_DIR={0}'.format(
self.spec['eigen'].prefix.include))
return args