proc rotate_axis {vec deg {molid top}} { # get the current matrix lassign [molinfo $molid get rotate_matrix] curr # the transformation matrix set r [trans axis $vec $deg] # get the new matrix set m [transmult $r $curr] # and apply it to the molecule molinfo $molid set rotate_matrix "{ $m }" }