docs: def secondary_structure_summary(dssp_df):
      """Summarize the secondary structure content of the DSSP dataframe for each chain.
  
      Args:
          dssp_df: Pandas DataFrame of parsed DSSP results
  
      Returns:
          dict: Chain to secondary structure summary dictionary
  
      """
      chains = dssp_df.chain.unique()
  
      infodict = {}
      for chain in chains:
          expoinfo = defaultdict(int)
          chain_df = dssp_df[dssp_df.chain == chain]
          counts = chain_df.ss.value_counts()
          total = float(len(chain_df))
  
          for ss, count in iteritems(counts):
              if ss == '-':
                  expoinfo['percent_C-dssp'] = count/total
              if ss == 'H':
                  expoinfo['percent_H-dssp'] = count/total
              if ss == 'B':
                  expoinfo['percent_B-dssp'] = count/total
              if ss == 'E':
                  expoinfo['percent_E-dssp'] = count/total
              if ss == 'G':
                  expoinfo['percent_G-dssp'] = count/total
              if ss == 'I':
                  expoinfo['percent_I-dssp'] = count/total
              if ss == 'T':
                  expoinfo['percent_T-dssp'] = count/total
              if ss == 'S':
                  expoinfo['percent_S-dssp'] = count/total
  
          # Filling in 0 percenters
          for per in ['percent_C-dssp','percent_H-dssp','percent_B-dssp','percent_E-dssp',
                      'percent_G-dssp','percent_I-dssp','percent_T-dssp','percent_S-dssp']:
              if per not in expoinfo:
                  expoinfo[per] = 0.0
  
          infodict[chain] = dict(expoinfo)
  
      return infodict