/** * {@inheritDoc} */ @Override public Order getMinimumBondOrder(IAtom atom) { Order min = null; for (IBond bond : getAtomRef(atom).bonds()) { if (min == null || bond.getOrder().numeric() < min.numeric()) { min = bond.getOrder(); } } if (min == null) { if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) min = Order.SINGLE; else min = Order.UNSET; } return min; }
/** * {@inheritDoc} */ @Override public Order getMaximumBondOrder(IAtom atom) { Order max = null; for (IBond bond : getAtomRef(atom).bonds()) { if (max == null || bond.getOrder().numeric() > max.numeric()) { max = bond.getOrder(); } } if (max == null) { if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) max = Order.SINGLE; else max = Order.UNSET; } return max; }
/** * {@inheritDoc} */ @Override public Order getMaximumBondOrder(IAtom atom) { Order max = null; for (IBond bond : getAtomRef(atom).bonds()) { if (max == null || bond.getOrder().numeric() > max.numeric()) { max = bond.getOrder(); } } if (max == null) { if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) max = Order.SINGLE; else max = Order.UNSET; } return max; }
/** * {@inheritDoc} */ @Override public Order getMinimumBondOrder(IAtom atom) { Order min = null; for (IBond bond : getAtomRef(atom).bonds()) { if (min == null || bond.getOrder().numeric() < min.numeric()) { min = bond.getOrder(); } } if (min == null) { if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) min = Order.SINGLE; else min = Order.UNSET; } return min; }
/** * {@inheritDoc} */ @Override public double getBondOrderSum(IAtom atom) { double count = 0; for (IBond bond : getAtomRef(atom).bonds()) { Order order = bond.getOrder(); if (order != null) { count += order.numeric(); } } return count; }
/** * {@inheritDoc} */ @Override public double getBondOrderSum(IAtom atom) { double count = 0; for (IBond bond : getAtomRef(atom).bonds()) { Order order = bond.getOrder(); if (order != null) { count += order.numeric(); } } return count; }