GraphAtoms 1.1.3__tar.gz → 1.2.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.
Files changed (74) hide show
  1. {graphatoms-1.1.3 → graphatoms-1.2.0}/PKG-INFO +57 -9
  2. graphatoms-1.2.0/README.md +116 -0
  3. {graphatoms-1.1.3 → graphatoms-1.2.0}/pyproject.toml +23 -5
  4. graphatoms-1.2.0/src/graphatoms/arrayapi/__init__.py +11 -0
  5. graphatoms-1.2.0/src/graphatoms/arrayapi/compat.py +15 -0
  6. graphatoms-1.2.0/src/graphatoms/arrayapi/typing.py +10005 -0
  7. graphatoms-1.2.0/src/graphatoms/dataclasses/__init__.py +13 -0
  8. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/dataclasses/_pydanticMixin.py +3 -3
  9. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/dataclasses/_pydanticModel.py +4 -2
  10. graphatoms-1.2.0/src/graphatoms/dataclasses/graph.py +64 -0
  11. graphatoms-1.2.0/src/graphatoms/geometry/__init__.py +11 -0
  12. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/_bond_list.py +4 -4
  13. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/_inner_outer.py +4 -2
  14. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/_neighbor_list.py +1 -1
  15. graphatoms-1.2.0/src/graphatoms/geometry/mic.py +213 -0
  16. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/reaction/__init__.py +2 -2
  17. graphatoms-1.2.0/src/graphatoms/reaction/base/__init__.py +9 -0
  18. {graphatoms-1.1.3/src/graphatoms/reaction/_abc → graphatoms-1.2.0/src/graphatoms/reaction/base}/rtgp.py +5 -6
  19. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.2.0/src/graphatoms/reaction/database}/sqliteASE.py +1 -0
  20. graphatoms-1.2.0/src/graphatoms/reaction/event/__init__.py +12 -0
  21. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.2.0/src/graphatoms/reaction/event}/_event.py +2 -3
  22. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.2.0/src/graphatoms/reaction/event}/adsorption.py +3 -2
  23. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.2.0/src/graphatoms/reaction/event}/desorption.py +3 -2
  24. {graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent → graphatoms-1.2.0/src/graphatoms/reaction/event}/reaction.py +3 -2
  25. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/__init__.py +1 -1
  26. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_base.py +10 -3
  27. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_moveFB.py +5 -4
  28. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_moveSP.py +5 -4
  29. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_moveSwap.py +4 -4
  30. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_simNVT.py +7 -7
  31. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/zzz.py +1 -1
  32. {graphatoms-1.1.3/src/graphatoms/reaction/_mdwarpper → graphatoms-1.2.0/src/graphatoms/reaction/mdwarpper}/__init__.py +3 -2
  33. {graphatoms-1.1.3/src/graphatoms/reaction/_network → graphatoms-1.2.0/src/graphatoms/reaction/network}/_base.py +2 -3
  34. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/system/__init__.py +6 -4
  35. graphatoms-1.1.3/src/graphatoms/system/_atoms/_eng.py → graphatoms-1.2.0/src/graphatoms/system/atoms.py +237 -6
  36. graphatoms-1.1.3/src/graphatoms/system/_graph/_bonds.py → graphatoms-1.2.0/src/graphatoms/system/bonds.py +42 -11
  37. graphatoms-1.1.3/src/graphatoms/system/_graph/_sysGraph.py → graphatoms-1.2.0/src/graphatoms/system/graph.py +136 -26
  38. graphatoms-1.2.0/src/graphatoms/system/sysCluster.py +180 -0
  39. graphatoms-1.1.3/src/graphatoms/system/_sys/_sysGas.py → graphatoms-1.2.0/src/graphatoms/system/sysGas.py +71 -15
  40. graphatoms-1.2.0/src/graphatoms/system/system.py +83 -0
  41. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/utils/rdutils.py +10 -9
  42. graphatoms-1.2.0/src/graphatoms/utils/subgraph.py +193 -0
  43. graphatoms-1.1.3/README.md +0 -72
  44. graphatoms-1.1.3/src/graphatoms/dataclasses/__init__.py +0 -13
  45. graphatoms-1.1.3/src/graphatoms/geometry/__init__.py +0 -11
  46. graphatoms-1.1.3/src/graphatoms/reaction/_abc/__init__.py +0 -9
  47. graphatoms-1.1.3/src/graphatoms/reaction/_kmcevent/__init__.py +0 -12
  48. graphatoms-1.1.3/src/graphatoms/system/_atoms/__init__.py +0 -7
  49. graphatoms-1.1.3/src/graphatoms/system/_atoms/_box.py +0 -85
  50. graphatoms-1.1.3/src/graphatoms/system/_atoms/_struct.py +0 -167
  51. graphatoms-1.1.3/src/graphatoms/system/_graph/__init__.py +0 -11
  52. graphatoms-1.1.3/src/graphatoms/system/_graph/_gasMixin.py +0 -45
  53. graphatoms-1.1.3/src/graphatoms/system/_sys/__init__.py +0 -4
  54. graphatoms-1.1.3/src/graphatoms/system/_sys/_sysCluster.py +0 -124
  55. graphatoms-1.1.3/src/graphatoms/system/helper.py +0 -104
  56. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/LICENSE +0 -0
  57. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/__init__.py +0 -0
  58. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/dataclasses/_numpydantic.py +0 -0
  59. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/dataclasses/_pydantic2pyarrow.py +0 -0
  60. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/_distance_pairs.py +0 -0
  61. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/rotation.py +0 -0
  62. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/geometry/sample.py +0 -0
  63. {graphatoms-1.1.3/src/graphatoms/reaction/_abc → graphatoms-1.2.0/src/graphatoms/reaction/base}/move.py +0 -0
  64. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.2.0/src/graphatoms/reaction/database}/__init__.py +0 -0
  65. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.2.0/src/graphatoms/reaction/database}/base.py +0 -0
  66. {graphatoms-1.1.3/src/graphatoms/system/_database → graphatoms-1.2.0/src/graphatoms/reaction/database}/hdf5.py +0 -0
  67. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/_abc.py +0 -0
  68. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/test_mmc.py +0 -0
  69. {graphatoms-1.1.3/src/graphatoms/reaction/_mcmove → graphatoms-1.2.0/src/graphatoms/reaction/mcmove}/test_move.py +0 -0
  70. {graphatoms-1.1.3/src/graphatoms/reaction/_network → graphatoms-1.2.0/src/graphatoms/reaction/network}/__init__.py +0 -0
  71. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/utils/__init__.py +0 -0
  72. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/utils/bytestool.py +0 -0
  73. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/utils/logger.py +0 -0
  74. {graphatoms-1.1.3 → graphatoms-1.2.0}/src/graphatoms/utils/parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphatoms
