“cmd.alter_state” changes atom coordinates and flags over a particular state and selection using the Python evaluator with a temporary namespace for each atomic coordinate.
def alter_state(state, selection, expression, quiet=1, space=None, atomic=1):