@@ -152,7 +152,9 @@ def __init__(
152
152
def __str__ (self ):
153
153
"""
154
154
String representation of the AbstractGeometry
155
- :return: String representation of the AbstractGeometry.
155
+
156
+ Returns:
157
+ String representation of the AbstractGeometry.
156
158
"""
157
159
outs = [f"\n Abstract Geometry with { len (self .coords )} points :" ]
158
160
for pp in self .coords :
@@ -284,7 +286,8 @@ def symmetry_measure(points_distorted, points_perfect):
284
286
has to be computed with respect to the model polyhedron described by the list of points
285
287
"points_perfect".
286
288
:param points_perfect: List of "perfect" points describing a given model polyhedron.
287
- :return: The continuous symmetry measure of the distorted polyhedron with respect to the perfect polyhedron.
289
+ Returns:
290
+ The continuous symmetry measure of the distorted polyhedron with respect to the perfect polyhedron.
288
291
"""
289
292
# When there is only one point, the symmetry measure is 0.0 by definition
290
293
if len (points_distorted ) == 1 :
@@ -315,7 +318,8 @@ def find_rotation(points_distorted, points_perfect):
315
318
:param points_distorted: List of points describing a given (distorted) polyhedron for which the rotation that
316
319
aligns these points in a least-square sense to the set of perfect points "points_perfect"
317
320
:param points_perfect: List of "perfect" points describing a given model polyhedron.
318
- :return: The rotation matrix.
321
+ Returns:
322
+ The rotation matrix.
319
323
"""
320
324
H = np .matmul (points_distorted .T , points_perfect )
321
325
U , S , Vt = svd (H )
@@ -330,7 +334,9 @@ def find_scaling_factor(points_distorted, points_perfect, rot):
330
334
to be obtained.
331
335
:param points_perfect: List of "perfect" points describing a given model polyhedron.
332
336
:param rot: The rotation matrix
333
- :return: The scaling factor between the two structures and the rotated set of (distorted) points.
337
+
338
+ Returns:
339
+ The scaling factor between the two structures and the rotated set of (distorted) points.
334
340
"""
335
341
rotated_coords = np .matmul (rot , points_distorted .T ).T
336
342
num = np .tensordot (rotated_coords , points_perfect )
@@ -469,7 +475,8 @@ def get_structure(self):
469
475
"""
470
476
Returns the pymatgen Structure that has been setup for the identification of geometries (the initial one
471
477
might have been refined/symmetrized using the SpaceGroupAnalyzer).
472
- :return: The pymatgen Structure that has been setup for the identification of geometries (the initial one
478
+ Returns:
479
+ The pymatgen Structure that has been setup for the identification of geometries (the initial one
473
480
might have been refined/symmetrized using the SpaceGroupAnalyzer).
474
481
"""
475
482
return self .structure
@@ -583,7 +590,9 @@ def compute_structure_environments(
583
590
:param recompute: whether to recompute the sites already computed (when initial_structure_environments
584
591
is not None)
585
592
:param optimization: optimization algorithm
586
- :return: The StructureEnvironments object containing all the information about the coordination
593
+
594
+ Returns:
595
+ The StructureEnvironments object containing all the information about the coordination
587
596
environments in the structure.
588
597
"""
589
598
time_init = time .process_time ()
@@ -1121,7 +1130,8 @@ def setup_explicit_indices_local_geometry(self, explicit_indices):
1121
1130
def get_coordination_symmetry_measures (self , only_minimum = True , all_csms = True , optimization = None ):
1122
1131
"""
1123
1132
Returns the continuous symmetry measures of the current local geometry in a dictionary.
1124
- :return: the continuous symmetry measures of the current local geometry in a dictionary.
1133
+ Returns:
1134
+ the continuous symmetry measures of the current local geometry in a dictionary.
1125
1135
"""
1126
1136
test_geometries = self .allcg .get_implemented_geometries (len (self .local_geometry .coords ))
1127
1137
if len (self .local_geometry .coords ) == 1 :
@@ -1249,7 +1259,8 @@ def get_coordination_symmetry_measures_optim(
1249
1259
):
1250
1260
"""
1251
1261
Returns the continuous symmetry measures of the current local geometry in a dictionary.
1252
- :return: the continuous symmetry measures of the current local geometry in a dictionary.
1262
+ Returns:
1263
+ the continuous symmetry measures of the current local geometry in a dictionary.
1253
1264
"""
1254
1265
cn = len (self .local_geometry .coords )
1255
1266
test_geometries = self .allcg .get_implemented_geometries (cn )
@@ -1309,7 +1320,9 @@ def coordination_geometry_symmetry_measures(
1309
1320
the permutation setup. Depending on the parameters of the LocalGeometryFinder and on the coordination
1310
1321
geometry, different methods are called.
1311
1322
:param coordination_geometry: Coordination geometry for which the symmetry measures are looked for
1312
- :return: the symmetry measures of a given coordination_geometry for a set of permutations
1323
+
1324
+ Returns:
1325
+ the symmetry measures of a given coordination_geometry for a set of permutations
1313
1326
:raise: NotImplementedError if the permutation_setup does not exists.
1314
1327
"""
1315
1328
if tested_permutations :
@@ -1353,7 +1366,9 @@ def coordination_geometry_symmetry_measures_sepplane_optim(
1353
1366
the permutation setup. Depending on the parameters of the LocalGeometryFinder and on the coordination
1354
1367
geometry, different methods are called.
1355
1368
:param coordination_geometry: Coordination geometry for which the symmetry measures are looked for
1356
- :return: the symmetry measures of a given coordination_geometry for a set of permutations
1369
+
1370
+ Returns:
1371
+ the symmetry measures of a given coordination_geometry for a set of permutations
1357
1372
:raise: NotImplementedError if the permutation_setup does not exists.
1358
1373
"""
1359
1374
csms = []
@@ -1387,7 +1402,9 @@ def coordination_geometry_symmetry_measures_standard(
1387
1402
for the coordination geometry "coordination_geometry". Standard implementation looking for the symmetry
1388
1403
measures of each permutation
1389
1404
:param coordination_geometry: The coordination geometry to be investigated
1390
- :return: The symmetry measures for the given coordination geometry for each permutation investigated.
1405
+
1406
+ Returns:
1407
+ The symmetry measures for the given coordination geometry for each permutation investigated.
1391
1408
"""
1392
1409
# permutations_symmetry_measures = np.zeros(len(algo.permutations),
1393
1410
# np.float_)
@@ -1464,7 +1481,9 @@ def coordination_geometry_symmetry_measures_separation_plane(
1464
1481
Returns the symmetry measures of the given coordination geometry "coordination_geometry" using separation
1465
1482
facets to reduce the complexity of the system. Caller to the refined 2POINTS, 3POINTS and other ...
1466
1483
:param coordination_geometry: The coordination geometry to be investigated
1467
- :return: The symmetry measures for the given coordination geometry for each plane and permutation investigated.
1484
+
1485
+ Returns:
1486
+ The symmetry measures for the given coordination geometry for each plane and permutation investigated.
1468
1487
"""
1469
1488
permutations = []
1470
1489
permutations_symmetry_measures = []
@@ -1988,7 +2007,9 @@ def coordination_geometry_symmetry_measures_fallback_random(
1988
2007
of each permutation
1989
2008
:param coordination_geometry: The coordination geometry to be investigated
1990
2009
:param NRANDOM: Number of random permutations to be tested
1991
- :return: The symmetry measures for the given coordination geometry for each permutation investigated.
2010
+
2011
+ Returns:
2012
+ The symmetry measures for the given coordination geometry for each permutation investigated.
1992
2013
"""
1993
2014
permutations_symmetry_measures = [None ] * NRANDOM
1994
2015
permutations = []
0 commit comments