Beispiel #1
0
def test_add_interstitial(cubic_supercell_info_wo_int):
    primitive = Structure(Lattice.rhombohedral(7.071068, 60),
                          species=["H", "He"],
                          coords=[[0.0]*3, [0.5]*3])
    new_supercell_info = append_interstitial(cubic_supercell_info_wo_int,
                                             primitive,
                                             [[1/4, 1/4, 1/4]],
                                             infos=["test1"])
    expected = Interstitial(frac_coords=[1/8, 1/8, 1/8],
                            site_symmetry="-43m",
                            info="test1")
    assert new_supercell_info.interstitials[0] == expected
Beispiel #2
0
def cubic_supercell_info_wo_int(cubic_supercell):
    sites = {
        "H1":
        Site(element="H",
             wyckoff_letter="a",
             site_symmetry="m-3m",
             equivalent_atoms=[0, 1, 2, 3]),
        "He1":
        Site(element="He",
             wyckoff_letter="b",
             site_symmetry="m-3m",
             equivalent_atoms=[4, 5, 6, 7])
    }
    unitcell = Structure(Lattice.rhombohedral(7.071068, 60),
                         species=["H", "He"],
                         coords=[[0.0] * 3, [0.5] * 3])
    return SupercellInfo(cubic_supercell,
                         "Fm-3m", [[-2, 2, 2], [2, -2, 2], [2, 2, -2]],
                         sites,
                         unitcell_structure=unitcell)
Beispiel #3
0
def rhombohedral():
    lattice = Lattice.rhombohedral(a=1, alpha=45)
    coords = [[0.0, 0.0, 0.0]]
    return IStructure(lattice=lattice, species=["H"], coords=coords)