“cmd.orient” aligns the principal components of the atoms in the selection with the XYZ axes.
cmd.orient(string object-or-selection, int state, float animate)
def orient(selection="(all)", state=0, animate=0):
orient | api