78def make_graphene_layer_from_basis(name: str, basis_frac_xy: list[tuple[float, float]]) -> Layer2D:
80 Construct a graphene layer from a specified two-atom in-plane basis.
84 lattice = gb.Lattice2D(A)
87 BasisAtom(label=
"C", frac_xy=np.array(basis_frac_xy[0]), z_rel=0.0, atom_type=1, charge=0.0),
88 BasisAtom(label=
"C", frac_xy=np.array(basis_frac_xy[1]), z_rel=0.0, atom_type=1, charge=0.0),
94 basis_atoms=basis_atoms,
99def make_mos2_layer_from_basis(
101 basis_data: list[tuple[str, tuple[float, float], float, int, float]],
104 Construct a MoS2 layer from a specified basis.
107 (label, frac_xy, z_rel, atom_type, charge)
111 lattice = gb.Lattice2D(A)
116 frac_xy=np.array(frac_xy, dtype=float),
118 atom_type=int(atom_type),
119 charge=float(charge),
121 for (label, frac_xy, z_rel, atom_type, charge)
in basis_data
127 basis_atoms=basis_atoms,