featomic-torch 0.6.1__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {featomic_torch-0.6.1/featomic_torch.egg-info → featomic_torch-0.7.0}/PKG-INFO +7 -6
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/build-backend/backend.py +4 -3
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/_c_lib.py +4 -2
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/calculator_base.py +1 -3
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/system.py +5 -23
- featomic_torch-0.7.0/featomic-torch-cxx-0.7.0.tar.gz +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0/featomic_torch.egg-info}/PKG-INFO +7 -6
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic_torch.egg-info/SOURCES.txt +1 -1
- featomic_torch-0.7.0/featomic_torch.egg-info/requires.txt +4 -0
- featomic_torch-0.7.0/git_version_info +2 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/pyproject.toml +2 -3
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/setup.py +5 -2
- featomic_torch-0.6.1/featomic-torch-cxx-0.6.1.tar.gz +0 -0
- featomic_torch-0.6.1/featomic_torch.egg-info/requires.txt +0 -3
- featomic_torch-0.6.1/git_version_info +0 -2
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/AUTHORS +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/LICENSE +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/MANIFEST.in +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/README.rst +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/__init__.py +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/calculators.py +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/clebsch_gordan.py +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic/torch/utils.py +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic_torch.egg-info/dependency_links.txt +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic_torch.egg-info/not-zip-safe +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/featomic_torch.egg-info/top_level.txt +0 -0
- {featomic_torch-0.6.1 → featomic_torch-0.7.0}/setup.cfg +0 -0
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: featomic-torch
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: TorchScript bindings to featomic
|
|
5
5
|
Author: Guillaume Fraux, Philip Loche, Sergei Kliavinek, Kevin Kazuki Huguenin-Dumittan, Davide Tisi, Alexander Goscinski
|
|
6
|
-
License: BSD-3-Clause
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
7
|
Project-URL: homepage, https://metatensor.github.io/featomic/latest/
|
|
8
8
|
Project-URL: documentation, https://metatensor.github.io/featomic/latest/
|
|
9
9
|
Project-URL: repository, https://github.com/metatensor/featomic
|
|
10
10
|
Keywords: computational science,machine learning,molecular modeling,atomistic representations,torch
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
14
13
|
Classifier: Operating System :: POSIX
|
|
15
14
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
16
15
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -26,10 +25,12 @@ Requires-Python: >=3.9
|
|
|
26
25
|
Description-Content-Type: text/x-rst
|
|
27
26
|
License-File: LICENSE
|
|
28
27
|
License-File: AUTHORS
|
|
29
|
-
Requires-Dist: torch>=1
|
|
30
|
-
Requires-Dist: metatensor-torch<0.8
|
|
28
|
+
Requires-Dist: torch>=2.1
|
|
29
|
+
Requires-Dist: metatensor-torch<0.8,>=0.7.6
|
|
30
|
+
Requires-Dist: metatomic-torch<0.2,>=0.1.1
|
|
31
31
|
Requires-Dist: featomic<0.7.0,>=0.6.0
|
|
32
32
|
Dynamic: author
|
|
33
|
+
Dynamic: license-file
|
|
33
34
|
Dynamic: requires-dist
|
|
34
35
|
|
|
35
36
|
featomic-torch
|
|
@@ -22,13 +22,13 @@ elif not FEATOMIC_NO_LOCAL_DEPS and os.path.exists(FEATOMIC_SRC):
|
|
|
22
22
|
FEATOMIC_DEP = f"featomic @ file://{FEATOMIC_SRC}"
|
|
23
23
|
else:
|
|
24
24
|
# we are building from a sdist
|
|
25
|
-
FEATOMIC_DEP = "featomic >=0.6.0,<0.7
|
|
25
|
+
FEATOMIC_DEP = "featomic >=0.6.0,<0.7"
|
|
26
26
|
|
|
27
27
|
FORCED_TORCH_VERSION = os.environ.get("FEATOMIC_TORCH_BUILD_WITH_TORCH_VERSION")
|
|
28
28
|
if FORCED_TORCH_VERSION is not None:
|
|
29
29
|
TORCH_DEP = f"torch =={FORCED_TORCH_VERSION}"
|
|
30
30
|
else:
|
|
31
|
-
TORCH_DEP = "torch >=1
|
|
31
|
+
TORCH_DEP = "torch >=2.1"
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
get_requires_for_build_sdist = build_meta.get_requires_for_build_sdist
|
|
@@ -42,6 +42,7 @@ def get_requires_for_build_wheel(config_settings=None):
|
|
|
42
42
|
return defaults + [
|
|
43
43
|
"cmake",
|
|
44
44
|
TORCH_DEP,
|
|
45
|
-
"metatensor-torch >=0.7.
|
|
45
|
+
"metatensor-torch >=0.7.6,<0.8",
|
|
46
|
+
"metatomic-torch >=0.1.1,<0.2",
|
|
46
47
|
FEATOMIC_DEP,
|
|
47
48
|
]
|
|
@@ -5,6 +5,7 @@ import sys
|
|
|
5
5
|
from collections import namedtuple
|
|
6
6
|
|
|
7
7
|
import metatensor.torch
|
|
8
|
+
import metatomic.torch
|
|
8
9
|
import torch
|
|
9
10
|
|
|
10
11
|
import featomic
|
|
@@ -128,9 +129,10 @@ def _check_dll(path):
|
|
|
128
129
|
|
|
129
130
|
|
|
130
131
|
def _load_library():
|
|
131
|
-
# Load
|
|
132
|
-
#
|
|
132
|
+
# Load shared library for dependencies in the process first, to ensure the
|
|
133
|
+
# featomic_torch shared library can find them
|
|
133
134
|
metatensor.torch._c_lib._load_library()
|
|
135
|
+
metatomic.torch._c_lib._load_library()
|
|
134
136
|
|
|
135
137
|
featomic._c_lib._get_library()
|
|
136
138
|
|
|
@@ -2,9 +2,7 @@ from typing import List, Optional, Union
|
|
|
2
2
|
|
|
3
3
|
import torch
|
|
4
4
|
from metatensor.torch import Labels, TensorMap
|
|
5
|
-
from
|
|
6
|
-
|
|
7
|
-
from .system import System
|
|
5
|
+
from metatomic.torch import NeighborListOptions, System
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
CalculatorHolder = torch.classes.featomic.CalculatorHolder
|
|
@@ -2,7 +2,7 @@ from typing import List, Optional, Sequence, overload
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import torch
|
|
5
|
-
from
|
|
5
|
+
from metatomic.torch import System
|
|
6
6
|
|
|
7
7
|
import featomic
|
|
8
8
|
|
|
@@ -31,9 +31,9 @@ def systems_to_torch(
|
|
|
31
31
|
cell_requires_grad=None,
|
|
32
32
|
) -> List[System]:
|
|
33
33
|
"""
|
|
34
|
-
Convert a arbitrary system to
|
|
35
|
-
:py:class:`
|
|
36
|
-
|
|
34
|
+
Convert a arbitrary system to :py:class:`metatomic.torch.System`, putting all the
|
|
35
|
+
data in :py:class:`torch.Tensor` and making the overall object compatible with
|
|
36
|
+
TorchScript.
|
|
37
37
|
|
|
38
38
|
:param system: any system supported by featomic. If this is an iterable of system,
|
|
39
39
|
this function converts them all and returns a list of converted systems.
|
|
@@ -85,22 +85,4 @@ def _is_torch_system(system):
|
|
|
85
85
|
if not isinstance(system, torch.ScriptObject):
|
|
86
86
|
return False
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
if torch_version_tuple >= (2, 1):
|
|
90
|
-
return system._type().name() == "System"
|
|
91
|
-
|
|
92
|
-
# For older torch version, we check that we have the right properties
|
|
93
|
-
properties = system._properties()
|
|
94
|
-
if len(properties) != 3:
|
|
95
|
-
return False
|
|
96
|
-
|
|
97
|
-
if properties[0].name != "species":
|
|
98
|
-
return False
|
|
99
|
-
|
|
100
|
-
if properties[1].name != "positions":
|
|
101
|
-
return False
|
|
102
|
-
|
|
103
|
-
if properties[2].name != "cell":
|
|
104
|
-
return False
|
|
105
|
-
|
|
106
|
-
return True
|
|
88
|
+
return system._type().name() == "System"
|
|
Binary file
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: featomic-torch
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: TorchScript bindings to featomic
|
|
5
5
|
Author: Guillaume Fraux, Philip Loche, Sergei Kliavinek, Kevin Kazuki Huguenin-Dumittan, Davide Tisi, Alexander Goscinski
|
|
6
|
-
License: BSD-3-Clause
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
7
|
Project-URL: homepage, https://metatensor.github.io/featomic/latest/
|
|
8
8
|
Project-URL: documentation, https://metatensor.github.io/featomic/latest/
|
|
9
9
|
Project-URL: repository, https://github.com/metatensor/featomic
|
|
10
10
|
Keywords: computational science,machine learning,molecular modeling,atomistic representations,torch
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
14
13
|
Classifier: Operating System :: POSIX
|
|
15
14
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
16
15
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -26,10 +25,12 @@ Requires-Python: >=3.9
|
|
|
26
25
|
Description-Content-Type: text/x-rst
|
|
27
26
|
License-File: LICENSE
|
|
28
27
|
License-File: AUTHORS
|
|
29
|
-
Requires-Dist: torch>=1
|
|
30
|
-
Requires-Dist: metatensor-torch<0.8
|
|
28
|
+
Requires-Dist: torch>=2.1
|
|
29
|
+
Requires-Dist: metatensor-torch<0.8,>=0.7.6
|
|
30
|
+
Requires-Dist: metatomic-torch<0.2,>=0.1.1
|
|
31
31
|
Requires-Dist: featomic<0.7.0,>=0.6.0
|
|
32
32
|
Dynamic: author
|
|
33
|
+
Dynamic: license-file
|
|
33
34
|
Dynamic: requires-dist
|
|
34
35
|
|
|
35
36
|
featomic-torch
|
|
@@ -4,14 +4,13 @@ dynamic = ["version", "authors", "dependencies"]
|
|
|
4
4
|
requires-python = ">=3.9"
|
|
5
5
|
|
|
6
6
|
readme = "README.rst"
|
|
7
|
-
license =
|
|
7
|
+
license = "BSD-3-Clause"
|
|
8
8
|
description = "TorchScript bindings to featomic"
|
|
9
9
|
|
|
10
10
|
keywords = ["computational science", "machine learning", "molecular modeling", "atomistic representations", "torch"]
|
|
11
11
|
classifiers = [
|
|
12
12
|
"Development Status :: 4 - Beta",
|
|
13
13
|
"Intended Audience :: Science/Research",
|
|
14
|
-
"License :: OSI Approved :: BSD License",
|
|
15
14
|
"Operating System :: POSIX",
|
|
16
15
|
"Operating System :: MacOS :: MacOS X",
|
|
17
16
|
"Operating System :: Microsoft :: Windows",
|
|
@@ -34,7 +33,7 @@ repository = "https://github.com/metatensor/featomic"
|
|
|
34
33
|
### ======================================================================== ###
|
|
35
34
|
[build-system]
|
|
36
35
|
requires = [
|
|
37
|
-
"setuptools",
|
|
36
|
+
"setuptools >=77",
|
|
38
37
|
"wheel",
|
|
39
38
|
"packaging",
|
|
40
39
|
]
|
|
@@ -36,6 +36,7 @@ class cmake_ext(build_ext):
|
|
|
36
36
|
def run(self):
|
|
37
37
|
import metatensor
|
|
38
38
|
import metatensor.torch
|
|
39
|
+
import metatomic.torch
|
|
39
40
|
import torch
|
|
40
41
|
|
|
41
42
|
import featomic
|
|
@@ -51,6 +52,7 @@ class cmake_ext(build_ext):
|
|
|
51
52
|
featomic.utils.cmake_prefix_path,
|
|
52
53
|
metatensor.utils.cmake_prefix_path,
|
|
53
54
|
metatensor.torch.utils.cmake_prefix_path,
|
|
55
|
+
metatomic.torch.utils.cmake_prefix_path,
|
|
54
56
|
torch.utils.cmake_prefix_path,
|
|
55
57
|
]
|
|
56
58
|
|
|
@@ -340,11 +342,12 @@ if __name__ == "__main__":
|
|
|
340
342
|
torch_version = f"== {torch_v_major}.{torch_v_minor}.*"
|
|
341
343
|
except ImportError:
|
|
342
344
|
# otherwise we are building a sdist
|
|
343
|
-
torch_version = ">= 1
|
|
345
|
+
torch_version = ">= 2.1"
|
|
344
346
|
|
|
345
347
|
install_requires = [
|
|
346
348
|
f"torch {torch_version}",
|
|
347
|
-
"metatensor-torch >=0.7.
|
|
349
|
+
"metatensor-torch >=0.7.6,<0.8",
|
|
350
|
+
"metatomic-torch >=0.1.1,<0.2",
|
|
348
351
|
]
|
|
349
352
|
|
|
350
353
|
# when packaging a sdist for release, we should never use local dependencies
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|