def METHOD_NAME(contents) -> Molecule:
    """Convert a single frame XYZ string to a molecule."""
    lines = contents.split("\n")
    num_sites = int(lines[0])
    coords = []
    sp = []
    coord_pattern = re.compile(r"(\w+)\s+([0-9\-\+\.*^eEdD]+)\s+([0-9\-\+\.*^eEdD]+)\s+([0-9\-\+\.*^eEdD]+)")
    for i in range(2, 2 + num_sites):
        m = coord_pattern.search(lines[i])
        if m:
            sp.append(m.group(1))  # this is 1-indexed
            # this is 0-indexed
            # in case of 0.0D+00 or 0.00d+01 old double precision writing
            # replace d or D by e for ten power exponent,
            # and some files use *^ convention in place of e
            xyz = [val.lower().replace("d", "e").replace("*^", "e") for val in m.groups()[1:4]]
            coords.append([float(val) for val in xyz])
    return Molecule(sp, coords)