예제 #1
0
    def test_creationFromPythonList(self):
        spaceGroup = SpaceGroupFactory.createSpaceGroup("P 63/m m c")

        # Construct python list of only certain symmetry operations
        symOps = [x for x in spaceGroup.getSymmetryOperations() if x.getOrder() == 6]

        group = Group(symOps)
        self.assertEqual(group.getOrder(), len(symOps))

        # But the constructed group is not actually a group
        self.assertFalse(group.isGroup())
예제 #2
0
    def test_creationFromPythonList(self):
        spaceGroup = SpaceGroupFactory.createSpaceGroup("P 63/m m c")

        # Construct python list of only certain symmetry operations
        symOps = [x for x in spaceGroup.getSymmetryOperations() if x.getOrder() == 6]

        group = Group(symOps)
        self.assertEqual(group.getOrder(), len(symOps))

        # But the constructed group is not actually a group
        self.assertFalse(group.isGroup())
예제 #3
0
    def test_creationFromVector(self):
        spaceGroup = SpaceGroupFactory.createSpaceGroup("P 63/m m c")
        symOps = spaceGroup.getSymmetryOperations()

        group = Group(symOps)
        self.assertEqual(group.getOrder(), spaceGroup.getOrder())
예제 #4
0
    def test_creationFromString(self):
        group = Group('x,y,z')
        self.assertEqual(group.getOrder(), 1)

        self.assertRaises(RuntimeError, Group, 'invalid')
예제 #5
0
    def test_creationFromVector(self):
        spaceGroup = SpaceGroupFactory.createSpaceGroup("P 63/m m c")
        symOps = spaceGroup.getSymmetryOperations()

        group = Group(symOps)
        self.assertEqual(group.getOrder(), spaceGroup.getOrder())
예제 #6
0
    def test_creationFromString(self):
        group = Group('x,y,z')
        self.assertEqual(group.getOrder(), 1)

        self.assertRaises(RuntimeError, Group, 'invalid')