コード例 #1
0
ファイル: SimpleSurfaces.py プロジェクト: engelund/CalcTroll
    def __init__(self,
                   material,
                   ):
        miller_indices = (1,1,1)
        crystal = BodyCenteredCubic(material)

        Surface3D.__init__(self,
                         crystal=crystal,
                         miller_indices=miller_indices,
                         surface_cell=((1,0),(-1, 2)),
                         )
コード例 #2
0
ファイル: Diamond001.py プロジェクト: engelund/CalcTroll
    def __init__(self, symbol, initial_state=DEFAULT, parameters=DEFAULT):
        surface = Diamond001(symbol=symbol)
        extra_atoms = surface.extraAtoms("minimal_unit_cell")
        extra_atoms = extra_atoms[:-2]

        Surface3D.__init__(
            self,
            crystal=surface.crystal(),
            miller_indices=surface.millerIndices(),
            surface_cell=surface.surfaceCell(),
            extra_atoms=extra_atoms,
            initial_state=initial_state,
            parameters=parameters,
        )
コード例 #3
0
ファイル: Diamond001.py プロジェクト: engelund/CalcTroll
    def __init__(self, symbol, parameters=DEFAULT):
        crystal = DiamondStructure(symbol=symbol)
        surface = Surface3D(crystal=crystal, miller_indices=(0, 0, 1), surface_cell=[[2, 0], [0, 1]])

        x_diff, height, h_height, h_add = self.SURFACE_RECONSTRUCTION[symbol]
        a_diff = surface.change(np.array([x_diff, 0, 0]), to="minimal_unit_cell", fro="orth_surface")[0]

        positions = np.array([[-a_diff / 2.0, 0, 1], [a_diff / 2.0, 0.0, 1]])
        positions = surface.change(positions, fro="minimal_unit_cell", to="orth_surface")
        positions[:, 2] = height
        h_positions = positions + np.array([[-h_add, 0, h_height], [h_add, 0, h_height]])
        positions = np.array(list(positions) + list(h_positions))
        positions = surface.change(positions, to="minimal_unit_cell", fro="orth_surface")
        extra_atoms = Atoms(crystal["symbol"] + "2H2", positions)

        Surface3D.__init__(
            self,
            crystal=surface["crystal"],
            miller_indices=surface["miller_indices"],
            surface_cell=surface["surface_cell"],
            extra_atoms=extra_atoms,
            parameters=parameters,
        )