bsym.symmetry_group¶
-
class
bsym.symmetry_group.
SymmetryGroup
(symmetry_operations=[])[source]¶ Bases:
object
SymmetryGroup
class.A
SymmetryGroup
object contains a set ofSymmetryOperation
objects.e.g.:
SymmetryGroup( symmetry_operations=[ s1, s2, s3 ] )
where s1, s2, and s3 are
SymmetryOperation
objects.SymmetryGroup
objects can also be created from files using the class methods:SymmetryGroup.read_from_file( filename )
and:
SymmetryGroup.read_from_file_with_labels( filename )
-
append
(symmetry_operation)[source]¶ Append a
SymmetryOperation
to thisSymmetryGroup
.Parameters: symmetry_operation ( SymmetryOperation
) – TheSymmetryOperation
to add.Returns: self ( SymmetryGroup
)
-
by_label
(label)[source]¶ Returns the
SymmetryOperation
with a matching label.Parameters: label (str) – The label identifying the chosen symmetry operation. Returns: The symmetry operation that matches this label. Return type: ( SymmetryOperation
)
-
class_str
= 'SymmetryGroup'¶
-
extend
(symmetry_operations_list)[source]¶ Extend the list of symmetry operations in this
SymmetryGroup
.Parameters: symmetry_operations_list (list) – A list of SymmetryOperation
objects.Returns: self ( SymmetryGroup
)
-
labels
¶ A list of labels for each
SymmetryOperation
in this spacegroup.Parameters: None – Returns: A list of label strings. Return type: (list)
-
classmethod
read_from_file
(filename)[source]¶ Create a
SymmetryGroup
object from a file.The file format should be a series of numerical mappings representing each symmetry operation.
e.g. for a pair of equivalent sites:
# example input file to define the spacegroup for a pair of equivalent sites 1 2 2 1
Parameters: filename (str) – Name of the file to be read in. Returns: spacegroup (SymmetryGroup)
-
classmethod
read_from_file_with_labels
(filename)[source]¶ Create a
SymmetryGroup
object from a file, with labelled symmetry operations.The file format should be a series of numerical mappings representing each symmetry operation, prepended with a string that will be used as a label.
e.g. for a pair of equivalent sites:
# example input file to define the spacegroup for a pair of equivalent sites E 1 2 C2 2 1
Parameters: filename (str) – Name of the file to be read in. Returns: spacegroup (SymmetryGroup)
-
save_symmetry_operation_vectors_to
(filename)[source]¶ Save the set of vectors describing each symmetry operation in this
SymmetryGroup
to a file.Parameters: filename (str) – Name of the file to save to. Returns: None
-
size
¶
-