Inter-/intra-molecular RDF

Dear all,
I have a polymer system in which solfonic acid groups (-SO3) are attached to some of monomers of polymer backbone.
I want to know is it possible to calculate inter-molecular and intra-molecular parts of RDFs for sulfur (S) atoms using compute RDF command of LAMMPS?
thanks alot for your help

Sure, you have to group the sulfur atoms accordingly to calculate the
RDF. However, you would be better off doing a post processing.