Selection.only_het_residues() — select only HETATM residues

only_het_residues()
This returns a new selection containing only atoms from the current selection in HETATM residues.