def test4(): s = Graphene.from_conventional_cell(armchair_edge_length=5, zigzag_edge_length=5) assert_equals(s.zigzag_edge_length, 5) assert_equals(s.armchair_edge_length, 5) assert_true(isinstance(s.unit_cell, GrapheneConventionalCell)) print(s.unit_cell) assert_true(isinstance(s, ConventionalCellGraphene))
def __init__(self): super().__init__() self.conventional_cell_graphene = \ Graphene.from_conventional_cell(armchair_edge_length=1, zigzag_edge_length=1, basis=self.basis, bond=self.bond) self.primitive_cell_graphene = \ Graphene.from_primitive_cell(edge_length=1, basis=self.basis, bond=self.bond) # self._n = self._m = 10 self.structure = UnrolledSWNT((10, 10), basis=self.basis, bond=self.bond, nx=1, nz=1) self.nlayers = 1 self.layer_rotation_increment = 0.0 self.notify_observers()