Selection.only_residue_types() — select only atoms of given residue type

only_residue_types(residue_types)
This returns a new selection containing only atoms from the current selection in residues of the given space-separated type(s). The type is the CHARMM name, as defined in 'modlib/restyp.lib'.
Example: See Selection() command.