code: def is_transport_reaction_formulae(rxn):
      
      # Collecting criteria to classify transporters by.
      rxn_reactants = set([met.formula for met in rxn.reactants])
      rxn_products = set([met.formula for met in rxn.products])
      # Looking for formulas that stay the same on both side of the reaction.
      transported_mets = \
          [formula for formula in rxn_reactants if formula in rxn_products]
      # Collect information on the elemental differences between
      # compartments in the reaction.
      delta_dicts = find_transported_elements(rxn)
      non_zero_array = [v for (k, v) in iteritems(delta_dicts) if v != 0]
      # Excluding reactions such as oxidoreductases where no net
      # transport of Hydrogen is occurring, but rather just an exchange of
      # electrons or charges effecting a change in protonation.
      if set(transported_mets) != set('H') and list(
          delta_dicts.keys()
      ) == ['H']:
          pass
      # All other reactions for which the amount of transported elements is
      # not zero, which are not part of the model's exchange nor
      # biomass reactions, are defined as transport reactions.
      # This includes reactions where the transported metabolite reacts with
      # a carrier molecule.
      elif sum(non_zero_array):
          return True
docs: Return boolean if a reaction is a transport reaction (from formulae).
  
      Parameters
      ----------
      rxn: cobra.Reaction
          The metabolic reaction under investigation.