Beispiel #1
0
    def __init__(
            self,
            symbol,
            parameters=DEFAULT,
            ):
        a = LATTICE_CONSTANTS = {'C': 3.567, 'Si':5.431, 'Ge': 5.658}[symbol]
        atom1 = Atom(symbol, a*np.array([0,0,0])     )
        atom2 = Atom(symbol, a*np.array([1,1,1])/(4.))
        cell = np.array([[0,1,1],[1,0,1],[1,1,0]])*a/2.
        atoms = Atoms([atom1, atom2], cell=cell, pbc=[True]*3)
        self.__symbol = symbol

        Crystal3D.__init__(self, atoms=atoms, parameters=parameters)
Beispiel #2
0
    def __init__(
            self,
            material,
            a=DEFAULT,
            parameters=DEFAULT,
            ):
        if a is DEFAULT:
            a = {'W':3.16}[material]
        atom = Atom(material, a*np.array([0,0,0])     )
        cell = np.array([[-1,1,1],[1,-1,1],[1,1,-1]])*a/2.
        atoms = Atoms([atom], cell=cell, pbc=[True]*3)

        self.__a = a

        Crystal3D.__init__(self, atoms=atoms)