tmscore: adding new package (#37644)

This commit is contained in:
snehring 2023-05-15 12:17:50 -05:00 committed by GitHub
parent 7b0979c1e9
commit 33dbd44449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,38 @@
# Copyright 2013-2023 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)
from spack.package import *
class Tmscore(Package):
"""TM-score is a metric for assessing the topological similarity of
protein structures."""
homepage = "https://zhanggroup.org/TM-score/"
url = "https://zhanggroup.org/TM-score/TMscore.cpp"
maintainers("snehring")
version(
"20220227",
sha256="30274251f4123601af102cf6d4f1a9cc496878c1ae776702f554e2fc25658d7f",
expand=False,
)
variant("fast-math", default=False)
phases = ["build", "install"]
def build(self, spec, prefix):
cxx = Executable(self.compiler.cxx)
args = ["-O3"]
if spec.satisfies("+fast-math"):
args.append("-ffast-math")
args.extend(["-lm", "-o", "TMscore", "TMscore.cpp"])
cxx(*args)
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("TMscore", prefix.bin)