/** * {@inheritDoc} */ @Override public boolean contains(IBond bond) { for (int i = 0; i < getBondCount(); i++) { if (bonds[i].equals(bond)) return true; } return false; }
/** * {@inheritDoc} */ @Override public boolean contains(IBond bond) { for (int i = 0; i < getBondCount(); i++) { if (bonds[i].equals(bond)) return true; } return false; }
/** * {@inheritDoc} */ @Override public int getBondCount() { logger.debug("Getting bond count"); return super.getBondCount(); }
/** * {@inheritDoc} */ @Override public IBond getBond(IAtom atom1, IAtom atom2) { for (int i = 0; i < getBondCount(); i++) { if (bonds[i].contains(atom1) && bonds[i].getOther(atom1).equals(atom2)) { return bonds[i]; } } return null; }
/** * {@inheritDoc} */ @Override public IBond getBond(IAtom atom1, IAtom atom2) { for (int i = 0; i < getBondCount(); i++) { if (bonds[i].contains(atom1) && bonds[i].getOther(atom1).equals(atom2)) { return bonds[i]; } } return null; }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { for (int f = 0; f < getBondCount(); f++) { getBond(f).removeListener(this); } bonds = new IBond[growArraySize]; bondCount = 0; notifyChanged(); }
/** * {@inheritDoc} */ @Override public void removeAllBonds() { for (int f = 0; f < getBondCount(); f++) { getBond(f).removeListener(this); } bonds = new IBond[growArraySize]; bondCount = 0; notifyChanged(); }
if (getBondCount() > 0) { stringContent.append(", #B:").append(getBondCount()); for (int i = 0; i < getBondCount(); i++) { stringContent.append(", ").append(getBond(i).toString());
if (getBondCount() > 0) { stringContent.append(", #B:").append(getBondCount()); for (int i = 0; i < getBondCount(); i++) { stringContent.append(", ").append(getBond(i).toString());
CircularFingerprinter.FP[] validateFCFP = parseValidation(content.get(basefn + ".fcfp")); logger.info("FN=" + basefn + " MOL=" + mol.getAtomCount() + "," + mol.getBondCount() + " Requires ECFP=" + validateECFP.length + " FCFP=" + validateFCFP.length);
int wantAromBlocks = Integer.parseInt(bits[3]); logger.info("FN=" + basefn + " MOL=" + mol.getAtomCount() + "," + mol.getBondCount() + " nSmallRings=" + wantSmallRings + " nRingBlocks=" + wantRingBlocks + " nAromRings=" + wantAromRings + " nAromBlocks=" + wantAromBlocks);
@Test public void testBondPermutation() { AtomContainer ac = new org.openscience.cdk.AtomContainer(); AtomContainer result; String bonds = new String(""); ac.addAtom(new Atom("C")); ac.addAtom(new Atom("N")); ac.addAtom(new Atom("P")); ac.addAtom(new Atom("O")); ac.addAtom(new Atom("S")); ac.addAtom(new Atom("Br")); ac.addBond(0, 1, IBond.Order.SINGLE); ac.addBond(1, 2, IBond.Order.DOUBLE); ac.addBond(2, 3, IBond.Order.TRIPLE); ac.addBond(3, 4, IBond.Order.QUADRUPLE); ac.addBond(4, 5, IBond.Order.SINGLE); // was 5.0 ! AtomContainerBondPermutor acap = new AtomContainerBondPermutor(ac); int counter = 0; while (acap.hasNext()) { counter++; bonds = ""; result = (AtomContainer) acap.next(); for (int f = 0; f < result.getBondCount(); f++) { bonds += result.getBond(f).getOrder(); } //logger.debug(bonds); } Assert.assertEquals(119, counter); }