示例#1
0
 def test_as_vector_counting_from_zero( self ):
     matrix = np.array( [ [ 1, 0 ], [ 0, 1 ] ] )
     so = SymmetryOperation( matrix )
     self.assertEqual( so.as_vector( count_from_zero=True ), [ 0, 1 ] )
示例#2
0
 def test_as_vector_counting_from_zero(self):
     matrix = np.array([[1, 0], [0, 1]])
     so = SymmetryOperation(matrix)
     self.assertEqual(so.as_vector(count_from_zero=True), [0, 1])
示例#3
0
 def test_as_vector( self ):
     matrix = np.array( [ [ 0, 0, 1 ], [ 1, 0, 0 ], [ 0, 1, 0 ] ] )
     so = SymmetryOperation( matrix )
     self.assertEqual( so.as_vector(), [ 2, 3, 1 ] )
示例#4
0
 def test_as_vector(self):
     matrix = np.array([[0, 0, 1], [1, 0, 0], [0, 1, 0]])
     so = SymmetryOperation(matrix)
     self.assertEqual(so.as_vector(), [2, 3, 1])