@@ -398,9 +398,9 @@ def get_wyckoff(frac_coords, struct, symm_ops: Optional[list] = None, equiv_site
398
398
symm_dataset , unique_sites = _get_symm_dataset_of_struc_with_all_equiv_sites (
399
399
frac_coords , struct , symm_ops , symprec = symprec
400
400
)
401
- conv_cell_factor = len (symm_dataset [ " std_positions" ] ) / len (symm_dataset [ " wyckoffs" ] )
401
+ conv_cell_factor = len (symm_dataset . std_positions ) / len (symm_dataset . wyckoffs )
402
402
multiplicity = int (conv_cell_factor * len (unique_sites ))
403
- wyckoff_label = f"{ multiplicity } { symm_dataset [ ' wyckoffs' ] [- 1 ]} "
403
+ wyckoff_label = f"{ multiplicity } { symm_dataset . wyckoffs [- 1 ]} "
404
404
405
405
return (wyckoff_label , unique_sites ) if equiv_sites else wyckoff_label
406
406
@@ -1126,7 +1126,7 @@ def point_symmetry_from_defect(defect, symm_ops=None, symprec=0.01):
1126
1126
symm_dataset , _unique_sites = _get_symm_dataset_of_struc_with_all_equiv_sites (
1127
1127
defect .site .frac_coords , defect .structure , symm_ops = symm_ops , symprec = symprec
1128
1128
)
1129
- spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset [ " site_symmetry_symbols" ] [- 1 ])
1129
+ spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset . site_symmetry_symbols [- 1 ])
1130
1130
if spglib_point_group_symbol is not None :
1131
1131
return spglib_point_group_symbol
1132
1132
@@ -1240,7 +1240,7 @@ def point_symmetry_from_defect_entry(
1240
1240
# then easy, can just be taken from symmetry dataset of defect structure
1241
1241
symm_dataset = _get_sga (defect_entry .defect .structure , symprec = symprec ).get_symmetry_dataset ()
1242
1242
return schoenflies_from_hermann (
1243
- symm_dataset [ " site_symmetry_symbols" ] [defect_entry .defect .defect_site_index ]
1243
+ symm_dataset . site_symmetry_symbols [defect_entry .defect .defect_site_index ]
1244
1244
)
1245
1245
1246
1246
supercell = _get_defect_supercell (defect_entry ) if relaxed else _get_bulk_supercell (defect_entry )
@@ -1344,15 +1344,15 @@ def point_symmetry_from_defect_entry(
1344
1344
# This issue is avoided for relaxed defect supercells as we take the symm_ops of our reduced
1345
1345
# symmetry cell rather than that of the bulk (so no chance of spurious symmetry upgrade from
1346
1346
# equivalent sites), and hence the max point symmetry is the point symmetry of the defect
1347
- spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset [ " site_symmetry_symbols" ] [- 1 ])
1347
+ spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset . site_symmetry_symbols [- 1 ])
1348
1348
1349
1349
# Note that, if the supercell is non-periodicity-breaking, then the site symmetry can be simply
1350
1350
# determined using the point group of the unrelaxed defect structure:
1351
1351
# unrelaxed_defect_supercell = defect_entry.calculation_metadata.get(
1352
1352
# "unrelaxed_defect_structure", defect_supercell
1353
1353
# )
1354
1354
# return schoenflies_from_hermann(
1355
- # _get_sga(unrelaxed_defect_supercell, symprec).get_symmetry_dataset()[" pointgroup"] ,
1355
+ # _get_sga(unrelaxed_defect_supercell, symprec).get_symmetry_dataset(). pointgroup,
1356
1356
# )
1357
1357
# But current approach works for all cases with unrelaxed defect structures
1358
1358
@@ -1361,15 +1361,15 @@ def point_symmetry_from_defect_entry(
1361
1361
# the defect (e.g. for split-interstitials, split-vacancies, swapped vacancies etc),
1362
1362
# so use 'pointgroup' output (in this case the reduced symmetry avoids the symmetry-upgrade
1363
1363
# possibility with the equivalent sites, as when relaxed=False)
1364
- spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset [ " pointgroup" ] )
1364
+ spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset . pointgroup )
1365
1365
1366
1366
# This also works (at least for non-periodicity-breaking supercells) for relaxed defects in
1367
1367
# most cases, but is slightly less robust (more sensitive to ``symprec`` choice) than the
1368
1368
# approach above:
1369
1369
# schoenflies_from_hermann(
1370
1370
# _get_sga(
1371
1371
# defect_supercell, symprec=symprec
1372
- # ).get_symmetry_dataset()[" pointgroup"]
1372
+ # ).get_symmetry_dataset(). pointgroup
1373
1373
# )
1374
1374
1375
1375
if spglib_point_group_symbol is not None :
@@ -1416,7 +1416,7 @@ def _check_relaxed_defect_symmetry_determination(
1416
1416
1417
1417
if unrelaxed_defect_structure is not None :
1418
1418
unrelaxed_spglib_point_group_symbol = schoenflies_from_hermann (
1419
- _get_sga (unrelaxed_defect_structure , symprec = symprec ).get_symmetry_dataset ()[ " pointgroup" ] ,
1419
+ _get_sga (unrelaxed_defect_structure , symprec = symprec ).get_symmetry_dataset (). pointgroup ,
1420
1420
)
1421
1421
1422
1422
bulk_supercell = _get_bulk_supercell (defect_entry )
@@ -1428,9 +1428,7 @@ def _check_relaxed_defect_symmetry_determination(
1428
1428
symprec = symprec ,
1429
1429
dist_tol = symprec ,
1430
1430
)
1431
- bulk_spglib_point_group_symbol = schoenflies_from_hermann (
1432
- symm_dataset ["site_symmetry_symbols" ][- 1 ]
1433
- )
1431
+ bulk_spglib_point_group_symbol = schoenflies_from_hermann (symm_dataset .site_symmetry_symbols [- 1 ])
1434
1432
1435
1433
if bulk_spglib_point_group_symbol != unrelaxed_spglib_point_group_symbol :
1436
1434
if verbose :
0 commit comments