As you said, these are all the pieces already. If what I'd figure is your question it's easy to answer:
"How much damage would I do if I fire for $Length time?"
$Length * $RoF = X rounds
X rounds * $damage = gunDamage
X rounds * $DOT% = avgDotAmount
DoTs are smart in this game, they all have their separate timers and can stack independently from one another. This makes the damage as intuitive as possible:
dotDamage = avgDotAmount * ticks(element)
totalDamage = (gunDamage + dotDamage) * multiplier(element)
As this was far too easy to answer, I can only assume your question would be like
"When can I stop firing, knowing that my DoTs will kill the enemy?"
To which the answer would be "Never, unless the target isn't currently affected, then keep firing."
To us human player at least; for all the data is there in the fountain of numbers that spew from the target you are perforating with bullets. Would we be perfect computers, we could see when a new dot starts ticking(it wouldn't have a previous tick before it) and thus know exactly how many ticks are left. Being human, all we can say is "it's on fire" or "it's not on fire." This makes knowing for SURE your target is going to die impossible, the best one could do is make a normal distribution graph(wiki) with the probabilities if your target will die.
If that's really what you'd want, I could run it through some model, but it's still gonna be a pretty useless graph. Input the specific gun and skills you're using, and you could get a graph with probabilities mapped vs dotDamage. Even if you could watch that while shooting things, you can only guess how much health your target has left.
If instead, and my final guess, the question would be "How much do I overkill?" that amounts to the same, as that is also "Amount of dotDamage still to be done."
Damage is first calculated from shields, then the remaining damage is calculated by health.
For example you are using shock sniper, your damage with the sniper is 1000 (including all the bonuses and modifiers) but the damage is further multiplied by it's effectiveness on shields x2 on normal and x2.5 on true vault hunter.
Assuming the target has 1000 health and 1000 shields, you only damage the shields, but not the health, since the damage multiplier applies only to the shield damage and not the health damage.
If the target would instead have only 500 shields, the shields would take 2000 or 2500 damage and the remaining 500 points of damage is subtracted from the health (Only 500 points of damage from 1000 is multiplied with the shock bonus, since the target has only 500 units of shields)
This same rule applies to all elemental damage.
The elemental damage coefficient multiplies the adjusted weapon damage following the formula below:
Final Damage = (Base + Skills + BA Rank + Class Mod + Relic) * (Gun Base) * (Elemental multiplier)
Best Answer
It turns out e-tech snipers deal reduced critical hit damage (possibly all e-tech?)
I tested this theory on poor Target Practice. I removed allegiance/plus bullet damage/etc gear to get "raw" data. I confirmed that badass ranks boost both e-tech and normal guns, so it's not an issue of badass rank not applying either. Tests were completed with the same character with no kill skill buffs/etc. I used the same elements to eliminate the damage multipliers from mattering.
Here is a corrosive Vladof non-e-tech sniper rifle. Base Damage: 15,596 Headshot damage: 118K
Here is a corrosive Dahl e-tech sniper rifle with nearly 2x the amount of base damage damage. Base Damage: 27,117. Headshot damage: 95,293
Note the slightly lower headshot damage despite extremely higher base damage. Sniper rifles have a built-in,unlisted bonus to critical damage, it appears that at the least, e-tech doesn't get that boost. It's a pretty huge factor, since it seems to be cutting the damage roughly in half.
I did some extra testing and it turned out the body shots from e-tech snipers actually do as much extra damage as they should:
As if you needed another reminder that DPS numbers are meaningless in BL2, my initial testing was complicated because I was comparing my fire e-tech to the Volcano. Turns out the Volcano does significantly more damage than listed on headshots AND bodyshots, probably due to the splash damage it's shots have, unlike other snipers. The fire e-tech was inferior to bodyshots from the volcano too (by a large margin) but that was due to the Volcano being awesome, not e-tech sucking.