structuretoolkit 0.0.35__tar.gz → 0.0.36__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 (31) hide show
  1. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/PKG-INFO +10 -12
  2. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/README.md +0 -1
  3. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/pyproject.toml +9 -9
  4. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/_version.py +2 -2
  5. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/__init__.py +0 -2
  6. structuretoolkit-0.0.35/structuretoolkit/build/random.py +0 -107
  7. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/.gitignore +0 -0
  8. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/LICENSE +0 -0
  9. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/__init__.py +0 -0
  10. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/__init__.py +0 -0
  11. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/distance.py +0 -0
  12. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/dscribe.py +0 -0
  13. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/neighbors.py +0 -0
  14. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/phonopy.py +0 -0
  15. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/pyscal.py +0 -0
  16. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/snap.py +0 -0
  17. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/spatial.py +0 -0
  18. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/strain.py +0 -0
  19. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/analyse/symmetry.py +0 -0
  20. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/aimsgb.py +0 -0
  21. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/compound.py +0 -0
  22. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/mesh.py +0 -0
  23. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/sqs.py +0 -0
  24. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/build/surface.py +0 -0
  25. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/__init__.py +0 -0
  26. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/error.py +0 -0
  27. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/helper.py +0 -0
  28. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/phonopy.py +0 -0
  29. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/pymatgen.py +0 -0
  30. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/common/pyscal.py +0 -0
  31. {structuretoolkit-0.0.35 → structuretoolkit-0.0.36}/structuretoolkit/visualize.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structuretoolkit
3
- Version: 0.0.35
3
+ Version: 0.0.36
4
4
  Summary: build, analyse and visualise atomistic structures for materials science
5
5
  Project-URL: Homepage, https://github.com/pyiron/structuretoolkit
6
6
  Project-URL: Documentation, https://github.com/pyiron/structuretoolkit
@@ -45,33 +45,32 @@ Classifier: Programming Language :: Python :: 3.9
45
45
  Classifier: Programming Language :: Python :: 3.10
46
46
  Classifier: Programming Language :: Python :: 3.11
47
47
  Classifier: Programming Language :: Python :: 3.12
48
+ Classifier: Programming Language :: Python :: 3.13
48
49
  Classifier: Topic :: Scientific/Engineering :: Physics
49
- Requires-Python: <3.13,>=3.9
50
+ Requires-Python: <3.14,>=3.9
50
51
  Requires-Dist: ase<=3.26.0,>=3.20.1
51
- Requires-Dist: numpy<=2.3.3,>=1.23.5
52
- Requires-Dist: scipy<=1.16.2,>=1.9.3
52
+ Requires-Dist: numpy<=2.3.4,>=1.23.5
53
+ Requires-Dist: scipy<=1.16.3,>=1.9.3
53
54
  Provides-Extra: clusters
54
- Requires-Dist: scikit-learn==1.6.1; extra == 'clusters'
55
+ Requires-Dist: scikit-learn==1.7.2; extra == 'clusters'
55
56
  Provides-Extra: dscribe
56
57
  Requires-Dist: dscribe==2.1.2; extra == 'dscribe'
57
58
  Provides-Extra: grainboundary
58
59
  Requires-Dist: aimsgb<=1.1.1,>=1.0.2; extra == 'grainboundary'
59
- Requires-Dist: pymatgen<=2025.3.10,>=2022.2.1; extra == 'grainboundary'
60
+ Requires-Dist: pymatgen<=2025.6.14,>=2022.2.1; extra == 'grainboundary'
60
61
  Provides-Extra: matplotlib
61
- Requires-Dist: matplotlib==3.10.3; extra == 'matplotlib'
62
+ Requires-Dist: matplotlib==3.10.7; extra == 'matplotlib'
62
63
  Provides-Extra: nglview
63
64
  Requires-Dist: nglview<=3.1.4,>=2.7.7; extra == 'nglview'
64
65
  Provides-Extra: phonopy
65
66
  Requires-Dist: phonopy<=2.43.2,>=2.16.2; extra == 'phonopy'
66
67
  Requires-Dist: spglib<=2.6.0,>=1.16.5; extra == 'phonopy'
67
68
  Provides-Extra: plotly
68
- Requires-Dist: plotly<=6.3.0,>=4.14.3; extra == 'plotly'
69
+ Requires-Dist: plotly<=6.3.1,>=4.14.3; extra == 'plotly'
69
70
  Provides-Extra: pyscal
70
71
  Requires-Dist: pyscal3<=3.3.0,>=3.2.5; extra == 'pyscal'
71
- Provides-Extra: pyxtal
72
- Requires-Dist: pyxtal<=1.1.1,>=0.5.5; extra == 'pyxtal'
73
72
  Provides-Extra: surface
