Open xivh opened 8 months ago
Feel free to write a libcasm.xtal.make_default_structure(prim: libcasm.xtal.Prim)
function. For most cases, I think it is:
default_structure = xtal.Structure(
lattice=prim.lattice(),
atom_coordinate_frac=prim.coordinate_frac(),
atom_type=[x[0] for x in prim.occ_dof()],
)
Maybe you also want checks for vacancies, and a include_vacancies: bool
argument.
It would be nice to have a function which constructs the default structure (first occupant at each site) from a prim.