code: def saltbridge(poscenter, negcenter, protispos):
      
      data = namedtuple(
          'saltbridge', 'positive negative distance protispos resnr restype reschain resnr_l restype_l reschain_l')
      pairings = []
      for pc, nc in itertools.product(poscenter, negcenter):
          if not config.MIN_DIST < euclidean3d(pc.center, nc.center) < config.SALTBRIDGE_DIST_MAX:
              continue
          resnr = pc.resnr if protispos else nc.resnr
          resnr_l = whichresnumber(nc.orig_atoms[0]) if protispos else whichresnumber(pc.orig_atoms[0])
          restype = pc.restype if protispos else nc.restype
          restype_l = whichrestype(nc.orig_atoms[0]) if protispos else whichrestype(pc.orig_atoms[0])
          reschain = pc.reschain if protispos else nc.reschain
          reschain_l = whichchain(nc.orig_atoms[0]) if protispos else whichchain(pc.orig_atoms[0])
          contact = data(positive=pc, negative=nc, distance=euclidean3d(pc.center, nc.center), protispos=protispos,
                         resnr=resnr, restype=restype, reschain=reschain, resnr_l=resnr_l, restype_l=restype_l,
                         reschain_l=reschain_l)
          pairings.append(contact)
      return filter_contacts(pairings)
docs: Detect all salt bridges (pliprofiler between centers of positive and negative charge)