“cmd.replace” replaces the picked atom with a new atom.
cmd.replace(string element, int geometry, int valence, int h_fill, string name)
def replace(element, geometry, valence, h_fill=1, name="", quiet=1):
replace | api