예제 #1
0
def test1():
    s = Graphene(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, ConventionalCellGraphene))
    assert_true(isinstance(s.unit_cell, GrapheneConventionalCell))
    print(s.unit_cell)
예제 #2
0
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))
예제 #3
0
    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()
예제 #4
0
    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()
예제 #5
0
def test5():
    s = Graphene.from_primitive_cell(edge_length=5)
    assert_true(isinstance(s, PrimitiveCellGraphene))
    assert_true(isinstance(s.unit_cell, GraphenePrimitiveCell))