structuretoolkit 0.0.34__tar.gz → 0.0.35__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.34 → structuretoolkit-0.0.35}/PKG-INFO +7 -7
  2. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/pyproject.toml +6 -6
  3. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/__init__.py +2 -0
  4. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/_version.py +2 -2
  5. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/__init__.py +2 -0
  6. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/helper.py +14 -0
  7. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/.gitignore +0 -0
  8. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/LICENSE +0 -0
  9. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/README.md +0 -0
  10. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/__init__.py +0 -0
  11. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/distance.py +0 -0
  12. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/dscribe.py +0 -0
  13. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/neighbors.py +0 -0
  14. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/phonopy.py +0 -0
  15. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/pyscal.py +0 -0
  16. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/snap.py +0 -0
  17. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/spatial.py +0 -0
  18. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/strain.py +0 -0
  19. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/analyse/symmetry.py +0 -0
  20. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/__init__.py +0 -0
  21. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/aimsgb.py +0 -0
  22. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/compound.py +0 -0
  23. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/mesh.py +0 -0
  24. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/random.py +0 -0
  25. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/sqs.py +0 -0
  26. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/build/surface.py +0 -0
  27. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/error.py +0 -0
  28. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/phonopy.py +0 -0
  29. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/pymatgen.py +0 -0
  30. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/common/pyscal.py +0 -0
  31. {structuretoolkit-0.0.34 → structuretoolkit-0.0.35}/structuretoolkit/visualize.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structuretoolkit
3
- Version: 0.0.34
3
+ Version: 0.0.35
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
@@ -48,12 +48,12 @@ Classifier: Programming Language :: Python :: 3.12
48
48
  Classifier: Topic :: Scientific/Engineering :: Physics
49
49
  Requires-Python: <3.13,>=3.9
50
50
  Requires-Dist: ase<=3.26.0,>=3.20.1
51
- Requires-Dist: numpy<=1.26.4,>=1.23.5
52
- Requires-Dist: scipy<=1.15.2,>=1.9.3
51
+ Requires-Dist: numpy<=2.3.3,>=1.23.5
52
+ Requires-Dist: scipy<=1.16.2,>=1.9.3
53
53
  Provides-Extra: clusters
54
54
  Requires-Dist: scikit-learn==1.6.1; extra == 'clusters'
55
55
  Provides-Extra: dscribe
56
- Requires-Dist: dscribe==2.1.1; extra == 'dscribe'
56
+ Requires-Dist: dscribe==2.1.2; extra == 'dscribe'
57
57
  Provides-Extra: grainboundary
58
58
  Requires-Dist: aimsgb<=1.1.1,>=1.0.2; extra == 'grainboundary'
59
59
  Requires-Dist: pymatgen<=2025.3.10,>=2022.2.1; extra == 'grainboundary'
@@ -62,14 +62,14 @@ Requires-Dist: matplotlib==3.10.3; extra == 'matplotlib'
62
62
  Provides-Extra: nglview
63
63
  Requires-Dist: nglview<=3.1.4,>=2.7.7; extra == 'nglview'
64
64
  Provides-Extra: phonopy
65
- Requires-Dist: phonopy<=2.43.1,>=2.16.2; extra == 'phonopy'
65
+ Requires-Dist: phonopy<=2.43.2,>=2.16.2; extra == 'phonopy'
66
66
  Requires-Dist: spglib<=2.6.0,>=1.16.5; extra == 'phonopy'
67
67
  Provides-Extra: plotly
68
- Requires-Dist: plotly<=6.2.0,>=4.14.3; extra == 'plotly'
68
+ Requires-Dist: plotly<=6.3.0,>=4.14.3; extra == 'plotly'
69
69
  Provides-Extra: pyscal
70
70
  Requires-Dist: pyscal3<=3.3.0,>=3.2.5; extra == 'pyscal'
71
71
  Provides-Extra: pyxtal
72
- Requires-Dist: pyxtal<=1.1.0,>=0.5.5; extra == 'pyxtal'
72
+ Requires-Dist: pyxtal<=1.1.1,>=0.5.5; extra == 'pyxtal'
73
73
  Provides-Extra: surface
74
74
  Requires-Dist: pymatgen<=2025.3.10,>=2022.2.1; extra == 'surface'
75
75
  Requires-Dist: spglib<=2.6.0,>=1.16.5; extra == 'surface'
