docs: def calc_surface_buried(dssp_df):
      '''Calculates the percent of residues that are in the surface or buried,
      as well as if they are polar or nonpolar. Returns a dictionary of this.
      '''
      SN = 0
      BN = 0
      SP = 0
      SNP = 0
      SPo = 0
      SNe = 0
      BNP = 0
      BP = 0
      BPo = 0
      BNe = 0
      Total = 0
  
      sbinfo = {}
  
      df_min = dssp_df[['aa_three', 'exposure_asa']]
  
      if len(df_min) == 0:
          return sbinfo
      else:
          for i, r in df_min.iterrows():
              res = r.aa_three
              area = r.exposure_asa
              if res in AAdict:
                  if AAdict[res] == 'nonpolar' and area > 3:
                      SNP = SNP + 1
                      SN = SN + 1
                  elif AAdict[res] == 'polar' and area > 3:
                      SP = SP + 1
                      SN = SN + 1
                  elif AAdict[res] == 'positive' and area > 3:
                      SPo = SPo + 1
                      SN = SN + 1
                  elif AAdict[res] == 'negative' and area > 3:
                      SNe = SNe + 1
                      SN = SN + 1
                  elif AAdict[res] == 'positive' and area <= 3:
                      BPo = BPo + 1
                      BN = BN + 1
                  elif AAdict[res] == 'negative' and area <= 3:
                      BNe = BNe + 1
                      BN = BN + 1
                  elif AAdict[res] == 'polar' and area <= 3:
                      BP = BP + 1
                      BN = BN + 1
                  elif AAdict[res] == 'nonpolar' and area <= 3:
                      BNP = BNP + 1
                      BN = BN + 1
          Total = float(BN + SN)
          pSNP = float(SNP) / Total
          pSP = float(SP) / Total
          pSPo = float(SPo) / Total
          pSNe = float(SNe) / Total
          pBNP = float(BNP) / Total
          pBP = float(BP) / Total
          pBPo = float(BPo) / Total
          pBNe = float(BNe) / Total
          pBN = float(BN) / Total
          pSN = float(SN) / Total
          sbinfo['ssb_per_S_NP'] = pSNP
          sbinfo['ssb_per_S_P'] = pSP
          sbinfo['ssb_per_S_pos'] = pSPo
          sbinfo['ssb_per_S_neg'] = pSNe
          sbinfo['ssb_per_B_NP'] = pBNP
          sbinfo['ssb_per_B_P'] = pBP
          sbinfo['ssb_per_B_pos'] = pBPo
          sbinfo['ssb_per_B_neg'] = pBNe
          sbinfo['ssb_per_S'] = pSN
          sbinfo['ssb_per_B'] = pBN
  
          return sbinfo