docs: def get_distance_to(self, origin=None, other_atoms=None, sort=False):
          """Return a Cartesian with a column for the distance from origin.
          """
          if origin is None:
              origin = np.zeros(3)
          elif pd.api.types.is_list_like(origin):
              origin = np.array(origin, dtype='f8')
          else:
              origin = self.loc[origin, ['x', 'y', 'z']]
  
          if other_atoms is None:
              other_atoms = self.index
  
          new = self.loc[other_atoms, :].copy()
          norm = np.linalg.norm
          try:
              new['distance'] = norm((new - origin).loc[:, ['x', 'y', 'z']],
                                     axis=1)
          except AttributeError:
              # Happens if molecule consists of only one atom
              new['distance'] = norm((new - origin).loc[:, ['x', 'y', 'z']])
          if sort:
              new.sort_values(by='distance', inplace=True)
          return new