int autoHbond(BitSet bsA, BitSet bsB) {
		if (useRasMolHbondsCalculation && bondCount > 0) {
			if (mmset != null)
				mmset.calcHydrogenBonds(bsA, bsB);
			return 0;
		}
		// this method is not enabled and is probably error-prone.
		// it does not take into account anything but distance,
		// and as such is not really practical.

		int nNew = 0;
		initializeBspf();
		long timeBegin = 0;
		if (showRebondTimes)
			timeBegin = System.currentTimeMillis();
		for (int i = atomCount; --i >= 0;) {
			Atom atom = atoms[i];
			int elementNumber = atom.getElementNumber();
			if (elementNumber != 7 && elementNumber != 8)
				continue;
			// float searchRadius = hbondMax;
			SphereIterator iter = bspf.getSphereIterator(atom.modelIndex);
			iter.initializeHemisphere(atom, hbondMax);
			while (iter.hasMoreElements()) {
				Atom atomNear = (Atom) iter.nextElement();
				int elementNumberNear = atomNear.getElementNumber();
				if (elementNumberNear != 7 && elementNumberNear != 8)
					continue;
				if (atomNear == atom)
					continue;
				if (iter.foundDistance2() < hbondMin2)
					continue;
				if (atom.isBonded(atomNear))
					continue;
				addBond(bondMutually(atom, atomNear, JmolConstants.BOND_H_REGULAR, (short) 1));
				nNew++;
			}
			iter.release();
		}
		if (showRebondTimes) {
			long timeEnd = System.currentTimeMillis();
			Logger.debug("Time to hbond=" + (timeEnd - timeBegin));
		}
		return nNew;
	}