structuretoolkit 0.0.21__tar.gz → 0.0.23__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 (54) hide show
  1. {structuretoolkit-0.0.21/structuretoolkit.egg-info → structuretoolkit-0.0.23}/PKG-INFO +18 -16
  2. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/pyproject.toml +16 -15
  3. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/__init__.py +2 -0
  4. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/_version.py +3 -3
  5. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/__init__.py +6 -0
  6. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/distance.py +10 -2
  7. structuretoolkit-0.0.23/structuretoolkit/analyse/dscribe.py +49 -0
  8. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/neighbors.py +129 -96
  9. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/phonopy.py +4 -1
  10. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/pyscal.py +26 -21
  11. structuretoolkit-0.0.23/structuretoolkit/analyse/snap.py +701 -0
  12. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/spatial.py +76 -50
  13. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/strain.py +38 -21
  14. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/analyse/symmetry.py +36 -29
  15. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/__init__.py +2 -1
  16. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/aimsgb.py +16 -13
  17. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/compound.py +16 -14
  18. structuretoolkit-0.0.23/structuretoolkit/build/mesh.py +53 -0
  19. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/surface.py +25 -23
  20. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/__init__.py +1 -0
  21. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/helper.py +56 -11
  22. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/phonopy.py +5 -4
  23. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/pymatgen.py +6 -3
  24. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/pyscal.py +4 -1
  25. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/visualize.py +117 -84
  26. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23/structuretoolkit.egg-info}/PKG-INFO +18 -16
  27. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit.egg-info/SOURCES.txt +7 -0
  28. structuretoolkit-0.0.23/structuretoolkit.egg-info/requires.txt +39 -0
  29. structuretoolkit-0.0.23/tests/test_dscribe.py +26 -0
  30. structuretoolkit-0.0.23/tests/test_helpers.py +28 -0
  31. structuretoolkit-0.0.23/tests/test_mesh.py +31 -0
  32. structuretoolkit-0.0.23/tests/test_snap.py +367 -0
  33. structuretoolkit-0.0.21/structuretoolkit.egg-info/requires.txt +0 -36
  34. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/LICENSE +0 -0
  35. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/MANIFEST.in +0 -0
  36. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/README.md +0 -0
  37. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/setup.cfg +0 -0
  38. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/setup.py +0 -0
  39. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/random.py +0 -0
  40. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/build/sqs.py +0 -0
  41. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit/common/error.py +0 -0
  42. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit.egg-info/dependency_links.txt +0 -0
  43. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/structuretoolkit.egg-info/top_level.txt +0 -0
  44. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_aimsgb.py +0 -0
  45. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_analyse.py +0 -0
  46. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_compound.py +0 -0
  47. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_high_index_surface.py +0 -0
  48. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_neighbors.py +0 -0
  49. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_pymatgen.py +0 -0
  50. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_pyscal.py +0 -0
  51. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_pyxtal.py +0 -0
  52. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_strain.py +0 -0
  53. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_symmetry.py +0 -0
  54. {structuretoolkit-0.0.21 → structuretoolkit-0.0.23}/tests/test_visualize.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: structuretoolkit
3
- Version: 0.0.21
3
+ Version: 0.0.23
4
4
  Summary: build, analyse and visualise atomistic structures for materials science
5
5
  Author-email: Jan Janssen <janssen@mpie.de>
6
6
  License: BSD 3-Clause License
@@ -42,39 +42,41 @@ Classifier: Topic :: Scientific/Engineering :: Physics
42
42
  Classifier: License :: OSI Approved :: BSD License
43
43
  Classifier: Intended Audience :: Science/Research
44
44
  Classifier: Operating System :: OS Independent
45
- Classifier: Programming Language :: Python :: 3.8
46
45
  Classifier: Programming Language :: Python :: 3.9
47
46
  Classifier: Programming Language :: Python :: 3.10
48
47
  Classifier: Programming Language :: Python :: 3.11
