“cmd.valence” modifies the valences of all existing bonds formed between two atom selections.
cmd.valence(string selection1, selection2)
def valence(order, selection1=None, selection2=None, source='', target_state=0, source_state=0, reset=1, quiet=1):