Skip to content

Commit

Permalink
changed info of operations to molecule orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcarreras committed Mar 21, 2024
1 parent 4cab68f commit 268065e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
1 change: 0 additions & 1 deletion examples/operations_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@
print('Symmetry center: ', sm.center)
print('Group orientation Euler angles zyx (deg): ', sm.orientation_angles)

print('\nOperations list\n---------------')
sm.print_operations_info()
44 changes: 22 additions & 22 deletions posym/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,29 +278,29 @@ def get_oriented_operations(self):
def print_operations_info(self):
from posym.operations.permutation import Permutation

print('\nOperations list (molecule orientation)'
'\n--------------------------------------')
self._generate_permutation_set(self._angles)
for operation in self._pg.operations:
for op in self._pg.get_sub_operations(operation.label):

print('Operation object: ', op)
print('label:', op.label)
try:
print('Order:', op.order)
print('Exponent:', op.exp)
except AttributeError:
pass
try:
print('Axis:', op.axis)
except AttributeError:
pass

print('permutation:', op.permutation)
permutation = Permutation(op.permutation)
print('orbits: ', permutation.get_orbits())

print('Matrix representation:')
print(np.round(op.matrix_representation, decimals=6))
print()
for op in self.get_oriented_operations():
# print('Operation object: ', op)
print('label:', op.label)
try:
print('Order:', op.order)
print('Exponent:', op.exp)
except AttributeError:
pass
try:
print('Axis:', op.axis)
except AttributeError:
pass

print('permutation:', op.permutation)
permutation = Permutation(op.permutation)
print('orbits: ', permutation.get_orbits())

print('Matrix representation:')
print(np.round(op.matrix_representation, decimals=6))
print()

def _generate_permutation_set(self, angles, force_reset=False, use_aprox=True):

Expand Down

0 comments on commit 268065e

Please sign in to comment.