Selection.only_sidechain() — select only sidechain atoms

only_sidechain()
This returns a new selection containing only sidechain atoms from the current selection. It is the opposite of Selection.only_mainchain().