“cmd.dihedral” shows dihedral angles formed between any four atoms.
cmd.dihedral(string name, string selection1, string selection2, string selection3, string selection4)
def dihedral(name=None, selection1="(pk1)", selection2="(pk2)", selection3="(pk3)", selection4="(pk4)", mode=None, label=1, reset=0, zoom=0, state=0, quiet=1):