def new_structure_from_substitution( parent_structure, site_substitution_index, new_species_list ):
    """
    Generate a new pymatgen ``Structure`` from site substitution parameters.

    Args:
        parent_structure (Structure):        The parent pymatgen ``Struture`` object.
        site_substitution_index (list[int]): The list of site indices to be substituted.
        new_species_list (list[str]):        A list of the replacement atomic species.
    
    Returns:
        (``Structure``): The new pymatgen ``Structure``.

    Notes:
        pymatgen ``Structure`` and ``Molecule`` classes both subclass ``SiteCollection``.
        This function will also accept a parent ``Molecule`` object, and return a new
        ``Molecule``.
    """
    if len( site_substitution_index ) != len( new_species_list ):
        raise ValueError
    if any( i >= len( parent_structure ) for i in site_substitution_index ):
        raise ValueError
    s = parent_structure.copy()
    for i, spec in zip( site_substitution_index, new_species_list ):
        s[i] = spec
    return s