python3Packages.torchmd-net: init at 3.0.3 (#530415)

This commit is contained in:
Nick Cao 2026-06-10 22:05:10 +00:00 committed by GitHub
commit 6329af54bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,96 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
setuptools-scm,
# dependencies
ase,
h5py,
lightning,
numpy,
torch,
torch-geometric,
tqdm,
warp-lang,
# tests
pytest-xdist,
pytestCheckHook,
writableTmpDirAsHomeHook,
llvmPackages,
}:
buildPythonPackage (finalAttrs: {
pname = "torchmd-net";
version = "3.0.3";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "torchmd";
repo = "torchmd-net";
tag = "v${finalAttrs.version}";
hash = "sha256-FBeeNkc7mJQYmMwlsW3Un+3RHvErJM7rWKUqSCYYUCM=";
};
build-system = [
setuptools
setuptools-scm
];
pythonRemoveDeps = [
# Not a runtime dependency
"setuptools"
];
dependencies = [
ase
h5py
lightning
numpy
torch
torch-geometric
tqdm
warp-lang
];
pythonImportsCheck = [ "torchmdnet" ];
nativeCheckInputs = [
pytest-xdist
pytestCheckHook
writableTmpDirAsHomeHook
];
checkInputs = lib.optionals stdenv.cc.isClang [
# torch._inductor.exc.InductorError: CppCompileError: C++ compile error
# fatal error: 'omp.h' file not found
llvmPackages.openmp
];
disabledTests = [
# Require internet access
"test_dataset_s66x8"
# Failed: torch.compile failed on TorchScripted tensornet model:
# torch.compile does not support compiling torch.jit.script or torch.jit.freeze models directly.
"test_torchscript_then_compile"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# torch._inductor.exc.InductorError: ImportError: ...
# symbol not found in flat namespace '___kmpc_barrier'
"test_ase_calculator"
"test_torch_export_then_compile"
];
meta = {
description = "Library to train state-of-the-art neural networks potentials (NNPs)";
homepage = "https://github.com/torchmd/torchmd-net";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
})

View file

@ -19948,6 +19948,8 @@ self: super: with self; {
torchlibrosa = callPackage ../development/python-modules/torchlibrosa { };
torchmd-net = callPackage ../development/python-modules/torchmd-net { };
torchmetrics = callPackage ../development/python-modules/torchmetrics { };
torchprofile = callPackage ../development/python-modules/torchprofile { };