the graph you show seems to include atoms from pairs that are excluded from the pairwise calculation (depending on the special_bonds setting).
since compute rdf uses the non-bonded neighbor list, those excluded pairs are excluded from that computation as well. there are two ways to work around this:
- record a trajectory and then compute the rdf using rerun, where you define only a pair style and no bonds/angles/dihedrals and do not compute forces at all.
- use a modified special_bonds lj/coul setting where you replace what is usually set to exactly 0.0 with a very small number, say 1.0e-20. then those previously excluded interactions will still be computed (but multiplied with a tiny prefactor, so they won’t make a significant difference) and the neighbor for compute rdf will include those pairs.