def getTrivialMapping(target, chain):
    """Returns lists of matching residues (map based on residue number)."""
    target_list = []
    chain_list = []
    n_match = 0
    n_mapped = 0
    chain_dict_get = chain._dict.get
    append = target_list.append
    for target_residue in target:
        append(target_residue.getResidue())
        chain_residue = chain_dict_get((target_residue.getResnum(),
            target_residue.getIcode()))
        if chain_residue is None:
            chain_list.append(chain_residue)
        else:
            if target_residue.getResname() == chain_residue.getResname():
                n_match += 1
            chain_list.append(chain_residue.getResidue())
            n_mapped += 1
    return target_list, chain_list, n_match, n_mapped
