private static void setReactionIDs(final IChemModel chemModel) { // we give all reactions an ID, in case they have none // IDs are needed for handling in JCP final IReactionSet reactionSet = chemModel.getReactionSet(); if (reactionSet != null) { int i = 0; for (final IReaction reaction : reactionSet.reactions()) { if (reaction.getID() == null) { reaction.setID("Reaction " + ++i); } } } }