}
public void adjustBondOrders() throws IOException, ClassNotFoundException,
CDKException {
// TODO also work on reactions ?!?
SaturationChecker satChecker = new SaturationChecker();
List<IAtomContainer> containersList = ChemModelManipulator
.getAllAtomContainers(chemModel);
Iterator<IAtomContainer> iterator = containersList.iterator();
Map<IBond, IBond.Order[]> changedBonds = new HashMap<IBond, IBond.Order[]>();
while (iterator.hasNext()) {
IAtomContainer ac = (IAtomContainer) iterator.next();
for (IBond bond : ac.bonds()) {
IBond.Order[] orders = new IBond.Order[2];
orders[1] = bond.getOrder();
changedBonds.put(bond, orders);
}
satChecker.saturate(ac);
for (IBond bond : ac.bonds()) {
IBond.Order[] orders = changedBonds.get(bond);
orders[0] = bond.getOrder();
changedBonds.put(bond, orders);
}