Inter-/intra-molecular RDF

Thanks Goswami,
in my system, i have four polymer chains and in each of them there are 10 sulfonic acid groups,
with putting all sulfur atoms into a single group, the total RDF for sulfur atoms can be obtained.
however, if i put sulfur atoms of each chain in a specific group, intera-molecular RDF for sulfur atoms of each chain is calculated.
so, is it true to calculate the total intra-molecular RDF from simple averaging of these four intra-molecular RDFs ?
thanks for yuor advices

The easiest solution would be, you dump the sulfer coordinates for
around 1000 steps with equal number of intervals. Calculate RDF from
the dump coordinates (RDF is a simple code that you can write by
yourself). That way you can calculate intra and inter both in one go
as you know the index of them in the dump file. .