예제 #1
0
def dia_100_2x1(sym, a0):
    sym = string2symbols(sym)
    if len(sym) == 1:
        a = Diamond(sym[0],
                    size             = [2*nx, nx, nz],
                    latticeconstant  = a0,
                    directions=[ [1,-1,0], [1,1,0], [0,0,1] ]
                    )
    else:
        a = B3(sym,
               size             = [2*nx, nx, nz],
               latticeconstant  = a0,
               directions=[ [1,-1,0], [1,1,0], [0,0,1] ]
               )
    sx, sy, sz = a.get_cell().diagonal()
    a.translate([sx/(8*nx), sy/(8*nx), sz/(8*nz)])

    bulk = a.copy()
    
    for i in a:
        if i.z < sz/(4*nz) or i.z > sz-sz/(4*nz):
            if i.x < sx/2:
                i.x = i.x+0.5
            else:
                i.x = i.x-0.5

    return bulk, a
예제 #2
0
def dia_111(sym, a0):
    sym = string2symbols(sym)
    if len(sym) == 1:
        a = Diamond(sym[0],
                    size=[nx, nx, nz],
                    latticeconstant=a0,
                    directions=[[1, -1, 0], [1, 1, -2], [1, 1, 1]])
    else:
        a = B3(sym,
               size=[nx, nx, nz],
               latticeconstant=a0,
               directions=[[1, -1, 0], [1, 1, -2], [1, 1, 1]])
    sx, sy, sz = a.get_cell().diagonal()
    a.translate([sx / (12 * nx), sy / (4 * nx), sz / (12 * nz)])
    return a
예제 #3
0
def dia_111_pandey(sym, a0, nx=nx, ny=nx, nz=nz):
    """2x1 Pandey reconstructed (111) surface."""
    sym = string2symbols(sym)
    if len(sym) == 1:
        a = Diamond(sym[0],
                    size             = [nx, ny, nz],
                    latticeconstant  = a0,
                    directions=[ [1,-1,0], [1,1,-2], [1,1,1] ]
                    )
    else:
        a = B3(sym,
               size             = [nx, ny, nz],
               latticeconstant  = a0,
               directions=[ [1,-1,0], [1,1,-2], [1,1,1] ]
               )
    sx, sy, sz = a.get_cell().diagonal()
    a.translate([sx/(12*nx), sy/(4*ny), sz/(6*nz)])
    a.set_scaled_positions(a.get_scaled_positions()%1.0)

    bulk = a.copy()

    bondlen = a0*sqrt(3)/4

    x, y, z = a.positions.T
    mask = np.abs(z-z.max()) < 0.1*a0
    top1, top2 = np.arange(len(a))[mask].reshape(-1, 2).T
    mask = np.logical_and(np.abs(z-z.max()) < bondlen, np.logical_not(mask))
    topA, topB = np.arange(len(a))[mask].reshape(-1, 2).T
    y[topA] += bondlen/3
    y[topB] -= bondlen/3
    y[top1] += bondlen
    x[top1] += a.cell[0,0]/(2*nx)
    x[top2] += a.cell[0,0]/(2*nx)

    mask = np.abs(z-z.min()) < 0.1*a0
    bot1, bot2 = np.arange(len(a))[mask].reshape(-1, 2).T
    mask = np.logical_and(np.abs(z-z.min()) < bondlen, np.logical_not(mask))
    botA, botB = np.arange(len(a))[mask].reshape(-1, 2).T
    y[botA] += bondlen/3
    y[botB] -= bondlen/3
    y[bot2] -= bondlen
    x[bot2] += a.cell[0,0]/(2*nx)
    x[bot1] += a.cell[0,0]/(2*nx)

    a.set_scaled_positions(a.get_scaled_positions()%1.0)

    return bulk, a
예제 #4
0
###

sx         = 2
dx         = 1e-6
dev_thres  = 1e-4

###