3
- Version: 1.1.3
3
+ Version: 1.2.0
4
4
  Summary: The Chemical Core Class for Graph Theory Analysis.
5
5
  Keywords: chemistry,graph theory,reaction,event,KMC
6
6
  Author: LiuGaoyong
@@ -14,12 +14,16 @@ Requires-Dist: ase
14
14
  Requires-Dist: pymatgen>2023.6
15
15
  Requires-Dist: rdkit>=2025
16
16
  Requires-Dist: scikit-learn>=1.5
17
+ Requires-Dist: array-api-compat>=1.10
18
+ Requires-Dist: array-api-extra>=0.10
17
19
  Requires-Dist: pyarrow
18
20
  Requires-Dist: igraph>=0.11
19
21
  Requires-Dist: h5py>=3.16
20
22
  Requires-Dist: hydra-core
23
+ Requires-Dist: numpy>=2.0.0,<3
21
24
  Requires-Dist: numpydantic
22
- Requires-Dist: pydantic>=2.11
25
+ Requires-Dist: ovld
26
+ Requires-Dist: pydantic>=2.10
23
27
  Requires-Dist: python-snappy>=0.7.3
24
28
  Requires-Dist: tomli ; python_full_version < '3.11'
25
29
  Requires-Dist: tomli-w
