Esempio n. 1
0
 /**
  * Returns the maximum bond order that this atom currently has in the context of this
  * AtomContainer.
  *
  * @param atom The atom
  * @return The maximum bond order that this atom currently has
  */
 public Order getMaximumBondOrder(IAtom atom) {
   IBond.Order max = IBond.Order.SINGLE;
   for (int i = 0; i < bondCount; i++) {
     if (bonds[i].contains(atom) && bonds[i].getOrder().numeric() > max.numeric()) {
       max = bonds[i].getOrder();
     }
   }
   return max;
 }
Esempio n. 2
0
 /**
  * Returns the minimum bond order that this atom currently has in the context of this
  * AtomContainer.
  *
  * @param atom The atom
  * @return The minimum bond order that this atom currently has
  */
 public Order getMinimumBondOrder(IAtom atom) {
   IBond.Order min = IBond.Order.QUADRUPLE;
   for (int i = 0; i < bondCount; i++) {
     if (bonds[i].contains(atom) && bonds[i].getOrder().numeric() < min.numeric()) {
       min = bonds[i].getOrder();
     }
   }
   return min;
 }
Esempio n. 3
0
 /**
  * Returns the sum of the bond orders for a given Atom.
  *
  * @param atom The atom
  * @return The number of bond orders for this atom
  * @deprecated Replaced by <code>AtomContainerManipulator#getBondOrderSum(IAtomContainer, IAtom)
  *     </code>
  */
 public double getBondOrderSum(IAtom atom) {
   double count = 0;
   for (int i = 0; i < bondCount; i++) {
     if (bonds[i].contains(atom)) {
       IBond.Order order = bonds[i].getOrder();
       if (order != null) {
         count += order.numeric();
       }
     }
   }
   return count;
 }