tests  = [
    ( r6, dict(el1='Si', el2='Si', A=1.0, r0=1.0, cutoff=5.0),
      [ ( "dia-Si", Diamond("Si", size=[sx,sx,sx]) ) ] ),
    ( Brenner,   Erhart_PRB_71_035211_SiC,
      [ ( "dia-C", Diamond("C", size=[sx,sx,sx]) ),
        ( "dia-Si", Diamond("Si", size=[sx,sx,sx]) ),
        ( "dia-Si-C", B3( [ "Si", "C" ], latticeconstant=4.3596,
                          size=[sx,sx,sx]) ) ] ),
    ( BrennerScr, Erhart_PRB_71_035211_SiC__Scr,
      [ ( "dia-C", Diamond("C", size=[sx,sx,sx]) ),
        ( "dia-Si", Diamond("Si", size=[sx,sx,sx]) ),
        ( "dia-Si-C", B3( [ "Si", "C" ], latticeconstant=4.3596,
                          size=[sx,sx,sx]) ) ] ),
    ( Brenner,   Henriksson_PRB_79_114107_FeC,
      [ dict( name='dia-C', struct=Diamond('C', size=[sx,sx,sx]) ),
        dict( name='bcc-Fe',
              struct=BodyCenteredCubic('Fe', size=[sx,sx,sx]) ),
        dict( name='fcc-Fe',
              struct=FaceCenteredCubic('Fe', size=[sx,sx,sx],
                                       latticeconstant=3.6) ),
        dict( name='sc-Fe',
              struct=SimpleCubic('Fe', size=[sx,sx,sx], latticeconstant=2.4) ),
        dict( name='B1-Fe-C',
예제 #5
0
   [ ( "dia-C", Diamond("C", size=[sx,sx,sx]),
       # Ec    a0     C11   C12   C44   B    Cp
       None,   None,  None, None, None, None, None ),
     ] ),
 ( Brenner,   Brenner_PRB_42_9458_C_II,
   [ ( "dia-C", Diamond("C", size=[sx,sx,sx]),
       # Ec          a0     C11   C12  C44  B    Cp
       7.376-0.0524, 3.558, 621,  415, 383, 484, None ),
     ] ),
 ( Brenner,   Erhart_PRB_71_035211_SiC,
   [ ( "dia-C", Diamond("C", size=[sx,sx,sx]),
       # Ec    a0     C11   C12  C44  B    Cp
       7.3731, 3.566, 1082, 127, 673, 445, None ),
     dict( name="dia-Si", struct=Diamond("Si", size=[sx,sx,sx]),
           Ec=4.63, a0=5.429, C11=167, C12=65, C440=105, B=99 ),
     dict( name="dia-Si-C", struct=B3( [ "Si", "C" ], latticeconstant=4.3596,
                                       size=[sx,sx,sx]),
           Ec=6.340,a0=4.359, C11=382, C12=145, C440=305, B=224 ) ] ),
 ( BrennerScr,   Erhart_PRB_71_035211_SiC__Scr,
   [ ( "dia-C", Diamond("C", size=[sx,sx,sx]),
       # Ec    a0     C11   C12  C44  B    Cp
       7.3731, 3.566, 1082, 127, 673, 445, None ),
     dict( name="dia-Si", struct=Diamond("Si", size=[sx,sx,sx]),
           Ec=4.63, a0=5.429, C11=167, C12=65, C440=105, B=99 ),
     dict( name="dia-Si-C", struct=B3( [ "Si", "C" ], latticeconstant=4.3596,
                                       size=[sx,sx,sx]),
           Ec=6.340,a0=4.359, C11=382, C12=145, C440=305, B=224 ) ] ),
 ( Kumagai, Kumagai_CompMaterSci_39_457_Si,
   [ dict( name="dia-Si", struct=Diamond("Si", size=[sx,sx,sx]),
           Ec=4.630, a0=5.429, C11=166.4, C12=65.3, C440=120.9 ),
     ] ),
 ( KumagaiScr, Kumagai_CompMaterSci_39_457_Si__Scr,
예제 #6
0
             1082,
             127,
             673,
             445,
             None),
         dict(name="dia-Si",
              struct=Diamond("Si", size=[sx, sx, sx]),
              Ec=4.63,
              a0=5.429,
              C11=167,
              C12=65,
              C440=105,
              B=99),
         dict(name="dia-Si-C",
              struct=B3(["Si", "C"],
                        latticeconstant=4.3596,
                        size=[sx, sx, sx]),
              Ec=6.340,
              a0=4.359,
              C11=382,
              C12=145,
              C440=305,
              B=224)
     ]),
 (
     BrennerScr,
     Erhart_PRB_71_035211_SiC__Scr,
     [
         (
             "dia-C",
             Diamond("C", size=[sx, sx, sx]),