Ejemplo n.º 1
0
 def test_list_methods(self):
     atoms1 = StructureAtoms()
     for Z in range(100, 0, -1):
         atoms1.append(StructureAtom(Z=Z))
     atoms1.sort(key=lambda a: a.Z)
     atoms2 = StructureAtoms()
     for Z in range(1, 101):
         atoms2.append(StructureAtom(Z=Z))
     assert_equal(atoms1, atoms2)
Ejemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self._atoms = StructureAtoms()
     self._crystal_cell = CrystalCell()