getUndoRedoHandler().postEdit(undoredo);
}
}
public static void generateNewCoordinates(IAtomContainer container) {
IChemObjectBuilder builder = DefaultChemObjectBuilder
.getInstance();
if (diagramGenerator == null) {
diagramGenerator = new StructureDiagramGenerator();
diagramGenerator.setTemplateHandler(new TemplateHandler(builder));
}
if (container instanceof IAtomContainer) {
diagramGenerator.setMolecule((IAtomContainer) container);
} else {
diagramGenerator.setMolecule(builder.newInstance(IAtomContainer.class,container));
}
try {
diagramGenerator.generateExperimentalCoordinates();
IAtomContainer cleanedMol = diagramGenerator.getMolecule();