74
- Requires-Dist: pymatgen<=2025.3.10,>=2022.2.1; extra == 'surface'
73
+ Requires-Dist: pymatgen<=2025.6.14,>=2022.2.1; extra == 'surface'
75
74
  Requires-Dist: spglib<=2.6.0,>=1.16.5; extra == 'surface'
76
75
  Provides-Extra: symmetry
77
76
  Requires-Dist: spglib<=2.6.0,>=1.16.5; extra == 'symmetry'
@@ -127,7 +126,6 @@ stk.plot3d(structure)
127
126
  * `stk.build.high_index_surface()`
128
127
  * `stk.build.get_high_index_surface_info()`
129
128
  * `stk.build.sqs_structures()`
130
- * `stk.build.pyxtal()`
131
129
  * `stk.build.B2()`
132
130
  * `stk.build.C14()`
133
131
  * `stk.build.C15()`
@@ -48,7 +48,6 @@ stk.plot3d(structure)
48
48
  * `stk.build.high_index_surface()`
49
49
  * `stk.build.get_high_index_surface_info()`
50
50
  * `stk.build.sqs_structures()`
51
- * `stk.build.pyxtal()`
52
51
  * `stk.build.B2()`
53
52
  * `stk.build.C14()`
54
53
  * `stk.build.C15()`