49
- Requires-Python: >=3.8
48
+ Classifier: Programming Language :: Python :: 3.12
49
+ Requires-Python: <3.13,>=3.9
50
50
  Description-Content-Type: text/markdown
51
51
  License-File: LICENSE
52
52
  Requires-Dist: ase<=3.22.1,>=3.20.1
53
53
  Requires-Dist: numpy<=1.26.4,>=1.23.5
54
- Requires-Dist: scipy<=1.12.0,>=1.9.3
54
+ Requires-Dist: scipy<=1.13.1,>=1.9.3
55
+ Provides-Extra: dscribe
56
+ Requires-Dist: dscribe==2.1.0; extra == "dscribe"
55
57
  Provides-Extra: grainboundary
56
- Requires-Dist: aimsgb<=1.1.0,>=1.0.2; extra == "grainboundary"
57
- Requires-Dist: pymatgen<=2024.2.8,>=2022.2.1; extra == "grainboundary"
58
+ Requires-Dist: aimsgb<=1.1.1,>=1.0.2; extra == "grainboundary"
59
+ Requires-Dist: pymatgen<=2024.5.1,>=2022.2.1; extra == "grainboundary"
58
60
  Provides-Extra: pyscal
59
61
  Requires-Dist: pyscal2==2.10.18; extra == "pyscal"
60
62
  Provides-Extra: nglview
61
- Requires-Dist: nglview<=3.1.1,>=2.7.7; extra == "nglview"
63
+ Requires-Dist: nglview<=3.1.2,>=2.7.7; extra == "nglview"
62
64
  Provides-Extra: matplotlib
63
- Requires-Dist: matplotlib==3.8.2; extra == "matplotlib"
65
+ Requires-Dist: matplotlib==3.8.4; extra == "matplotlib"
64
66
  Provides-Extra: plotly
65
- Requires-Dist: plotly<=5.18.0,>=4.14.3; extra == "plotly"
67
+ Requires-Dist: plotly<=5.22.0,>=4.14.3; extra == "plotly"
66
68
  Provides-Extra: clusters
67
- Requires-Dist: scikit-learn==1.4.0; extra == "clusters"
69
+ Requires-Dist: scikit-learn==1.5.0; extra == "clusters"
68
70
  Provides-Extra: symmetry
69
- Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "symmetry"
71
+ Requires-Dist: spglib<=2.4.0,>=1.16.5; extra == "symmetry"
70
72
  Provides-Extra: surface
71
- Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "surface"
72
- Requires-Dist: pymatgen<=2024.2.8,>=2022.2.1; extra == "surface"
73
+ Requires-Dist: spglib<=2.4.0,>=1.16.5; extra == "surface"
74
+ Requires-Dist: pymatgen<=2024.5.1,>=2022.2.1; extra == "surface"
73
75
  Provides-Extra: phonopy
74
- Requires-Dist: phonopy<=2.21.0,>=2.16.2; extra == "phonopy"
75
- Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "phonopy"
76
+ Requires-Dist: phonopy<=2.23.1,>=2.16.2; extra == "phonopy"
77
+ Requires-Dist: spglib<=2.4.0,>=1.16.5; extra == "phonopy"
76
78
  Provides-Extra: pyxtal
77
- Requires-Dist: pyxtal<=0.6.2,>=0.5.5; extra == "pyxtal"
79
+ Requires-Dist: pyxtal<=0.6.6,>=0.5.5; extra == "pyxtal"
78
80
 
79
81
  # structuretoolkit
80
82
 
