Beispiel #1
0
            if ((np.dot(point_2, c3xc1) > 0) and (np.dot(point_2, c2xc3) > 0)
                    and (np.dot(point_2, c1xc2) > 0) and (np.dot(
                        (point_2 - c3), c1xc2) <= 0) and (np.dot(
                            (point_2 - c2), c3xc1) <= 0) and (np.dot(
                                (point_2 - c1), c2xc3) <= 0)):
                ats.append(Atom('Fe', position=Fe_2))

if sup_cell == "sup_1":
    ats.append(Atom('Fe', position=(c2 + 0.5 * c3)))

if core_type == "easy":
    brg_vec = c3
elif core_type == "hard":
    brg_vec = -c3
else:
    sys.exit("bad_brg_vec")

ats = quipAtoms(ats)
ats.set_cutoff(3.0)
ats.calc_connect()
core = 0.25 * c1 + 0.5 * c2 + 0.5 * c3
disloc_l = c3
disloc_noam(ats, core, disloc_l, brg_vec)

core = 0.75 * c1 + 0.5 * c2 + 0.5 * c3
disloc_l = c3
disloc_noam(ats, core, disloc_l, -brg_vec)

ats.set_cell([c1, c2, c3], scale_atoms=False)
ats.write("screw.xyz")