  Thermodynamics constrains the flow of matter in a reaction network to occur
through routes along which the Gibbs energy decreases, implying that viable
steady-state flux patterns should be void of closed reaction cycles.
Identifying and removing cycles in large reaction networks can unfortunately be
a highly challenging task from a computational viewpoint. We propose here a
method that accomplishes it by combining a relaxation algorithm and a Monte
Carlo procedure to detect loops, with ad hoc rules (discussed in detail) to
eliminate them. As test cases, we tackle (a) the problem of identifying
infeasible cycles in the E. coli metabolic network and (b) the problem of
correcting thermodynamic infeasibilities in the Flux-Balance-Analysis solutions
for 15 human cell-type specific metabolic networks. Results for (a) are
compared with previous analyses of the same issue, while results for (b) are
weighed against alternative methods to retrieve thermodynamically viable flux
patterns based on minimizing specific global quantities. Our method on one hand
outperforms previous techniques and, on the other, corrects loopy solutions to
Flux Balance Analysis. As a byproduct, it also turns out to be able to reveal
possible inconsistencies in model reconstructions.
