docs: def _build_zmat(self, construction_table):
          """Create the Zmatrix from a construction table.
  
          Args:
              Construction table (pd.DataFrame):
  
          Returns:
              Zmat: A new instance of :class:`Zmat`.
          """
          c_table = construction_table
          default_cols = ['atom', 'b', 'bond', 'a', 'angle', 'd', 'dihedral']
          optional_cols = list(set(self.columns) - {'atom', 'x', 'y', 'z'})
  
          zmat_frame = pd.DataFrame(columns=default_cols + optional_cols,
                                    dtype='float', index=c_table.index)
  
          zmat_frame.loc[:, optional_cols] = self.loc[c_table.index,
                                                      optional_cols]
  
          zmat_frame.loc[:, 'atom'] = self.loc[c_table.index, 'atom']
          zmat_frame.loc[:, ['b', 'a', 'd']] = c_table
  
          zmat_values = self._calculate_zmat_values(c_table)
          zmat_frame.loc[:, ['bond', 'angle', 'dihedral']] = zmat_values
  
          zmatrix = Zmat(zmat_frame, metadata=self.metadata,
                         _metadata={'last_valid_cartesian': self.copy()})
          return zmatrix