@@ -25,8 +25,8 @@ classifiers = [
25
25
  ]
26
26
  dependencies = [
27
27
  "ase>=3.20.1,<=3.26.0",
28
- "numpy>=1.23.5,<=1.26.4",
29
- "scipy>=1.9.3,<=1.15.2",
28
+ "numpy>=1.23.5,<=2.3.3",
29
+ "scipy>=1.9.3,<=1.16.2",
30
30
  ]
31
31
  dynamic = ["version"]
32
32
 
@@ -36,7 +36,7 @@ Documentation = "https://github.com/pyiron/structuretoolkit"
36
36
  Repository = "https://github.com/pyiron/structuretoolkit"
37
37
 
38
38
  [project.optional-dependencies]
39
- dscribe = ["dscribe==2.1.1"]
39
+ dscribe = ["dscribe==2.1.2"]
40
40
  grainboundary = [
41
41
  "aimsgb>=1.0.2,<=1.1.1",
42
42
  "pymatgen>=2022.2.1,<=2025.3.10",
@@ -44,7 +44,7 @@ grainboundary = [
44
44
  pyscal = ["pyscal3>=3.2.5,<=3.3.0"]
45
45
  nglview = ["nglview>=2.7.7,<=3.1.4"]
46
46
  matplotlib = ["matplotlib==3.10.3"]
47
- plotly = ["plotly>=4.14.3,<=6.2.0"]
47
+ plotly = ["plotly>=4.14.3,<=6.3.0"]
48
48
  clusters = ["scikit-learn==1.6.1"]
49
49
  symmetry = ["spglib>=1.16.5,<=2.6.0"]
50
50
  surface = [
@@ -52,10 +52,10 @@ surface = [
52
52
  "pymatgen>=2022.2.1,<=2025.3.10",
53
53
  ]
54
54
  phonopy = [
55
- "phonopy>=2.16.2,<=2.43.1",
55
+ "phonopy>=2.16.2,<=2.43.2",
56
56
  "spglib>=1.16.5,<=2.6.0",
57
57
  ]
58
- pyxtal = ["pyxtal>=0.5.5,<=1.1.0"]
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"]
@@ -88,6 +88,7 @@ from structuretoolkit.common import (
88
88
  center_coordinates_in_unit_cell,
89
89
  get_cell,
90
90
  get_extended_positions,
91
+ get_number_species_atoms,
91
92
  get_vertical_length,
92
93
  get_wrapped_coordinates,
93
94
  pymatgen_to_ase,
@@ -113,6 +114,7 @@ __all__ = [
113
114
  "get_mean_positions",
114
115
  "get_neighborhood",
115
116
  "get_neighbors",
117
+ "get_number_species_atoms",
116
118
  "get_steinhardt_parameters",
117
119
  "get_strain",
118
120
  "get_symmetry",
@@ -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.34'
32
- __version_tuple__ = version_tuple = (0, 0, 34)
31
+ __version__ = version = '0.0.35'
32
+ __version_tuple__ = version_tuple = (0, 0, 35)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -4,6 +4,7 @@ from structuretoolkit.common.helper import (
4
4
  center_coordinates_in_unit_cell,
5
5
  get_cell,
6
6
  get_extended_positions,
7
+ get_number_species_atoms,
7
8
  get_vertical_length,
8
9
  get_wrapped_coordinates,
9
10
  select_index,
@@ -22,6 +23,7 @@ __all__ = [
22
23
  "center_coordinates_in_unit_cell",
23
24
  "get_cell",
24
25
  "get_extended_positions",
26
+ "get_number_species_atoms",
25
27
  "get_vertical_length",
26
28
  "get_wrapped_coordinates",
27
29
  "select_index",
@@ -5,6 +5,20 @@ from ase.atoms import Atoms
5
5
  from scipy.sparse import coo_matrix
6
6
 
7
7
 
8
+ def get_number_species_atoms(structure: Atoms):
9
+ """Returns a dictionary with the species in the structure and the corresponding count in the structure
10
+
11
+ Args:
12
+ structure
13
+
14
+ Returns:
15
+ dict: A dictionary with the species and the corresponding count
16
+
17
+ """
18
+ elements_lst = structure.get_chemical_symbols()
19
+ return {species: elements_lst.count(species) for species in set(elements_lst)}
20
+
21
+
8
22
  def get_extended_positions(
9
23
  structure: Atoms,
10
24
  width: float,