def METHOD_NAME(cls, structure: Structure) -> StructureData:
    """
    Initialize the model from a Structure.
    """
    from pymatgen.symmetry.analyzer import SpacegroupAnalyzer, spglib
    # 0.1 is the value used in Materials Project. 5.0 is the default value for angles.
    symprec, angle_tolerance = 0.1, 5.0
    sg = SpacegroupAnalyzer(structure, symprec=symprec, angle_tolerance=angle_tolerance)
    #symmetry: Dict[str, Any] = {"symprec": symprec}
    if not sg.get_symmetry_dataset():
        symprec, angle_tolerance = 1e-3, 51
        sg = SpacegroupAnalyzer(structure, symprec=symprec, angle_tolerance=angle_tolerance)
    #symmetry.update(
    symmetry = {
            "spg_symbol": sg.get_space_group_symbol(),
            "spg_number": sg.get_space_group_number(),
            "point_group": sg.get_point_group_symbol(),
            "crystal_system": CrystalSystem(sg.get_crystal_system().title()),
            #"hall": sg.get_hall(),
            "spglib_version": spglib.__version__,
            "symprec": symprec,
            "angle_tolerance": angle_tolerance,
        }
    #)
    comp = structure.composition.remove_charges()
    elsyms = sorted(set([str(e.symbol) for e in comp.elements]))
    #symmetry = SymmetryData.from_structure(structure)
    data = {
        "nsites": structure.num_sites,
        "elements": elsyms,
        "nelements": len(elsyms),
        "composition": comp,
        "composition_reduced": comp.reduced_composition,
        "formula_pretty": comp.reduced_formula,
        "formula_anonymous": comp.anonymized_formula,
        "chemsys": "-".join(elsyms),
        "volume": structure.volume,
        "density": structure.density,
        "density_atomic": structure.volume / structure.num_sites,
        #"symmetry": symmetry,
    }
    structure = Structure.as_structure(structure)  #.copy()
    symmetry.update(data)
    return cls(structure=structure, **symmetry)