From: gilleain torrance <gilleain.torrance@gm...>  20090818 10:56:23

> I think sorting comes close to canonicalization, if we have other algorithms too... Sorting atoms on the atom properties cannot make canonical chemical graphs, I think. Sorting them on the bond properties can do so. I have been trying to get canonical checking based on minimal edge order working (see the class CanonicalChecker). > there is also the opposite, randomizing the order, for which there is a permutation algorithm somewhere... The AtomContainerPermutor and its subclasses (AtomContainerAtomPermutor and AtomContainerBondPermutor). I rewrote two of these classes to use orderly generation (see code), they're in the same place as the structure generation stuff. >I suggest that one will > use the same interface... I don't see how ordering would use the same interface as permutation. Ordering and canonization are 'one shot' processes  a container is ordered or it is not  while you can permute endlessly. > > interface AtomOrderer? { > > IAtomContainer order(IAtomContainer) > > } This seems reasonable. I guess there could be an 'inplace' ordering (as with sorting) and a copyreturn one, but perhaps this is overly complicated. gilleain 