selection.extend_by_residue() — extend selection by residue

This returns a new selection, in which any residues in the existing selection that have at least one selected atom are now entirely selected. Additionally, extension residues around each selected residue (by sequence) are also selected. The original selection is unchanged.
Example: See selection() command.

Automatic builds 2017-02-17