code: def reorient_z(structure):
      
      struct = structure.copy()
      sop = get_rot(struct)
      struct.apply_operation(sop)
      return struct
docs: reorients a structure such that the z axis is concurrent with the
      normal to the A-B plane