Fix the direct ts script (split the TS structure into reactant and product)