Medium range (Rifles):
Edit: found a mistake in my initial formula (was assuming there's no reload when no more rounds left in the magazine but i was overthinking it. In fact there's always reload after each shot).
Which makes the formula simpler:
Avg.dmg = (Min dmg [+ Min amp dmg] + Max dmg [+ Max amp dmg] ) / 2
where "Min.dmg" - Minimum damage while maxed /w the weapon
DPS = Avg.dmg * Shots / (Fire time * Shots + Reload time)
As my formula doesn't take into account critical hits the actual DPS in-game is somewhat higher than shown here.
DPS numbers on PION Wiki are little higher, most likely for this exact reason.