def make_snapshots(frame, ignore):
    """Extract a subset of atoms from a given frame."""
    snapshot = {
        'header': 'Removed.',
        'box': frame['box'],
        'residunr': [],
        'residuname': [],
        'atomname': [],
        'atomnr': [],
        'x': [],
        'y': [],
        'z': [],
    }
    for key in ('residunr', 'residuname', 'atomname', 'atomnr', 'x', 'y', 'z'):
        for i, item in enumerate(frame[key]):
            if i not in ignore:
                snapshot[key].append(item)
    return snapshot