示例#1
0
def make_nacl_lattice(symbols, a):
    assert len(symbols) == 2
    cell = graingen.CubicUnitCell(a)
    node_pos = graingen.fcc_nodes[:]
    node_atoms = [
        (symbols[0], 0.0, 0.0, 0.0),
        (symbols[1], 0.5, 0.5, 0.5),
    ]
    return make_lattice(cell, node_pos, node_atoms)
示例#2
0
def make_zincblende_lattice(symbols, a):
    assert len(symbols) == 2
    cell = graingen.CubicUnitCell(a)
    # nodes in unit cell (as fraction of unit cell parameters)
    node_pos = graingen.fcc_nodes[:]
    # atoms in node (as fraction of unit cell parameters)
    node_atoms = [
        (symbols[0], 0.0, 0.0, 0.0),
        (symbols[1], 0.25, 0.25, 0.25),
    ]
    return make_lattice(cell, node_pos, node_atoms)
示例#3
0
def make_diamond_lattice(symbol, a):
    cell = graingen.CubicUnitCell(a)
    node_pos = get_diamond_node_pos()
    node_atoms = [(symbol, 0.0, 0.0, 0.0)]
    return make_lattice(cell, node_pos, node_atoms)
示例#4
0
def make_bcc_lattice(symbol, a):
    cell = graingen.CubicUnitCell(a)
    node_pos = graingen.bcc_nodes[:]
    node_atoms = [(symbol, 0.0, 0.0, 0.0)]
    return make_lattice(cell, node_pos, node_atoms)
示例#5
0
def make_simple_cubic_lattice(symbol, a):
    cell = graingen.CubicUnitCell(a)
    node = graingen.Node((0.0, 0.0, 0.0), [(symbol, 0.0, 0.0, 0.0)])
    return graingen.CrystalLattice(cell, [node])