clusterX 1.0.0.dev8__tar.gz → 2.1.0rc1__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.
- {clusterX-1.0.0.dev8/clusterX.egg-info → clusterX-2.1.0rc1}/PKG-INFO +4 -4
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1/clusterX.egg-info}/PKG-INFO +4 -4
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterX.egg-info/SOURCES.txt +6 -7
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterX.egg-info/entry_points.txt +0 -1
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterX.egg-info/requires.txt +3 -1
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/calculators/emt.py +2 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/commands.py +0 -6
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/test.py +4 -4
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/clusters/cluster.py +43 -65
- clusterX-2.1.0rc1/clusterx/clusters/clusters_pool.py +1520 -0
- clusterX-2.1.0rc1/clusterx/clusters_selector.py +609 -0
- clusterX-2.1.0rc1/clusterx/correlations.py +481 -0
- clusterX-2.1.0rc1/clusterx/derivative_structures.py +390 -0
- clusterX-2.1.0rc1/clusterx/estimators/estimator_factory.py +74 -0
- clusterX-2.1.0rc1/clusterx/model.py +741 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/parent_lattice.py +170 -33
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/structure.py +157 -34
- clusterX-2.1.0rc1/clusterx/structures_set.py +942 -0
- clusterX-2.1.0rc1/clusterx/super_cell.py +561 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/symmetry.py +25 -5
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_clathrate_mc.py +4 -2
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_cluster.py +10 -5
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_cluster_expansion.py +3 -1
- clusterX-2.1.0rc1/clusterx/test/test_cluster_orbit.py +485 -0
- clusterX-1.0.0.dev8/clusterx/test/test_cluster_orbit.py → clusterX-2.1.0rc1/clusterx/test/test_cluster_orbit2.py +72 -47
- clusterX-2.1.0rc1/clusterx/test/test_clusters_generation.py +345 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_clusters_selector.py +19 -5
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_clusters_selector_lasso.py +5 -4
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_concentration.py +2 -2
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_emt2_calculator.py +7 -8
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_folders.py +4 -3
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_get_unique_supercells.py +6 -3
- clusterX-2.1.0rc1/clusterx/test/test_metropolis.py +403 -0
- clusterX-2.1.0rc1/clusterx/test/test_predict_swap.py +105 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_structure_selector.py +23 -20
- clusterX-2.1.0rc1/clusterx/test/test_structures_set.py +61 -0
- clusterX-2.1.0rc1/clusterx/test/test_wanglandau.py +118 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/utils.py +479 -231
- clusterX-2.1.0rc1/clusterx/visualization.py +720 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/setup.py +2 -2
- clusterX-1.0.0.dev8/clusterx/clusters/clusters_pool.py +0 -885
- clusterX-1.0.0.dev8/clusterx/clusters_selector.py +0 -334
- clusterX-1.0.0.dev8/clusterx/clusters_selector_with_splitbregman.py +0 -392
- clusterX-1.0.0.dev8/clusterx/correlations.py +0 -284
- clusterX-1.0.0.dev8/clusterx/estimators/estimator_factory.py +0 -28
- clusterX-1.0.0.dev8/clusterx/estimators/split_bregman.py +0 -126
- clusterX-1.0.0.dev8/clusterx/model.py +0 -388
- clusterX-1.0.0.dev8/clusterx/monte_carlo.py +0 -595
- clusterX-1.0.0.dev8/clusterx/nested_sampling.py +0 -322
- clusterX-1.0.0.dev8/clusterx/structures_set.py +0 -732
- clusterX-1.0.0.dev8/clusterx/super_cell.py +0 -261
- clusterX-1.0.0.dev8/clusterx/test/_test_nested_sampling.py +0 -311
- clusterX-1.0.0.dev8/clusterx/test/test_cluster_selector_split_bregman.py +0 -114
- clusterX-1.0.0.dev8/clusterx/test/test_clusters_generation.py +0 -269
- clusterX-1.0.0.dev8/clusterx/test/test_metropolis.py +0 -326
- clusterX-1.0.0.dev8/clusterx/visualization.py +0 -419
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/COPYING +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/LICENSE.txt +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/MANIFEST.in +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/README.rst +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterX.egg-info/dependency_links.txt +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterX.egg-info/top_level.txt +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/calculators/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/main.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/plot_clusters.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cli/spacegroup.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/clusters/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/config.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/cross_validation.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/estimators/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/io/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/io/atat.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/io/formats.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/lattices.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/structure_selector.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/__init__.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_cluster_correlations.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_get_all_hnf.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_is_nary.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_lattice_representation.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/clusterx/test/test_parent_lattice_creation.py +0 -0
- {clusterX-1.0.0.dev8 → clusterX-2.1.0rc1}/setup.cfg +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 1
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: clusterX
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.0rc1
|
|
4
4
|
Summary: CELL (aka clusterX) is a python package for building Cluster Expansion models of simple and complex alloys and performing thermodynamical analyses of materials.
|
|
5
5
|
Home-page: http://sol.physik.hu-berlin.de/cell/
|
|
6
6
|
Author: CELL Developers
|
|
7
7
|
Author-email: srigamonti@physik.hu-berlin.de
|
|
8
8
|
License: http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
License-File: COPYING
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Metadata-Version: 1
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: clusterX
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.0rc1
|
|
4
4
|
Summary: CELL (aka clusterX) is a python package for building Cluster Expansion models of simple and complex alloys and performing thermodynamical analyses of materials.
|
|
5
5
|
Home-page: http://sol.physik.hu-berlin.de/cell/
|
|
6
6
|
Author: CELL Developers
|
|
7
7
|
Author-email: srigamonti@physik.hu-berlin.de
|
|
8
8
|
License: http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
License-File: COPYING
|
|
@@ -11,14 +11,12 @@ clusterX.egg-info/requires.txt
|
|
|
11
11
|
clusterX.egg-info/top_level.txt
|
|
12
12
|
clusterx/__init__.py
|
|
13
13
|
clusterx/clusters_selector.py
|
|
14
|
-
clusterx/clusters_selector_with_splitbregman.py
|
|
15
14
|
clusterx/config.py
|
|
16
15
|
clusterx/correlations.py
|
|
17
16
|
clusterx/cross_validation.py
|
|
17
|
+
clusterx/derivative_structures.py
|
|
18
18
|
clusterx/lattices.py
|
|
19
19
|
clusterx/model.py
|
|
20
|
-
clusterx/monte_carlo.py
|
|
21
|
-
clusterx/nested_sampling.py
|
|
22
20
|
clusterx/parent_lattice.py
|
|
23
21
|
clusterx/structure.py
|
|
24
22
|
clusterx/structure_selector.py
|
|
@@ -40,18 +38,16 @@ clusterx/clusters/cluster.py
|
|
|
40
38
|
clusterx/clusters/clusters_pool.py
|
|
41
39
|
clusterx/estimators/__init__.py
|
|
42
40
|
clusterx/estimators/estimator_factory.py
|
|
43
|
-
clusterx/estimators/split_bregman.py
|
|
44
41
|
clusterx/io/__init__.py
|
|
45
42
|
clusterx/io/atat.py
|
|
46
43
|
clusterx/io/formats.py
|
|
47
44
|
clusterx/test/__init__.py
|
|
48
|
-
clusterx/test/_test_nested_sampling.py
|
|
49
45
|
clusterx/test/test_clathrate_mc.py
|
|
50
46
|
clusterx/test/test_cluster.py
|
|
51
47
|
clusterx/test/test_cluster_correlations.py
|
|
52
48
|
clusterx/test/test_cluster_expansion.py
|
|
53
49
|
clusterx/test/test_cluster_orbit.py
|
|
54
|
-
clusterx/test/
|
|
50
|
+
clusterx/test/test_cluster_orbit2.py
|
|
55
51
|
clusterx/test/test_clusters_generation.py
|
|
56
52
|
clusterx/test/test_clusters_selector.py
|
|
57
53
|
clusterx/test/test_clusters_selector_lasso.py
|
|
@@ -64,4 +60,7 @@ clusterx/test/test_is_nary.py
|
|
|
64
60
|
clusterx/test/test_lattice_representation.py
|
|
65
61
|
clusterx/test/test_metropolis.py
|
|
66
62
|
clusterx/test/test_parent_lattice_creation.py
|
|
67
|
-
clusterx/test/
|
|
63
|
+
clusterx/test/test_predict_swap.py
|
|
64
|
+
clusterx/test/test_structure_selector.py
|
|
65
|
+
clusterx/test/test_structures_set.py
|
|
66
|
+
clusterx/test/test_wanglandau.py
|
|
@@ -35,6 +35,8 @@ ase.calculators.emt.parameters.update( {
|
|
|
35
35
|
'Ba': (-3.80, 3.00, 2.321, 1.674, 2.873, 2.182, 0.00703),#same as Au
|
|
36
36
|
'He': (-4.44, 2.60, 3.673, 1.669, 2.757, 1.948, 0.01030), #same as Ni
|
|
37
37
|
'Na': (-5.10, 1.88, 0.132, 1.652, 2.790, 1.892, 0.01222), #same as N
|
|
38
|
+
'Zn': (-3.51, 2.77, 2.376, 1.652, 2.740, 1.976, 0.01010), #very similar to Cu
|
|
39
|
+
'B': (-4.80, 1.83, 0.232, 1.652, 2.790, 1.892, 0.01252), #
|
|
38
40
|
'X': (-3.50, 1.81, 0.332, 1.652, 2.790, 1.892, 0.01322) #same as C
|
|
39
41
|
})
|
|
40
42
|
|
|
@@ -13,18 +13,12 @@ import plac
|
|
|
13
13
|
from os.path import dirname, basename, isfile
|
|
14
14
|
import glob
|
|
15
15
|
mods = glob.glob(dirname(__file__)+"/*.py")
|
|
16
|
-
#print('mods',mods)
|
|
17
16
|
|
|
18
17
|
modules = [ basename(f)[:-3] for f in mods if isfile(f) and not f.endswith('__init__.py') and not f.endswith('main.py') and not f.endswith('commands.py')]
|
|
19
|
-
#print('modules',modules)
|
|
20
|
-
|
|
21
18
|
|
|
22
19
|
# Finally the functions are included here
|
|
23
20
|
commands = [] # This array is needed by plac
|
|
24
21
|
for module in modules:
|
|
25
|
-
#print('#########################')
|
|
26
|
-
#print("module in for: ", #print('#########################') odule)
|
|
27
|
-
#print("commands: ",getattr(__import__('clusterx.cli.'+module,fromlist=[module]),'commands'))
|
|
28
22
|
for command in getattr(__import__('clusterx.cli.'+module,fromlist=[module]),'commands'):
|
|
29
23
|
commands.append(command)
|
|
30
24
|
setattr(sys.modules[__name__], command, getattr(__import__('clusterx.cli.'+module,fromlist=[module]),command))
|
|
@@ -25,8 +25,8 @@ def test(testslist=False, name=""):
|
|
|
25
25
|
print(path)
|
|
26
26
|
else:
|
|
27
27
|
path = os.path.dirname(tm.__file__)
|
|
28
|
-
|
|
29
|
-
pytest.main([path,"-v","--cache-clear","--capture=no","--disable-warnings","--junit-xml=testlog.xml"])
|
|
30
|
-
return ()
|
|
31
|
-
|
|
32
28
|
|
|
29
|
+
exit_code = pytest.main([path,"-v","--cache-clear","--capture=no","--disable-warnings","--junit-xml=testlog.xml","--html=testlog.html"])
|
|
30
|
+
if not exit_code == pytest.ExitCode.OK:
|
|
31
|
+
raise AssertionError(f"Tests have failed! pytest exit code: {exit_code}")
|
|
32
|
+
return ()
|
|
@@ -38,27 +38,22 @@ class Cluster():
|
|
|
38
38
|
|
|
39
39
|
**Methods:**
|
|
40
40
|
"""
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
for _iai, _ai in enumerate(atom_indexes):
|
|
44
|
-
if ai == _ai and atom_numbers[iai] != atom_numbers[_iai]:
|
|
45
|
-
raise ValueError("Cluster may not have different species on the same site.")
|
|
41
|
+
|
|
42
|
+
def __init__(self, atom_indexes, atom_numbers, super_cell=None, distances=None):
|
|
46
43
|
|
|
47
44
|
if len(atom_indexes) != len(atom_numbers):
|
|
48
45
|
raise ValueError("Initialization error, number of sites in cluster different from number of species.")
|
|
49
46
|
|
|
50
|
-
cl = super(Cluster,cls).__new__(cls)
|
|
51
|
-
cl.__init__(atom_indexes, atom_numbers, super_cell, distances)
|
|
52
|
-
return cl
|
|
53
|
-
|
|
54
|
-
def __init__(self, atom_indexes, atom_numbers, super_cell=None, distances=None):
|
|
55
|
-
#self.ais = np.array(atom_indexes)
|
|
56
|
-
#self.ans = np.array(atom_numbers)
|
|
57
47
|
if len(atom_indexes)!=0:
|
|
58
|
-
|
|
48
|
+
try:
|
|
49
|
+
self.ais,self.ans = list(zip(*sorted(zip(np.array(atom_indexes),np.array(atom_numbers)))))
|
|
50
|
+
except:
|
|
51
|
+
raise ValueError("Cluster initialization failed")
|
|
52
|
+
|
|
59
53
|
else:
|
|
60
54
|
self.ais = np.array(atom_indexes)
|
|
61
55
|
self.ans = np.array(atom_numbers)
|
|
56
|
+
|
|
62
57
|
self.npoints = len(atom_numbers)
|
|
63
58
|
self.positions_cartesian = None
|
|
64
59
|
self.alphas = None
|
|
@@ -75,11 +70,13 @@ class Cluster():
|
|
|
75
70
|
self.positions_cartesian = np.zeros((self.npoints,3))
|
|
76
71
|
#self.positions_scaled = np.zeros((self.npoints,3))
|
|
77
72
|
for ip, idx in enumerate(atom_indexes):
|
|
78
|
-
self.positions_cartesian[ip] = super_cell.get_positions(wrap=True)[idx]
|
|
73
|
+
#self.positions_cartesian[ip] = super_cell.get_positions(wrap=True)[idx]
|
|
74
|
+
self.positions_cartesian[ip] = super_cell.get_positions()[idx]
|
|
79
75
|
#self.positions_scaled[ip] = super_cell.get_scaled_positions(wrap=True)[idx]
|
|
80
76
|
self.site_type[ip] = tags[idx]
|
|
81
77
|
self.alphas[ip] = np.argwhere(sites[idx] == self.ans[ip])
|
|
82
78
|
|
|
79
|
+
"""
|
|
83
80
|
# Set radius
|
|
84
81
|
r = 0.0
|
|
85
82
|
if self.npoints > 1:
|
|
@@ -92,6 +89,25 @@ class Cluster():
|
|
|
92
89
|
if r < d:
|
|
93
90
|
r = d
|
|
94
91
|
self.radius = r
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
# Set radius
|
|
95
|
+
# FIX this! Radius cannot be based on distance in supercell, as it will fail for small supercells and large clusters wrapped into it.
|
|
96
|
+
r = 0.0
|
|
97
|
+
if self.npoints > 1:
|
|
98
|
+
if distances is not None:
|
|
99
|
+
for i1, idx1 in enumerate(self.ais):
|
|
100
|
+
for idx2 in self.ais[i1+1:]:
|
|
101
|
+
d = distances[idx1,idx2]
|
|
102
|
+
if r < d:
|
|
103
|
+
r = d
|
|
104
|
+
else:
|
|
105
|
+
for i1 in range(self.npoints-1):
|
|
106
|
+
for i2 in range(i1+1, self.npoints):
|
|
107
|
+
d = np.linalg.norm(self.positions_cartesian[i1]-self.positions_cartesian[i2])
|
|
108
|
+
if r < d:
|
|
109
|
+
r = d
|
|
110
|
+
self.radius = r
|
|
95
111
|
|
|
96
112
|
"""
|
|
97
113
|
def __lt__(self,other):
|
|
@@ -106,7 +122,7 @@ class Cluster():
|
|
|
106
122
|
"""
|
|
107
123
|
return self.alphas
|
|
108
124
|
|
|
109
|
-
def
|
|
125
|
+
def _compute_radius(self,distances):
|
|
110
126
|
r = 0.0
|
|
111
127
|
if self.npoints > 1:
|
|
112
128
|
for i1, idx1 in enumerate(self.ais):
|
|
@@ -117,10 +133,13 @@ class Cluster():
|
|
|
117
133
|
self.radius = r
|
|
118
134
|
|
|
119
135
|
def get_radius(self,distances=None):
|
|
136
|
+
"""Return cluster radius
|
|
137
|
+
The radius of a cluster is the maximum distance between any pair of its points.
|
|
138
|
+
"""
|
|
120
139
|
if self.radius is not None:
|
|
121
140
|
return self.radius
|
|
122
141
|
elif distances is not None:
|
|
123
|
-
self.
|
|
142
|
+
self._compute_radius(distances)
|
|
124
143
|
return self.radius
|
|
125
144
|
|
|
126
145
|
def _get_idxs_norm(self):
|
|
@@ -136,45 +155,14 @@ class Cluster():
|
|
|
136
155
|
else:
|
|
137
156
|
return self.npoints < other.npoints
|
|
138
157
|
|
|
158
|
+
def __repr__(self):
|
|
159
|
+
return "Cluster["+str(list(zip(self.ais,self.ans)))+"]"
|
|
160
|
+
|
|
161
|
+
def __hash__(self):
|
|
162
|
+
return hash(str(list(zip(self.ais,self.ans))))
|
|
163
|
+
|
|
139
164
|
def __eq__(self, other):
|
|
140
|
-
|
|
141
|
-
ais = self.ais
|
|
142
|
-
ans = self.ans
|
|
143
|
-
oais = other.ais
|
|
144
|
-
oans = other.ans
|
|
145
|
-
npoints = self.npoints
|
|
146
|
-
|
|
147
|
-
ns = len(ais)
|
|
148
|
-
no = len(oais)
|
|
149
|
-
if ns != no:
|
|
150
|
-
return False
|
|
151
|
-
|
|
152
|
-
#if Counter(ais) != Counter(oais):
|
|
153
|
-
# return False
|
|
154
|
-
|
|
155
|
-
#if sorted(ais) != sorted(oais):
|
|
156
|
-
# return False
|
|
157
|
-
|
|
158
|
-
for i in range(ns):
|
|
159
|
-
if ais[i] != oais[i] or ans[i] != oans[i]:
|
|
160
|
-
return False
|
|
161
|
-
|
|
162
|
-
#if (ais != oais).any():
|
|
163
|
-
# return False
|
|
164
|
-
|
|
165
|
-
#if (ans != oans).any():
|
|
166
|
-
# return False
|
|
167
|
-
|
|
168
|
-
"""
|
|
169
|
-
for i in range(npoints):
|
|
170
|
-
for j in range(npoints):
|
|
171
|
-
if ais[i] == oais[j] and ans[i] != oans[j]:
|
|
172
|
-
return False
|
|
173
|
-
"""
|
|
174
|
-
return True
|
|
175
|
-
|
|
176
|
-
else:
|
|
177
|
-
return False
|
|
165
|
+
return self.__hash__ == other.__hash__
|
|
178
166
|
|
|
179
167
|
def __len__(self):
|
|
180
168
|
return len(self.ais)
|
|
@@ -213,18 +201,8 @@ class Cluster():
|
|
|
213
201
|
The symmetry operations ``rr`` and ``tt`` refer to scaled coordinates.
|
|
214
202
|
The parameter ``cell`` contains row-wise the corresponding cartesian
|
|
215
203
|
coordinates of the cell vectors.
|
|
216
|
-
|
|
217
|
-
**Example:**
|
|
218
|
-
Getting the multiplicities of clusters in a clusters pool::
|
|
219
|
-
|
|
220
|
-
from clusterx.symmetry import get_spacegroup
|
|
221
|
-
sc_sg, sc_sym = get_spacegroup(parent_lattice) # Scaled to parent_lattice
|
|
222
|
-
m = []
|
|
223
|
-
for cl in clusters_pool.get_cpool():
|
|
224
|
-
m.append(cl.get_multiplicity(sc_sym["rotations"],sc_sym["translations"]))
|
|
225
|
-
|
|
226
204
|
"""
|
|
227
|
-
from clusterx.symmetry import
|
|
205
|
+
from clusterx.symmetry import get_scaled_positions, get_internal_translations, wrap_scaled_positions
|
|
228
206
|
|
|
229
207
|
orbit = []
|
|
230
208
|
for r,t in zip(rr,tt):
|