GraphAtoms 1.2.0__tar.gz → 1.2.1__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.
- {graphatoms-1.2.0 → graphatoms-1.2.1}/PKG-INFO +1 -1
- graphatoms-1.2.1/pyproject.toml +156 -0
- graphatoms-1.2.0/pyproject.toml → graphatoms-1.2.1/pyproject.toml.orig +3 -3
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/bonds.py +5 -3
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/graph.py +6 -1
- {graphatoms-1.2.0 → graphatoms-1.2.1}/README.md +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/LICENSE +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/arrayapi/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/arrayapi/compat.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/arrayapi/typing.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/_numpydantic.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/_pydantic2pyarrow.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/_pydanticMixin.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/_pydanticModel.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/dataclasses/graph.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/_bond_list.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/_distance_pairs.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/_inner_outer.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/_neighbor_list.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/mic.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/rotation.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/geometry/sample.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/base/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/base/move.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/base/rtgp.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/database/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/database/base.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/database/hdf5.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/database/sqliteASE.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/event/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/event/_event.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/event/adsorption.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/event/desorption.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/event/reaction.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_abc.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_base.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_moveFB.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_moveSP.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_moveSwap.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/_simNVT.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/test_mmc.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/test_move.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mcmove/zzz.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/mdwarpper/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/network/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/reaction/network/_base.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/atoms.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/sysCluster.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/sysGas.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/system/system.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/__init__.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/bytestool.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/logger.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/parser.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/rdutils.py +0 -0
- {graphatoms-1.2.0 → graphatoms-1.2.1}/src/graphatoms/utils/subgraph.py +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.11.15,<0.12"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "graphatoms"
|
|
7
|
+
version = "1.2.1"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
description = "The Chemical Core Class for Graph Theory Analysis."
|
|
10
|
+
license-files = ["src/LICENSE"]
|
|
11
|
+
license = "GPL-3.0-or-later"
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
keywords = [
|
|
14
|
+
"chemistry",
|
|
15
|
+
"graph theory",
|
|
16
|
+
"reaction",
|
|
17
|
+
"event",
|
|
18
|
+
"KMC",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 5 - Production/Stable",
|
|
22
|
+
"Topic :: Scientific/Engineering :: Chemistry",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
]
|
|
25
|
+
dependencies = [
|
|
26
|
+
"ase",
|
|
27
|
+
"pymatgen>2023.6",
|
|
28
|
+
"rdkit>=2025",
|
|
29
|
+
"scikit-learn>=1.5",
|
|
30
|
+
"array-api-compat>=1.10",
|
|
31
|
+
"array_api-extra>=0.10",
|
|
32
|
+
"pyarrow",
|
|
33
|
+
"igraph>=0.11",
|
|
34
|
+
"h5py>=3.16",
|
|
35
|
+
"hydra-core",
|
|
36
|
+
"numpy>=2.0.0,<3",
|
|
37
|
+
"numpydantic",
|
|
38
|
+
"ovld",
|
|
39
|
+
"pydantic>=2.10",
|
|
40
|
+
"python-snappy>=0.7.3",
|
|
41
|
+
"tomli; python_version < '3.11'",
|
|
42
|
+
"tomli-w",
|
|
43
|
+
"typing-extensions",
|
|
44
|
+
"loguru",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://github.com/LiuGaoyong/GraphAtoms"
|
|
49
|
+
Repository = "https://github.com/LiuGaoyong/GraphAtoms"
|
|
50
|
+
Issues = "https://github.com/LiuGaoyong/GraphAtoms/issues/"
|
|
51
|
+
|
|
52
|
+
[[project.authors]]
|
|
53
|
+
name = "LiuGaoyong"
|
|
54
|
+
email = "liugaoyong_88@163.com"
|
|
55
|
+
|
|
56
|
+
[dependency-groups]
|
|
57
|
+
dev = [
|
|
58
|
+
"ruff>=0.11",
|
|
59
|
+
"array-api-strict",
|
|
60
|
+
"pytest>=8.3",
|
|
61
|
+
"pytest-xdist",
|
|
62
|
+
"jupyter",
|
|
63
|
+
"sqlmodel",
|
|
64
|
+
"openbabel-wheel",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[tool.uv]
|
|
68
|
+
package = true
|
|
69
|
+
|
|
70
|
+
[[tool.uv.index]]
|
|
71
|
+
url = "https://mirrors.cernet.edu.cn/pypi/web/simple"
|
|
72
|
+
default = true
|
|
73
|
+
|
|
74
|
+
[tool.pytest.ini_options]
|
|
75
|
+
filterwarnings = [
|
|
76
|
+
"error",
|
|
77
|
+
"ignore::RuntimeWarning",
|
|
78
|
+
"ignore::DeprecationWarning",
|
|
79
|
+
]
|
|
80
|
+
addopts = "--maxfail=1 -rf"
|
|
81
|
+
testpaths = ["src/tests"]
|
|
82
|
+
|
|
83
|
+
[tool.ruff]
|
|
84
|
+
line-length = 80
|
|
85
|
+
indent-width = 4
|
|
86
|
+
unsafe-fixes = true
|
|
87
|
+
|
|
88
|
+
[tool.ruff.lint]
|
|
89
|
+
select = [
|
|
90
|
+
"F",
|
|
91
|
+
"E",
|
|
92
|
+
"W",
|
|
93
|
+
"UP",
|
|
94
|
+
"TID",
|
|
95
|
+
]
|
|
96
|
+
ignore = [
|
|
97
|
+
"F722",
|
|
98
|
+
"D100",
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
[tool.ruff.lint.pydocstyle]
|
|
102
|
+
convention = "google"
|
|
103
|
+
|
|
104
|
+
[tool.pixi.package.build.backend]
|
|
105
|
+
name = "pixi-build-python"
|
|
106
|
+
version = "*"
|
|
107
|
+
|
|
108
|
+
[tool.pixi.workspace]
|
|
109
|
+
preview = ["pixi-build"]
|
|
110
|
+
channels = ["conda-forge"]
|
|
111
|
+
platforms = [
|
|
112
|
+
"linux-64",
|
|
113
|
+
"osx-arm64",
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
[tool.pixi.pypi-dependencies.graphatoms]
|
|
117
|
+
path = "."
|
|
118
|
+
editable = true
|
|
119
|
+
|
|
120
|
+
[tool.pixi.environments.default]
|
|
121
|
+
solve-group = "default"
|
|
122
|
+
|
|
123
|
+
[tool.pixi.environments.dev]
|
|
124
|
+
features = ["dev"]
|
|
125
|
+
solve-group = "default"
|
|
126
|
+
|
|
127
|
+
[tool.pixi.tasks]
|
|
128
|
+
test = "pytest -s -vv"
|
|
129
|
+
benchmark = "pytest -s src/tests-benchmark/*.py"
|
|
130
|
+
|
|
131
|
+
[tool.pixi.dependencies]
|
|
132
|
+
python = ">=3.12"
|
|
133
|
+
pytest = ">=9.0.3,<10"
|
|
134
|
+
array-api-compat = ">=1.15.0,<2"
|
|
135
|
+
array-api-extra = ">=0.11.0,<0.12"
|
|
136
|
+
array-api-strict = ">=2.5,<3"
|
|
137
|
+
ase = ">=3.28.0,<4"
|
|
138
|
+
pymatgen = ">=2026.5.4,<2027"
|
|
139
|
+
rdkit = ">=2025.9.5,<2027"
|
|
140
|
+
openbabel = ">=3.1.1,<4"
|
|
141
|
+
pyarrow = ">=21.0.0,<25"
|
|
142
|
+
scikit-learn = ">=1.8.0,<2"
|
|
143
|
+
python-igraph = ">=0.11.9,<0.12"
|
|
144
|
+
numpy = ">=2.0.0,<3"
|
|
145
|
+
pydantic = ">=2.10.0,<3"
|
|
146
|
+
numpydantic = ">=1.8.1,<2"
|
|
147
|
+
python-snappy = ">=0.7.3,<0.8"
|
|
148
|
+
h5py = ">=3.16.0,<4"
|
|
149
|
+
hydra-core = ">=1.3.2,<2"
|
|
150
|
+
tomli-w = ">=1.2.0,<2"
|
|
151
|
+
loguru = ">=0.7.3,<0.8"
|
|
152
|
+
pytorch = ">=2.10.0,<3"
|
|
153
|
+
jax = ">=0.9.0,<0.10"
|
|
154
|
+
jupyterlab = ">=4.5.8,<5"
|
|
155
|
+
ovld = ">=0.5.15,<0.6"
|
|
156
|
+
pytest-xdist = ">=3.8.0,<4"
|
|
@@ -9,7 +9,7 @@ Issues = "https://github.com/LiuGaoyong/GraphAtoms/issues/"
|
|
|
9
9
|
|
|
10
10
|
[project]
|
|
11
11
|
name = "graphatoms"
|
|
12
|
-
version = "1.2.
|
|
12
|
+
version = "1.2.1"
|
|
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" }]
|
|
@@ -49,7 +49,7 @@ dependencies = [
|
|
|
49
49
|
"hydra-core",
|
|
50
50
|
"numpy>=2.0.0,<3",
|
|
51
51
|
"numpydantic",
|
|
52
|
-
"ovld",
|
|
52
|
+
"ovld", # singledispatch which works for multiple arguments.
|
|
53
53
|
"pydantic>=2.10",
|
|
54
54
|
"python-snappy>=0.7.3", # More Fase Data Compression
|
|
55
55
|
"tomli; python_version < '3.11'", # use tomllib in python>=3.11
|
|
@@ -64,7 +64,7 @@ dev = [
|
|
|
64
64
|
"pytest>=8.3",
|
|
65
65
|
"pytest-xdist",
|
|
66
66
|
"jupyter",
|
|
67
|
-
"sqlmodel",
|
|
67
|
+
"sqlmodel", # SQL + pydantic
|
|
68
68
|
'openbabel-wheel',
|
|
69
69
|
]
|
|
70
70
|
|
|
@@ -64,7 +64,7 @@ class BondGraph(Matter, OurFrozenModel):
|
|
|
64
64
|
f"Invalid shape for `{k}`: Len({k})="
|
|
65
65
|
f"{len(v)} but nbonds={self.nbonds}."
|
|
66
66
|
)
|
|
67
|
-
|
|
67
|
+
assert self.__IGRAPH.is_simple(), "The graph should be simple."
|
|
68
68
|
return self
|
|
69
69
|
|
|
70
70
|
@override
|
|
@@ -112,7 +112,9 @@ class BondGraph(Matter, OurFrozenModel):
|
|
|
112
112
|
@cached_property
|
|
113
113
|
def __IGRAPH(self) -> IGraph:
|
|
114
114
|
edges = np.column_stack([self.source, self.target])
|
|
115
|
-
g = IGraph(n=self.natoms, edges=edges, directed=
|
|
115
|
+
g = IGraph(n=self.natoms, edges=edges, directed=True)
|
|
116
|
+
# use directed graph for compatibility of full neighbor list
|
|
117
|
+
assert not g.has_multiple(), "This graph has multiple edges."
|
|
116
118
|
return g.as_undirected() # make sure it is undirected
|
|
117
119
|
|
|
118
120
|
@cached_property
|
|
@@ -165,7 +167,7 @@ class BondGraph(Matter, OurFrozenModel):
|
|
|
165
167
|
|
|
166
168
|
def get_match_mode(
|
|
167
169
|
self,
|
|
168
|
-
pattern:
|
|
170
|
+
pattern: "BondGraph",
|
|
169
171
|
algorithm: Literal["lad", "vf2"] = "lad",
|
|
170
172
|
return_match_target: bool = True,
|
|
171
173
|
only_number_color: bool = False,
|
|
@@ -425,7 +425,12 @@ class SysGraph(BondGraph, Structure, AtomTag, GasMixin):
|
|
|
425
425
|
df_bonds["order"] = self.order
|
|
426
426
|
if self.distance is not None:
|
|
427
427
|
df_bonds["distance"] = self.distance
|
|
428
|
-
G = IGraph.DataFrame(
|
|
428
|
+
G = IGraph.DataFrame(
|
|
429
|
+
edges=df_bonds,
|
|
430
|
+
directed=True, # use directed graph to avoid duplicate edges
|
|
431
|
+
vertices=df_atoms,
|
|
432
|
+
use_vids=True,
|
|
433
|
+
)
|
|
429
434
|
for k in (
|
|
430
435
|
Box.__pydantic_fields__.keys()
|
|
431
436
|
| Energetics.__pydantic_fields__.keys()
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|