Programmatic way to differentiate homodimers from heterodimers?
I'd just compare the amino acid sequences of the individual protein chains. With some leeway for residues not observed in the density, ie only require 90 or 95% sequence identity, or ignore gaps.

This will not tell you anything about whether the dimer (if you observe several molecules in the asymmetric unit) is actually real. For that, you'd need to do an experiment, literature research or see whether software like the PISA-server could give you a clue.