“cmd.protect” protects a set of atoms from tranformations performed using the editing features. This is most useful when you are modifying an internal portion of a chain or cycle and do not wish to affect the rest of the molecule.
cmd.protect(string selection)
def protect(selection="(all)", quiet=1):