摘要:Context. The isomerism of molecules in the interstellar medium and the mechanisms behind it are essential questions in the chemistry of organic molecules in space. In the particular case of simple formic and thioformic acids, the low temperatures found in molecular clouds indicate that cis-trans isomerization in the gas-phase must be impeded. Reactions taking place on top of interstellar dust grains may explain the isomer interconversion at low temperatures. Aims. We studied the isomerization processes of formic and thioformic acid that are likely to take place on the surface of interstellar dust grains after being initiated by H abstraction reactions. Similarly, deuterium enrichment of the acids can occur by the same mechanism. Our objective is to shed light on both topics to expand our understanding of the key precursors of organic molecules in space. Methods. We determined the rate constants for the H abstraction reactions as well as the binding energies for the acids on water ice using ab initio calculations and the instanton method for calculating the rate constants, including quantum tunneling. In addition, we tested the viability of the deuteration of formic acid with tailored experiments and looked for it on the L1544 source. Results. For formic acid, there is a clear dependence of the H abstraction reactions on the isomer of the reactant, with rate constants at ∼50 K that differ by five orders of magnitude. Correspondingly, we did not observe the trans-cis reaction in our experiments. In the case of thioformic acid, a very similar cis-trans reactivity is found for abstraction reactions at the thiol (-SH) group in contrast to a preferential reactivity that is found when abstractions take place at the -CH moiety. We found comparable binding energies for both isomers with average binding energies of around −6200 and −3100 K for formic and thioformic acid, respectively. Our binding energy calculations show that the reactions are precluded for specific orientations, affecting the overall isomerization rate. For H abstractions initiated by deuterium atoms, we found very similar trends, with kinetic isotope effects varying in most cases between 13 and 20. Conclusions. Our results support the cis-trans interconversion of cis-formic acid on dust grains, suggesting that such an acid should not withstand the conditions found on these objects. On the other hand, the trans isomer is very resilient. Both isomers of thioformic acid are much more reactive. A non-trivial chemistry is behind the apparent excess of its trans isomer that is found in cold molecular clouds and star-forming regions due to a subtle combination of preferential reactivity and binding with the surface. In light of our results, all the deuterated counterparts of thioformic acid are viable molecules to be present on the ISM. In contrast, only the trans isomer of deuterated formic acid is expected, for which we provide upper bounds of detection. Given the mechanisms presented in this paper, other mechanisms must be at play to explain the tiny fraction of cis-formic acid observed in interstellar cold environments, as well as the current trans-DCOOH and trans-HCOOD abundances in hot-corinos.