code: def res_belongs_to_bs(self, res, cutoff, ligcentroid):
          
          rescentroid = centroid([(atm.x(), atm.y(), atm.z()) for atm in pybel.ob.OBResidueAtomIter(res)])
          # Check geometry
          near_enough = True if euclidean3d(rescentroid, ligcentroid) < cutoff else False
          # Check chain membership
          restricted_chain = True if res.GetChain() in config.PEPTIDES else False
          return (near_enough and not restricted_chain)
docs: Check for each residue if its centroid is within a certain distance to the ligand centroid.
          Additionally checks if a residue belongs to a chain restricted by the user (e.g. by defining a peptide chain)