@@ -11,22 +11,22 @@ authors = [
11
11
  readme = "README.md"
12
12
  license = { file = "LICENSE" }
13
13
  keywords = ["pyiron"]
14
- requires-python = ">=3.8"
14
+ requires-python = ">=3.9, <3.13"
15
15
  classifiers = [
16
16
  "Development Status :: 5 - Production/Stable",
17
17
  "Topic :: Scientific/Engineering :: Physics",
18
18
  "License :: OSI Approved :: BSD License",
19
19
  "Intended Audience :: Science/Research",
20
20
  "Operating System :: OS Independent",
21
- "Programming Language :: Python :: 3.8",
22
21
  "Programming Language :: Python :: 3.9",
23
22
  "Programming Language :: Python :: 3.10",
24
23
  "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
25
  ]
26
26
  dependencies = [
27
27
  "ase>=3.20.1,<=3.22.1",
28
28
  "numpy>=1.23.5,<=1.26.4",
29
- "scipy>=1.9.3,<=1.12.0",
29
+ "scipy>=1.9.3,<=1.13.1",
30
30
  ]
31
31
  dynamic = ["version"]
32
32
 
@@ -36,25 +36,26 @@ 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.0"]
39
40
  grainboundary = [
40
- "aimsgb>=1.0.2,<=1.1.0",
41
- "pymatgen>=2022.2.1,<=2024.2.8",
41
+ "aimsgb>=1.0.2,<=1.1.1",
42
+ "pymatgen>=2022.2.1,<=2024.5.1",
42
43
  ]
43
44
  pyscal = ["pyscal2==2.10.18"]
44
- nglview = ["nglview>=2.7.7,<=3.1.1"]
45
- matplotlib = ["matplotlib==3.8.2"]
46
- plotly = ["plotly>=4.14.3,<=5.18.0"]
47
- clusters = ["scikit-learn==1.4.0"]
48
- symmetry = ["spglib>=1.16.5,<=2.3.1"]
45
+ nglview = ["nglview>=2.7.7,<=3.1.2"]
46
+ matplotlib = ["matplotlib==3.8.4"]
47
+ plotly = ["plotly>=4.14.3,<=5.22.0"]
48
+ clusters = ["scikit-learn==1.5.0"]
49
+ symmetry = ["spglib>=1.16.5,<=2.4.0"]
49
50
  surface = [
50
- "spglib>=1.16.5,<=2.3.1",
51
- "pymatgen>=2022.2.1,<=2024.2.8",
51
+ "spglib>=1.16.5,<=2.4.0",
52
+ "pymatgen>=2022.2.1,<=2024.5.1",
52
53
  ]
53
54
  phonopy = [
54
- "phonopy>=2.16.2,<=2.21.0",
55
- "spglib>=1.16.5,<=2.3.1",
55
+ "phonopy>=2.16.2,<=2.23.1",
56
+ "spglib>=1.16.5,<=2.4.0",
56
57
  ]
57
- pyxtal = ["pyxtal>=0.5.5,<=0.6.2"]
58
+ pyxtal = ["pyxtal>=0.5.5,<=0.6.6"]
58
59
 
59
60
  [tool.setuptools.packages.find]
60
61
  include = ["structuretoolkit*"]
@@ -37,6 +37,7 @@ from structuretoolkit.build import (
37
37
  grainboundary,
38
38
  high_index_surface,
39
39
  sqs_structures,
40
+ create_mesh,
40
41
  )
41
42
 
42
43
  # Common
@@ -51,6 +52,7 @@ from structuretoolkit.common import (
51
52
  get_wrapped_coordinates,
52
53
  pymatgen_to_ase,
53
54
  select_index,
55
+ get_cell,
54
56
  )
55
57
 
56
58
  # Visualize
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-02-12T08:28:49+0100",
11
+ "date": "2024-05-23T11:34:35-0500",
12
12
  "dirty": true,
13
13
  "error": null,
14
- "full-revisionid": "a6c09d88b2024ef8ca8a64c3249e94d55355b251",
15
- "version": "0.0.21"
14
+ "full-revisionid": "d365999a6d980c073a9aad91304db97456d42200",
15
+ "version": "0.0.23"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -1,6 +1,7 @@
1
1
  import numpy as np
2
2
 
3
3
  from structuretoolkit.analyse.distance import find_mic, get_distances_array
4
+ from structuretoolkit.analyse.dscribe import soap_descriptor_per_atom
4
5
  from structuretoolkit.analyse.neighbors import get_neighborhood, get_neighbors
5
6
  from structuretoolkit.analyse.phonopy import get_equivalent_atoms
6
7
  from structuretoolkit.analyse.pyscal import (
@@ -22,6 +23,11 @@ from structuretoolkit.analyse.spatial import (
22
23
  get_voronoi_vertices,
23
24
  )
24
25
  from structuretoolkit.analyse.strain import get_strain
26
+ from structuretoolkit.analyse.snap import (
27
+ get_snap_descriptor_names,
28
+ get_snap_descriptors_per_atom,
29
+ get_snap_descriptor_derivatives,
30
+ )
25
31
 
26
32
 
27
33
  def get_symmetry(
@@ -1,7 +1,15 @@
1
+ from typing import Optional
2
+ from ase.atoms import Atoms
1
3
  import numpy as np
2
4
 
3
5
 
4
- def get_distances_array(structure, p1=None, p2=None, mic=True, vectors=False):
6
+ def get_distances_array(
7
+ structure: Atoms,
8
+ p1: Optional[np.ndarray] = None,
9
+ p2: Optional[np.ndarray] = None,
10
+ mic: bool = True,
11
+ vectors: bool = False,
12
+ ):
5
13
  """
6
14
  Return distance matrix of every position in p1 with every position in
7
15
  p2. If p2 is not set, it is assumed that distances between all
@@ -39,7 +47,7 @@ def get_distances_array(structure, p1=None, p2=None, mic=True, vectors=False):
39
47
  return find_mic(structure=structure, v=diff_relative, vectors=vectors)
40
48
 
41
49
 
42
- def find_mic(structure, v, vectors=True):
50
+ def find_mic(structure: Atoms, v: np.ndarray, vectors: bool = True):
43
51
  """
44
52
  Find vectors following minimum image convention (mic). In principle this
45
53
  function does the same as ase.geometry.find_mic
@@ -0,0 +1,49 @@
1
+ import numpy as np
2
+ from ase.atoms import Atoms
3
+ from typing import Optional
4
+
5
+
6
+ def soap_descriptor_per_atom(
7
+ structure: Atoms,
8
+ r_cut: Optional[float] = None,
9
+ n_max: Optional[int] = None,
10
+ l_max: Optional[int] = None,
11
+ sigma: Optional[float] = 1.0,
12
+ rbf: str = "gto",
13
+ weighting: Optional[np.ndarray] = None,
14
+ average: str = "off",
15
+ compression: dict = {"mode": "off", "species_weighting": None},
16
+ species: Optional[list] = None,
17
+ periodic: bool = True,
18
+ sparse: bool = False,
19
+ dtype: str = "float64",
20
+ centers: Optional[np.ndarray] = None,
21
+ n_jobs: int = 1,
22
+ only_physical_cores: bool = False,
23
+ verbose: bool = False,
24
+ ) -> np.ndarray:
25
+ from dscribe.descriptors import SOAP
26
+
27
+ if species is None:
28
+ species = list(set(structure.get_chemical_symbols()))
29
+ periodic_soap = SOAP(
30
+ r_cut=r_cut,
31
+ n_max=n_max,
32
+ l_max=l_max,
33
+ sigma=sigma,
34
+ rbf=rbf,
35
+ weighting=weighting,
36
+ average=average,
37
+ compression=compression,
38
+ species=species,
39
+ periodic=periodic,
40
+ sparse=sparse,
41
+ dtype=dtype,
42
+ )
43
+ return periodic_soap.create(
44
+ system=structure,
45
+ centers=centers,
46
+ n_jobs=n_jobs,
47
+ only_physical_cores=only_physical_cores,
48
+ verbose=verbose,
49
+ )