def get_filtered_atom_list(struct):
    """Filters out unwanted atoms in PDB structure.

    Removes heteroatoms from atoms when finding neighbor residues.

    Parameters
    ----------
    struct : Bio.PDB structure
        biopython structure object

    Returns
    -------
    atom_list : list
        list of atoms after filtering
    """
    atom_list = []
    for model in struct:
        for chain in model:
            for residue in chain:
                # ignore hetero residues
                if not (residue.get_full_id()[3][0] == ' '):
                    continue

                # add residue atoms
                atom_list.extend(residue.get_list())
    return atom_list