@@ -3352,7 +3352,7 @@ def get_symmetry_dataset(self, backend: Literal["moyopy"], **kwargs) -> moyopy.M
3352
3352
def get_symmetry_dataset (self , backend : Literal ["spglib" ], ** kwargs ) -> spglib .SpglibDataset : ...
3353
3353
3354
3354
def get_symmetry_dataset (
3355
- self , backend : Literal ["moyopy" , "spglib" ] = "spglib" , return_raw_dataset = False , ** kwargs
3355
+ self , backend : Literal ["moyopy" , "spglib" ] = "spglib" , return_raw_dataset = False , symprec : float = 1e-2 , ** kwargs
3356
3356
) -> dict | moyopy .MoyoDataset | spglib .SpglibDataset :
3357
3357
"""Get a symmetry dataset from the structure using either moyopy or spglib backend.
3358
3358
@@ -3368,6 +3368,7 @@ def get_symmetry_dataset(
3368
3368
return_raw_dataset (bool): Whether to return the raw Dataset object from the backend. The default is
3369
3369
False, which returns a dict with a common subset of the data present in both datasets. If you use the
3370
3370
raw Dataset object, we do not guarantee that the format of the output is not going to change.
3371
+ symprec (float): Tolerance for symmetry determination. Defaults to 0.01 A.
3371
3372
**kwargs: Additional arguments passed to the respective backend's constructor.
3372
3373
For spglib, these are passed to SpacegroupAnalyzer (e.g. symprec, angle_tolerance).
3373
3374
For moyopy, these are passed to MoyoDataset constructor.
@@ -3391,12 +3392,12 @@ def get_symmetry_dataset(
3391
3392
3392
3393
# Convert structure to MoyoDataset format
3393
3394
moyo_cell = moyopy .interface .MoyoAdapter .from_structure (self )
3394
- dataset = moyopy .MoyoDataset (cell = moyo_cell , ** kwargs )
3395
+ dataset = moyopy .MoyoDataset (cell = moyo_cell , symprec = symprec , ** kwargs )
3395
3396
3396
3397
else :
3397
3398
from pymatgen .symmetry .analyzer import SpacegroupAnalyzer
3398
3399
3399
- sga = SpacegroupAnalyzer (self , ** kwargs )
3400
+ sga = SpacegroupAnalyzer (self , symprec = symprec , ** kwargs )
3400
3401
dataset = sga .get_symmetry_dataset ()
3401
3402
3402
3403
if return_raw_dataset :
0 commit comments