internal virtual Bond addNewBond(int atomIndex1, int atomIndex2, int order) { Bond bond = new Bond(atomIndex1, atomIndex2, order); addBond(bond); return bond; }
internal virtual void addBond(Bond bond) { /* System.out.println("I see a bond:" + bond.atomIndex1 + "-" + bond.atomIndex2 + ":" + bond.order); */ if (bond.atomIndex1 < 0 || bond.atomIndex2 < 0 || bond.order <= 0) { /* System.out.println(">>>>>>BAD BOND:" + bond.atomIndex1 + "-" + bond.atomIndex2 + ":" + bond.order); */ return; } if (bondCount == bonds.Length) bonds = (Bond[])AtomSetCollectionReader.setLength(bonds, bondCount + 1024); bonds[bondCount++] = bond; }
public override bool hasNext() { if (ibond == atomSetCollection.bondCount) return false; bond = bonds[ibond++]; return true; }