Optimized createLineRepresentation and createStickRepresentation in case of atom0.color === atom1.color