@@ -35,45 +39,62 @@ Description-Content-Type: text/markdown
35
39
 
36
40
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Pypi version](https://img.shields.io/pypi/v/graphatoms)](https://pypi.org/project/graphatoms/) [![PyPI Downloads](https://static.pepy.tech/badge/graphatoms)](https://pepy.tech/projects/graphatoms)
37
41
 
38
-
39
- The Chemical Core Class for Graph Theory Analysis & Graph Neural Network.
42
+ The Chemical Core Class for Graph Theory Analysis.
40
43
 
41
44
  ## Overview
42
45
 
43
- The `graphatoms` is a Python library designed for chemical graph theory analysis and graph neural network applications. It provides core classes for representing chemical systems and reactions with graph-based data structures.
46
+ The `graphatoms` is a Python library designed for chemical graph theory analysis. It provides core classes for representing chemical systems and reactions with graph-based data structures.
44
47
 
45
48
  ## Features
46
49
 
47
50
  - **Graph-based Chemical System Representation**: Represent chemical systems, clusters, and gas molecules using graph theory
48
51
  - **Reaction Modeling**: Support for reaction classes, KMC (Kinetic Monte Carlo) events, and MC (Monte Carlo) moves
49
- - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, and sampling
52
+ - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, MIC (Minimum Image Convention), and sampling
50
53
  - **Data Storage**: Support for HDF5 and SQLite databases for efficient data persistence
51
54
  - **Dataclasses**: Pydantic-based data models for type-safe data handling
55
+ - **Array API Compatibility**: Full support for array API standard for cross-framework compatibility (NumPy, PyTorch, JAX, CuPy, etc.)
56
+ - **Subgraph Operations**: Backend-agnostic subgraph extraction with relabeling support using array-api-compat and array-api-extra
52
57
 
53
58
  ## Module Structure
54
59
 
55
60
  ```
56
61
  src/graphatoms/
62
+ ├── arrayapi/ # Array API compatibility layer
57
63
  ├── dataclasses/ # Pydantic-based data models
58
64
  ├── geometry/ # Geometric operations
59
65
  ├── reaction/ # Reaction classes and KMC events
60
- ├── system/ # Core system classes (System, Cluster, Gas)
66
+ │ ├── base/ # Abstract base classes
67
+ │ ├── event/ # KMC events (adsorption, desorption, reaction)
68
+ │ ├── mcmove/ # Monte Carlo moves
69
+ │ ├── mdwarpper/ # MD wrapper
70
+ │ └── network/ # Reaction network
71
+ ├── system/ # Core system classes
72
+ │ ├── atoms/ # Atomic structure handling
73
+ │ ├── database/ # Database storage backends
74
+ │ └── graph/ # Graph-based system representation
61
75
  └── utils/ # Utility functions
76
+ └── subgraph.py # Array API compatible subgraph operations
62
77
  ```
63
78
 
64
79
  ## Requirements
65
80
 
66
- - Python >= 3.10
81
+ - Python >= 3.12
67
82
  - ase
68
83
  - pymatgen > 2023.6
69
84
  - rdkit >= 2025
70
85
  - scikit-learn >= 1.5
86
+ - array-api-compat >= 1.15.0
87
+ - array-api-extra >= 0.11.0
71
88
  - pyarrow
72
89
  - igraph >= 0.11
73
90
  - h5py >= 3.16
74
91
  - hydra-core
92
+ - numpy >= 2.0.0
75
93
  - numpydantic
76
- - pydantic >= 2.11
94
+ - ovld
95
+ - pydantic >= 2.10
96
+ - python-snappy >= 0.7.3
97
+ - loguru
77
98
 
78
99
  ## Installation
79
100
 
@@ -81,6 +102,12 @@ src/graphatoms/
81
102
  pip install graphatoms
82
103
  ```
83
104
 
105
+ Or with conda:
106
+
107
+ ```bash
108
+ conda install -c conda-forge graphatoms
109
+ ```
110
+
84
111
  ## Development
85
112
 
86
113
  For development setup with pixi:
@@ -90,6 +117,27 @@ pixi install
90
117
  pixi run test
91
118
  ```
92
119
 
120
+ ## Running Tests
121
+
122
+ # Run all tests
123
+
124
+ pytest src/tests/ -v
125
+
126
+ # Run benchmark tests
127
+
128
+ pytest src/tests-benchmark/ -v
129
+
130
+ ## Array API Compatibility
131
+
132
+ The library leverages `array-api-compat` and `array-api-extra` for backend-agnostic array operations. Key utilities include:
133
+
134
+ - `subgraph()`: Extracts induced subgraphs from edge indices
135
+ - `map_index()`: Maps indices across arrays
136
+ - `index_to_mask()`: Converts index arrays to boolean masks
137
+ - `maybe_num_nodes()`: Determines the number of nodes from edge indices
138
+
139
+ These functions work seamlessly with NumPy, PyTorch, JAX, and other array API compliant libraries.
140
+
93
141
  ## License
94
142
 
95
143
  GPL-3.0-or-later
@@ -0,0 +1,116 @@
1
+ # graphatoms
2
+
3
+ [![Conda Version](https://img.shields.io/conda/vn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/graphatoms.svg)](https://anaconda.org/conda-forge/graphatoms) [![Pypi version](https://img.shields.io/pypi/v/graphatoms)](https://pypi.org/project/graphatoms/) [![PyPI Downloads](https://static.pepy.tech/badge/graphatoms)](https://pepy.tech/projects/graphatoms)
4
+
5
+ The Chemical Core Class for Graph Theory Analysis.
6
+
7
+ ## Overview
8
+
9
+ The `graphatoms` is a Python library designed for chemical graph theory analysis. It provides core classes for representing chemical systems and reactions with graph-based data structures.
10
+
11
+ ## Features
12
+
13
+ - **Graph-based Chemical System Representation**: Represent chemical systems, clusters, and gas molecules using graph theory
14
+ - **Reaction Modeling**: Support for reaction classes, KMC (Kinetic Monte Carlo) events, and MC (Monte Carlo) moves
15
+ - **Geometry Operations**: Bond lists, distance calculations, neighbor lists, rotations, MIC (Minimum Image Convention), and sampling
16
+ - **Data Storage**: Support for HDF5 and SQLite databases for efficient data persistence
17
+ - **Dataclasses**: Pydantic-based data models for type-safe data handling
18
+ - **Array API Compatibility**: Full support for array API standard for cross-framework compatibility (NumPy, PyTorch, JAX, CuPy, etc.)
19
+ - **Subgraph Operations**: Backend-agnostic subgraph extraction with relabeling support using array-api-compat and array-api-extra
20
+
21
+ ## Module Structure
22
+
23
+ ```
24
+ src/graphatoms/
25
+ ├── arrayapi/ # Array API compatibility layer
26
+ ├── dataclasses/ # Pydantic-based data models
27
+ ├── geometry/ # Geometric operations
28
+ ├── reaction/ # Reaction classes and KMC events
29
+ │ ├── base/ # Abstract base classes
30
+ │ ├── event/ # KMC events (adsorption, desorption, reaction)
31
+ │ ├── mcmove/ # Monte Carlo moves
32
+ │ ├── mdwarpper/ # MD wrapper
33
+ │ └── network/ # Reaction network
34
+ ├── system/ # Core system classes
35
+ │ ├── atoms/ # Atomic structure handling
36
+ │ ├── database/ # Database storage backends
37
+ │ └── graph/ # Graph-based system representation
38
+ └── utils/ # Utility functions
39
+ └── subgraph.py # Array API compatible subgraph operations
40
+ ```
41
+
42
+ ## Requirements
43
+
44
+ - Python >= 3.12
45
+ - ase
46
+ - pymatgen > 2023.6
47
+ - rdkit >= 2025
48
+ - scikit-learn >= 1.5
49
+ - array-api-compat >= 1.15.0
50
+ - array-api-extra >= 0.11.0
51
+ - pyarrow
52
+ - igraph >= 0.11
53
+ - h5py >= 3.16
54
+ - hydra-core
55
+ - numpy >= 2.0.0
56
+ - numpydantic
57
+ - ovld
58
+ - pydantic >= 2.10
59
+ - python-snappy >= 0.7.3
60
+ - loguru
61
+
62
+ ## Installation
63
+
64
+ ```bash
65
+ pip install graphatoms
66
+ ```
67
+
68
+ Or with conda:
69
+
70
+ ```bash
71
+ conda install -c conda-forge graphatoms
72
+ ```
73
+
74
+ ## Development
75
+
76
+ For development setup with pixi:
77
+
78
+ ```bash
79
+ pixi install
80
+ pixi run test
81
+ ```
82
+
83
+ ## Running Tests
84
+
85
+ # Run all tests
86
+
87
+ pytest src/tests/ -v
88
+
89
+ # Run benchmark tests
90
+
91
+ pytest src/tests-benchmark/ -v
92
+
93
+ ## Array API Compatibility
94
+
95
+ The library leverages `array-api-compat` and `array-api-extra` for backend-agnostic array operations. Key utilities include:
96
+
97
+ - `subgraph()`: Extracts induced subgraphs from edge indices
98
+ - `map_index()`: Maps indices across arrays
99
+ - `index_to_mask()`: Converts index arrays to boolean masks
100
+ - `maybe_num_nodes()`: Determines the number of nodes from edge indices
101
+
102
+ These functions work seamlessly with NumPy, PyTorch, JAX, and other array API compliant libraries.
103
+
104
+ ## License
105
+
106
+ GPL-3.0-or-later
107
+
108
+ ## Authors
109
+
110
+ - LiuGaoyong (liugaoyong_88@163.com)
111
+
112
+ ## Links
113
+
114
+ - Homepage: https://github.com/LiuGaoyong/GraphAtoms
115
+ - Repository: https://github.com/LiuGaoyong/GraphAtoms
116
+ - Issues: https://github.com/LiuGaoyong/GraphAtoms/issues/
@@ -9,7 +9,7 @@ Issues = "https://github.com/LiuGaoyong/GraphAtoms/issues/"
9
9
 
10
10
  [project]
11
11
  name = "graphatoms"
12
- version = "1.1.3"
12
+ version = "1.2.0"
13
13
  readme = "README.md"
14
14
  description = "The Chemical Core Class for Graph Theory Analysis."
15
15
  authors = [{ name = "LiuGaoyong", email = "liugaoyong_88@163.com" }]
@@ -37,6 +37,8 @@ dependencies = [
37
37
  # Scientific Computing
38
38
  # numpy pandas, scipy
39
39
  "scikit-learn>=1.5",
40
+ "array-api-compat>=1.10",
41
+ "array_api-extra>=0.10",
40
42
  "pyarrow",
41
43
 
42
44
  # Graph Theory
@@ -45,8 +47,10 @@ dependencies = [
45
47
  # Data Model
46
48
  "h5py>=3.16",
47
49
  "hydra-core",
50
+ "numpy>=2.0.0,<3",
48
51
  "numpydantic",
49
- "pydantic>=2.11",
52
+ "ovld", # singledispatch which works for multiple arguments.
53
+ "pydantic>=2.10",
50
54
  "python-snappy>=0.7.3", # More Fase Data Compression
51
55
  "tomli; python_version < '3.11'", # use tomllib in python>=3.11
52
56
  "tomli-w", # TOML writer
@@ -56,6 +60,7 @@ dependencies = [
56
60
  [dependency-groups]
57
61
  dev = [
58
62
  "ruff>=0.11",
63
+ "array-api-strict",
59
64
  "pytest>=8.3",
60
65
  "pytest-xdist",
61
66
  "jupyter",
@@ -84,6 +89,7 @@ filterwarnings = [
84
89
  # ignore the following warnings that matching a regex
85
90
  # example: 'ignore:function ham\(\) is deprecated:DeprecationWarning',
86
91
  "ignore::RuntimeWarning",
92
+ "ignore::DeprecationWarning",
87
93
 
88
94
  ]
89
95
  addopts = '--maxfail=1 -rf' # exit after 1 failures, report fail info
@@ -93,7 +99,9 @@ testpaths = ['src/tests']
93
99
  [tool.ruff]
94
100
  line-length = 80
95
101
  indent-width = 4
96
- select = ["F", "E", "W", "UP", "D"]
102
+ unsafe-fixes = true
103
+ [tool.ruff.lint]
104
+ select = ["F", "E", "W", "UP", "TID"]
97
105
  ignore = ["F722", "D100"]
98
106
  [tool.ruff.lint.pydocstyle]
99
107
  convention = "google"
@@ -106,7 +114,7 @@ backend = { name = "pixi-build-python", version = "*" }
106
114
  [tool.pixi.workspace]
107
115
  preview = ["pixi-build"]
108
116
  channels = ["conda-forge"]
109
- platforms = ["win-64", "linux-64", "osx-arm64"]
117
+ platforms = ["linux-64", "osx-arm64"]
110
118
 
111
119
  [tool.pixi.pypi-dependencies]
112
120
  graphatoms = { path = ".", editable = true }
@@ -117,11 +125,14 @@ dev = { features = ["dev"], solve-group = "default" }
117
125
 
118
126
  [tool.pixi.tasks]
119
127
  test = "pytest -s -vv"
120
- benchmark = 'pytest -s src/benchmark/*.py'
128
+ benchmark = 'pytest -s src/tests-benchmark/*.py'
121
129
 
122
130
  [tool.pixi.dependencies]
123
131
  python = ">=3.12"
124
132
  pytest = ">=9.0.3,<10"
133
+ array-api-compat = ">=1.15.0,<2"
134
+ array-api-extra = ">=0.11.0,<0.12"
135
+ array-api-strict = ">=2.5,<3"
125
136
  ase = ">=3.28.0,<4"
126
137
  pymatgen = ">=2026.5.4,<2027"
127
138
  rdkit = ">=2025.9.5,<2027"
@@ -129,9 +140,16 @@ openbabel = ">=3.1.1,<4"
129
140
  pyarrow = ">=21.0.0,<25"
130
141
  scikit-learn = ">=1.8.0,<2"
131
142
  python-igraph = ">=0.11.9,<0.12"
143
+ numpy = ">=2.0.0,<3"
144
+ pydantic = ">=2.10.0,<3"
132
145
  numpydantic = ">=1.8.1,<2"
133
146
  python-snappy = ">=0.7.3,<0.8"
134
147
  h5py = ">=3.16.0,<4"
135
148
  hydra-core = ">=1.3.2,<2"
136
149
  tomli-w = ">=1.2.0,<2"
137
150
  loguru = ">=0.7.3,<0.8"
151
+ pytorch = ">=2.10.0,<3"
152
+ jax = ">=0.9.0,<0.10"
153
+ jupyterlab = ">=4.5.8,<5"
154
+ ovld = ">=0.5.15,<0.6"
155
+ pytest-xdist = ">=3.8.0,<4"
@@ -0,0 +1,11 @@
1
+ """The array api wrapper of this packages."""
2
+
3
+ from graphatoms.arrayapi.compat import get_namespace
4
+ from graphatoms.arrayapi.typing import Array, ArrayNamespace, LinalgNamespace
5
+
6
+ __all__ = [
7
+ "get_namespace",
8
+ "ArrayNamespace",
9
+ "LinalgNamespace",
10
+ "Array",
11
+ ]
@@ -0,0 +1,15 @@
1
+ from array_api_compat import array_namespace
2
+ from array_api_compat.common._typing import Namespace
3
+
4
+ from graphatoms.arrayapi.typing import Array, ArrayNamespace
5
+
6
+
7
+ def get_namespace(
8
+ *xs: Array | complex | None,
9
+ use_compat: bool | None = None,
10
+ ) -> ArrayNamespace | Namespace:
11
+ return array_namespace(
12
+ *xs, # type: ignore[reportOptionalMemberAccess]
13
+ use_compat=use_compat,
14
+ # api_version="2024.12",
15
+ ) # type: ignore[reportOptionalMemberAccess]