public void redo() {
chemModel.getMoleculeSet().removeAtomContainer(movedContainer);
if(chemModel.getReactionSet()==null)
chemModel.setReactionSet(chemModel.getBuilder().newInstance(IReactionSet.class));
IReaction reaction = ReactionSetManipulator.getReactionByReactionID(chemModel.getReactionSet(), reactionID);
if(reaction==null){
reaction = chemModel.getBuilder().newInstance(IReaction.class);
reaction.setID(reactionID);
chemModel.getReactionSet().addReaction(reaction);
}
IAtomContainer mol=chemModel.getBuilder().newInstance(IAtomContainer.class,movedContainer);
mol.setID(movedContainer.getID());
if(reactantOrProduct)
reaction.addReactant(mol);
else
reaction.addProduct(mol);
chemModel.getMoleculeSet().removeAtomContainer(oldContainer);
if(chemModel.getMoleculeSet().getAtomContainerCount()==0)
chemModel.getMoleculeSet().addAtomContainer(chemModel.getBuilder().newInstance(IAtomContainer.class));
}