Package org.openscience.cdk.tools

Examples of org.openscience.cdk.tools.SaturationChecker


  }

  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);
      }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.tools.SaturationChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.