I'd like to compute a kind of coordination number. compute_coord_atom is close to what I want, but it has a single global cutoff and doesn't do anything differently for different pair types. I could have my compute access Pair::cutsq, but I'd rather have something which looks at pair types derived from Pair which have a "sigma[itype][jtype]" variable (all the Lennard-Jones types) and base my notion of coordination on sigma[itype][jtype] rather than Pair::cutsq. Problem is that not all pair types have a natural notion of a "sigma" and it's not in the Pair interface.
Any ideas about how best to do this? One solution would be to have the compute directly take the coordination cutoffs as parameters in the input script. But it seems like this starts to get messy since I usually just want sigma[itype][jtype] (or some constant multiple). My C++ isn't so great, but I imagine there is some way to make a dynamic cast of the pair pointer to something which has a member named "sigma". Is that possible?