def test_simple_3d_structure(self):
     # Construct a structure representing a (3, 2, 4) group and assert
     # that the result is of the expected form.
     array_structures = {'a': ArrayStructure(1, [1, -1, 2]),
                         'b': ArrayStructure(3, [1, -1]),
                         'c': ArrayStructure(6, [1, -1, 2, 3])}
     structure = GroupStructure(24, array_structures, array_order='f')
     expected = ([('a', array_structures['a']),
                  ('b', array_structures['b']),
                  ('c', array_structures['c'])],)
     self.assertEqual(structure.possible_structures(), expected)
Example #2
0
 def test_simple_3d_structure(self):
     # Construct a structure representing a (3, 2, 4) group and assert
     # that the result is of the expected form.
     array_structures = {
         'a': ArrayStructure(1, [1, -1, 2]),
         'b': ArrayStructure(3, [1, -1]),
         'c': ArrayStructure(6, [1, -1, 2, 3])
     }
     structure = GroupStructure(24, array_structures, array_order='f')
     expected = ([('a', array_structures['a']),
                  ('b', array_structures['b']),
                  ('c', array_structures['c'])], )
     self.assertEqual(structure.possible_structures(), expected)
Example #3
0
 def test_simple_3d_structure(self):
     # Construct a structure representing a (3, 2, 4) group and assert
     # that the result is of the expected form.
     array_structures = {
         "a": ArrayStructure(1, [1, -1, 2]),
         "b": ArrayStructure(3, [1, -1]),
         "c": ArrayStructure(6, [1, -1, 2, 3]),
     }
     structure = GroupStructure(24, array_structures, array_order="f")
     expected = ([
         ("a", array_structures["a"]),
         ("b", array_structures["b"]),
         ("c", array_structures["c"]),
     ], )
     self.assertEqual(structure.possible_structures(), expected)
 def assert_potentials(self, length, array_structures, expected):
     structure = GroupStructure(length, array_structures, array_order='f')
     allowed = structure.possible_structures()
     names = [[name for (name, _) in allowed_structure]
              for allowed_structure in allowed]
     self.assertEqual(names, expected)
Example #5
0
 def assert_potentials(self, length, array_structures, expected):
     structure = GroupStructure(length, array_structures, array_order='f')
     allowed = structure.possible_structures()
     names = [[name for (name, _) in allowed_structure]
              for allowed_structure in allowed]
     self.assertEqual(names, expected)