@@ -11,7 +11,7 @@ authors = [
11
11
  readme = "README.md"
12
12
  license = { file = "LICENSE" }
13
13
  keywords = ["pyiron"]
14
- requires-python = ">=3.9, <3.13"
14
+ requires-python = ">=3.9, <3.14"
15
15
  classifiers = [
16
16
  "Development Status :: 5 - Production/Stable",
17
17
  "Topic :: Scientific/Engineering :: Physics",
@@ -22,11 +22,12 @@ classifiers = [
22
22
  "Programming Language :: Python :: 3.10",
23
23
  "Programming Language :: Python :: 3.11",
24
24
  "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
25
26
  ]
26
27
  dependencies = [
27
28
  "ase>=3.20.1,<=3.26.0",
28
- "numpy>=1.23.5,<=2.3.3",
29
- "scipy>=1.9.3,<=1.16.2",
29
+ "numpy>=1.23.5,<=2.3.4",
30
+ "scipy>=1.9.3,<=1.16.3",
30
31
  ]
31
32
  dynamic = ["version"]
32
33
 
@@ -39,23 +40,22 @@ Repository = "https://github.com/pyiron/structuretoolkit"
39
40
  dscribe = ["dscribe==2.1.2"]
40
41
  grainboundary = [
41
42
  "aimsgb>=1.0.2,<=1.1.1",
42
- "pymatgen>=2022.2.1,<=2025.3.10",
43
+ "pymatgen>=2022.2.1,<=2025.6.14",
43
44
  ]
44
45
  pyscal = ["pyscal3>=3.2.5,<=3.3.0"]
45
46
  nglview = ["nglview>=2.7.7,<=3.1.4"]
46
- matplotlib = ["matplotlib==3.10.3"]
47
- plotly = ["plotly>=4.14.3,<=6.3.0"]
48
- clusters = ["scikit-learn==1.6.1"]
47
+ matplotlib = ["matplotlib==3.10.7"]
48
+ plotly = ["plotly>=4.14.3,<=6.3.1"]
49
+ clusters = ["scikit-learn==1.7.2"]
49
50
  symmetry = ["spglib>=1.16.5,<=2.6.0"]
50
51
  surface = [
51
52
  "spglib>=1.16.5,<=2.6.0",
52
- "pymatgen>=2022.2.1,<=2025.3.10",
53
+ "pymatgen>=2022.2.1,<=2025.6.14",
53
54
  ]
54
55
  phonopy = [
55
56
  "phonopy>=2.16.2,<=2.43.2",
56
57
  "spglib>=1.16.5,<=2.6.0",
57
58
  ]
58
- pyxtal = ["pyxtal>=0.5.5,<=1.1.1"]
59
59
 
60
60
  [tool.ruff]
61
61
  exclude = [".ci_support", "tests", "setup.py", "_version.py"]
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.0.35'
32
- __version_tuple__ = version_tuple = (0, 0, 35)
31
+ __version__ = version = '0.0.36'
32
+ __version_tuple__ = version_tuple = (0, 0, 36)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,7 +1,6 @@
1
1
  from structuretoolkit.build.aimsgb import get_grainboundary_info, grainboundary
2
2
  from structuretoolkit.build.compound import B2, C14, C15, C36, D03
3
3
  from structuretoolkit.build.mesh import create_mesh
4
- from structuretoolkit.build.random import pyxtal
5
4
  from structuretoolkit.build.sqs import sqs_structures
6
5
  from structuretoolkit.build.surface import (
7
6
  get_high_index_surface_info,
@@ -17,7 +16,6 @@ __all__ = [
17
16
  "C36",
18
17
  "D03",
19
18
  "create_mesh",
20
- "pyxtal",
21
19
  "sqs_structures",
22
20
  "get_high_index_surface_info",
23
21
  "high_index_surface",
@@ -1,107 +0,0 @@
1
- # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
2
- # Distributed under the terms of "New BSD License", see the LICENSE file.
3
-
4
- import warnings
5
- from typing import Union
6
-
7
- try:
8
- from tqdm.auto import tqdm
9
- except ImportError:
10
-
11
- def tqdm(x):
12
- return x
13
-
14
-
15
- from ase import Atoms
16
-
17
- from structuretoolkit.common.helper import center_coordinates_in_unit_cell
18
-
19
-
20
- def pyxtal(
21
- group: Union[int, list[int]],
22
- species: tuple[str],
23
- num_ions: tuple[int],
24
- dim=3,
25
- repeat=1,
26
- allow_exceptions=True,
27
- **kwargs,
28
- ) -> Union[Atoms, list[dict]]:
29
- """
30
- Generate random crystal structures with PyXtal.
31
-
32
- `group` must be between 1 and the largest possible value for the given dimensionality:
33
- dim=3 => 1 - 230 (space groups)
34
- dim=2 => 1 - 80 (layer groups)
35
- dim=1 => 1 - 75 (rod groups)
36
- dim=0 => 1 - 58 (point groups)
37
-
38
- When `group` is passed as a list of integers or `repeat>1`, generate multiple structures and return them in a list
39
- of dicts containing the keys `atoms`, `symmetry` and `repeat` for the ASE structure, the symmetry group
40
- number and which iteration it is, respectively.
41
-
42
- Args:
43
- group (list of int, or int): the symmetry group to generate or a list of them
44
- species (tuple of str): which species to include, defines the stoichiometry together with `num_ions`
45
- num_ions (tuple of int): how many of each species to include, defines the stoichiometry together with `species`
46
- dim (int): dimensionality of the symmetry group, 0 is point groups, 1 is rod groups, 2 is layer groups and 3 is space groups
47
- repeat (int): how many random structures to generate
48
- allow_exceptions (bool): when generating multiple structures, silence errors when the requested stoichiometry and symmetry group are incompatible
49
- **kwargs: passed to `pyxtal.pyxtal` function verbatim
50
-
51
- Returns:
52
- :class:`~.Atoms`: the generated structure, if repeat==1 and only one symmetry group is requested
53
- list of dict of all generated structures, if repeat>1 or multiple symmetry groups are requested
54
-
55
- Raises:
56
- ValueError: if `species` and `num_ions` are not of the same length
57
- ValueError: if stoichiometry and symmetry group are incompatible and allow_exceptions==False or only one structure is requested
58
- """
59
- from pyxtal import pyxtal as _pyxtal
60
- from pyxtal.msg import Comp_CompatibilityError
61
-
62
- if len(species) != len(num_ions):
63
- raise ValueError(
64
- "species and num_ions must be of same length, "
65
- f"not {species} and {num_ions}!"
66
- )
67
- stoich = "".join(f"{s}{n}" for s, n in zip(species, num_ions))
68
-
69
- def generate(group):
70
- s = _pyxtal()
71
- try:
72
- s.from_random(
73
- dim=dim, group=group, species=species, numIons=num_ions, **kwargs
74
- )
75
- except Comp_CompatibilityError:
76
- if not allow_exceptions:
77
- raise ValueError(
78
- f"Symmetry group {group} incompatible with stoichiometry {stoich}!"
79
- ) from None
80
- else:
81
- return None
82
- s = s.to_ase()
83
- s = center_coordinates_in_unit_cell(structure=s)
84
- return s
85
-
86
- # return a single structure
87
- if repeat == 1 and isinstance(group, int):
88
- allow_exceptions = False
89
- return generate(group)
90
- else:
91
- structures = []
92
- if isinstance(group, int):
93
- group = [group]
94
- failed_groups = []
95
- for g in tqdm(group, desc="Spacegroups"):
96
- for i in range(repeat):
97
- s = generate(g)
98
- if s is None:
99
- failed_groups.append(g)
100
- continue
101
- structures.append({"atoms": s, "symmetry": g, "repeat": i})
102
- if len(failed_groups) > 0:
103
- warnings.warn(
104
- f"Groups [{', '.join(map(str, failed_groups))}] could not be generated with stoichiometry {stoich}!",
105
- stacklevel=2,
106
- )
107
- return structures