4 space indentation (as suggested by PEP)

This commit is contained in:
Martin Diehl 2020-02-20 23:03:37 +01:00
parent a670ab269f
commit 16ed0623af
1 changed files with 637 additions and 639 deletions

View File

@ -66,6 +66,7 @@ class Rotation:
'Bunge Eulers / deg: ({:3.2f}, {:3.2f}, {:3.2f})'.format(*self.asEulers(degrees=True)), 'Bunge Eulers / deg: ({:3.2f}, {:3.2f}, {:3.2f})'.format(*self.asEulers(degrees=True)),
]) ])
def __mul__(self, other): def __mul__(self, other):
""" """
Multiplication. Multiplication.
@ -213,7 +214,8 @@ class Rotation:
def asRodrigues(self, def asRodrigues(self,
vector = False): vector = False):
""" """
Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True: [n_1, n_2, n_3] * tan(ω/2). Rodrigues-Frank vector representation [n_1, n_2, n_3, tan(ω/2)] unless vector == True:
[n_1, n_2, n_3] * tan(ω/2).
Parameters Parameters
---------- ----------
@ -614,16 +616,12 @@ class Symmetry:
epsilon = 0.0 epsilon = 0.0
if self.lattice == 'cubic': if self.lattice == 'cubic':
return R[0] >= R[1]+epsilon and R[1] >= R[2]+epsilon and R[2] >= epsilon return R[0] >= R[1]+epsilon and R[1] >= R[2]+epsilon and R[2] >= epsilon
elif self.lattice == 'hexagonal': elif self.lattice == 'hexagonal':
return R[0] >= math.sqrt(3)*(R[1]-epsilon) and R[1] >= epsilon and R[2] >= epsilon return R[0] >= math.sqrt(3)*(R[1]-epsilon) and R[1] >= epsilon and R[2] >= epsilon
elif self.lattice == 'tetragonal': elif self.lattice == 'tetragonal':
return R[0] >= R[1]-epsilon and R[1] >= epsilon and R[2] >= epsilon return R[0] >= R[1]-epsilon and R[1] >= epsilon and R[2] >= epsilon
elif self.lattice == 'orthorhombic': elif self.lattice == 'orthorhombic':
return R[0] >= epsilon and R[1] >= epsilon and R[2] >= epsilon return R[0] >= epsilon and R[1] >= epsilon and R[2] >= epsilon
else: else:
return True return True