structuretoolkit 0.0.20__tar.gz → 0.0.22__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.
- {structuretoolkit-0.0.20/structuretoolkit.egg-info → structuretoolkit-0.0.22}/PKG-INFO +15 -13
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/pyproject.toml +13 -12
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/_version.py +3 -3
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/__init__.py +6 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/distance.py +10 -2
- structuretoolkit-0.0.22/structuretoolkit/analyse/dscribe.py +49 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/neighbors.py +129 -96
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/phonopy.py +4 -1
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/pyscal.py +26 -21
- structuretoolkit-0.0.22/structuretoolkit/analyse/snap.py +701 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/spatial.py +76 -50
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/strain.py +38 -21
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/analyse/symmetry.py +36 -29
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/aimsgb.py +16 -13
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/compound.py +16 -14
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/surface.py +25 -23
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/helper.py +23 -11
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/phonopy.py +5 -4
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/pymatgen.py +6 -3
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/pyscal.py +4 -1
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/visualize.py +104 -78
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22/structuretoolkit.egg-info}/PKG-INFO +15 -13
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit.egg-info/SOURCES.txt +4 -0
- structuretoolkit-0.0.22/structuretoolkit.egg-info/requires.txt +39 -0
- structuretoolkit-0.0.22/tests/test_dscribe.py +26 -0
- structuretoolkit-0.0.22/tests/test_snap.py +367 -0
- structuretoolkit-0.0.20/structuretoolkit.egg-info/requires.txt +0 -36
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/LICENSE +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/MANIFEST.in +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/README.md +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/setup.cfg +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/setup.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/__init__.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/__init__.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/random.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/build/sqs.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/__init__.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit/common/error.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit.egg-info/dependency_links.txt +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/structuretoolkit.egg-info/top_level.txt +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_aimsgb.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_analyse.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_compound.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_high_index_surface.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_neighbors.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_pymatgen.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_pyscal.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_pyxtal.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_strain.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_symmetry.py +0 -0
- {structuretoolkit-0.0.20 → structuretoolkit-0.0.22}/tests/test_visualize.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: structuretoolkit
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.22
|
|
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
|
|
@@ -51,28 +51,30 @@ 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.
|
|
54
|
+
Requires-Dist: scipy<=1.13.0,>=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.
|
|
57
|
-
Requires-Dist: pymatgen<=2024.1
|
|
58
|
+
Requires-Dist: aimsgb<=1.1.1,>=1.0.2; extra == "grainboundary"
|
|
59
|
+
Requires-Dist: pymatgen<=2024.3.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.
|
|
63
|
+
Requires-Dist: nglview<=3.1.2,>=2.7.7; extra == "nglview"
|
|
62
64
|
Provides-Extra: matplotlib
|
|
63
|
-
Requires-Dist: matplotlib==3.8.
|
|
65
|
+
Requires-Dist: matplotlib==3.8.3; extra == "matplotlib"
|
|
64
66
|
Provides-Extra: plotly
|
|
65
|
-
Requires-Dist: plotly<=5.
|
|
67
|
+
Requires-Dist: plotly<=5.19.0,>=4.14.3; extra == "plotly"
|
|
66
68
|
Provides-Extra: clusters
|
|
67
|
-
Requires-Dist: scikit-learn==1.4.
|
|
69
|
+
Requires-Dist: scikit-learn==1.4.1.post1; extra == "clusters"
|
|
68
70
|
Provides-Extra: symmetry
|
|
69
|
-
Requires-Dist: spglib<=2.3.
|
|
71
|
+
Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "symmetry"
|
|
70
72
|
Provides-Extra: surface
|
|
71
|
-
Requires-Dist: spglib<=2.3.
|
|
72
|
-
Requires-Dist: pymatgen<=2024.1
|
|
73
|
+
Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "surface"
|
|
74
|
+
Requires-Dist: pymatgen<=2024.3.1,>=2022.2.1; extra == "surface"
|
|
73
75
|
Provides-Extra: phonopy
|
|
74
|
-
Requires-Dist: phonopy<=2.
|
|
75
|
-
Requires-Dist: spglib<=2.3.
|
|
76
|
+
Requires-Dist: phonopy<=2.22.1,>=2.16.2; extra == "phonopy"
|
|
77
|
+
Requires-Dist: spglib<=2.3.1,>=1.16.5; extra == "phonopy"
|
|
76
78
|
Provides-Extra: pyxtal
|
|
77
79
|
Requires-Dist: pyxtal<=0.6.2,>=0.5.5; extra == "pyxtal"
|
|
78
80
|
|
|
@@ -26,7 +26,7 @@ classifiers = [
|
|
|
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.
|
|
29
|
+
"scipy>=1.9.3,<=1.13.0",
|
|
30
30
|
]
|
|
31
31
|
dynamic = ["version"]
|
|
32
32
|
|
|
@@ -36,23 +36,24 @@ 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.
|
|
41
|
-
"pymatgen>=2022.2.1,<=2024.1
|
|
41
|
+
"aimsgb>=1.0.2,<=1.1.1",
|
|
42
|
+
"pymatgen>=2022.2.1,<=2024.3.1",
|
|
42
43
|
]
|
|
43
44
|
pyscal = ["pyscal2==2.10.18"]
|
|
44
|
-
nglview = ["nglview>=2.7.7,<=3.1.
|
|
45
|
-
matplotlib = ["matplotlib==3.8.
|
|
46
|
-
plotly = ["plotly>=4.14.3,<=5.
|
|
47
|
-
clusters = ["scikit-learn==1.4.
|
|
48
|
-
symmetry = ["spglib>=1.16.5,<=2.3.
|
|
45
|
+
nglview = ["nglview>=2.7.7,<=3.1.2"]
|
|
46
|
+
matplotlib = ["matplotlib==3.8.3"]
|
|
47
|
+
plotly = ["plotly>=4.14.3,<=5.19.0"]
|
|
48
|
+
clusters = ["scikit-learn==1.4.1.post1"]
|
|
49
|
+
symmetry = ["spglib>=1.16.5,<=2.3.1"]
|
|
49
50
|
surface = [
|
|
50
|
-
"spglib>=1.16.5,<=2.3.
|
|
51
|
-
"pymatgen>=2022.2.1,<=2024.1
|
|
51
|
+
"spglib>=1.16.5,<=2.3.1",
|
|
52
|
+
"pymatgen>=2022.2.1,<=2024.3.1",
|
|
52
53
|
]
|
|
53
54
|
phonopy = [
|
|
54
|
-
"phonopy>=2.16.2,<=2.
|
|
55
|
-
"spglib>=1.16.5,<=2.3.
|
|
55
|
+
"phonopy>=2.16.2,<=2.22.1",
|
|
56
|
+
"spglib>=1.16.5,<=2.3.1",
|
|
56
57
|
]
|
|
57
58
|
pyxtal = ["pyxtal>=0.5.5,<=0.6.2"]
|
|
58
59
|
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-04-08T11:30:30-0500",
|
|
12
12
|
"dirty": true,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.0.
|
|
14
|
+
"full-revisionid": "cbb00e1ec4efc047fa4f1c31dfd34110952b834c",
|
|
15
|
+
"version": "0.0.22"
|
|
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(
|
|
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
|
+
)
|