@@ -411,10 +411,6 @@ def as_dict(self) -> dict[str, Any]:
411
411
"tolerance" : self .tol ,
412
412
}
413
413
414
- @np .deprecate (message = "Use as_xyz_str instead" )
415
- def as_xyz_string (self , * args , ** kwargs ): # noqa: D102
416
- return self .as_xyz_str (* args , ** kwargs )
417
-
418
414
def as_xyz_str (self ) -> str :
419
415
"""Returns a string of the form 'x, y, z', '-x, -y, z', '-y+1/2, x+1/2, z+1/2', etc.
420
416
Only works for integer rotation matrices.
@@ -425,11 +421,6 @@ def as_xyz_str(self) -> str:
425
421
426
422
return transformation_to_string (self .rotation_matrix , translation_vec = self .translation_vector , delim = ", " )
427
423
428
- @classmethod
429
- @np .deprecate (message = "Use from_xyz_str instead" )
430
- def from_xyz_string (cls , * args , ** kwargs ): # noqa: D102
431
- return cls .from_xyz_str (* args , ** kwargs )
432
-
433
424
@classmethod
434
425
def from_xyz_str (cls , xyz_str : str ) -> SymmOp :
435
426
"""
@@ -501,7 +492,7 @@ def __eq__(self, other: object) -> bool:
501
492
)
502
493
503
494
def __str__ (self ) -> str :
504
- return self .as_xyzt_string ()
495
+ return self .as_xyzt_str ()
505
496
506
497
def __repr__ (self ) -> str :
507
498
output = [
@@ -584,36 +575,27 @@ def from_rotation_and_translation_and_time_reversal(
584
575
return MagSymmOp .from_symmop (symm_op , time_reversal )
585
576
586
577
@classmethod
587
- @np .deprecate (message = "Use from_xyzt_str instead" )
588
- def from_xyzt_string (cls , * args , ** kwargs ): # noqa: D102
589
- return cls .from_xyzt_str (* args , ** kwargs )
590
-
591
- @classmethod
592
- def from_xyzt_str (cls , xyzt_string : str ) -> MagSymmOp :
578
+ def from_xyzt_str (cls , xyzt_str : str ) -> MagSymmOp :
593
579
"""
594
580
Args:
595
- xyzt_string (str): of the form 'x, y, z, +1', '-x, -y, z, -1',
581
+ xyzt_str (str): of the form 'x, y, z, +1', '-x, -y, z, -1',
596
582
'-2y+1/2, 3x+1/2, z-y+1/2, +1', etc.
597
583
598
584
Returns:
599
585
MagSymmOp object
600
586
"""
601
- symm_op = SymmOp .from_xyz_string ( xyzt_string .rsplit ("," , 1 )[0 ])
587
+ symm_op = SymmOp .from_xyz_str ( xyzt_str .rsplit ("," , 1 )[0 ])
602
588
try :
603
- time_reversal = int (xyzt_string .rsplit ("," , 1 )[1 ])
589
+ time_reversal = int (xyzt_str .rsplit ("," , 1 )[1 ])
604
590
except Exception :
605
591
raise Exception ("Time reversal operator could not be parsed." )
606
592
return cls .from_symmop (symm_op , time_reversal )
607
593
608
- @np .deprecate (message = "Use as_xyzt_str instead" )
609
- def as_xyzt_string (self , * args , ** kwargs ): # noqa: D102
610
- return self .as_xyzt_str (* args , ** kwargs )
611
-
612
594
def as_xyzt_str (self ) -> str :
613
595
"""Returns a string of the form 'x, y, z, +1', '-x, -y, z, -1',
614
596
'-y+1/2, x+1/2, z+1/2, +1', etc. Only works for integer rotation matrices.
615
597
"""
616
- xyzt_string = SymmOp .as_xyz_string (self )
598
+ xyzt_string = SymmOp .as_xyz_str (self )
617
599
return f"{ xyzt_string } , { self .time_reversal :+} "
618
600
619
601
def as_dict (self ) -> dict [str , Any ]:
0 commit comments