void checkValencesAndBond(Atom atomA, Atom atomB, short order, short mad) {
		if (atomA.getCurrentBondCount() > JmolConstants.MAXIMUM_AUTO_BOND_COUNT
				|| atomB.getCurrentBondCount() > JmolConstants.MAXIMUM_AUTO_BOND_COUNT) {
			if (!haveWarned)
				Logger.warn("maximum auto bond count reached");
			haveWarned = true;
			return;
		}
		int formalChargeA = atomA.getFormalCharge();
		if (formalChargeA != 0) {
			int formalChargeB = atomB.getFormalCharge();
			if ((formalChargeA < 0 && formalChargeB < 0) || (formalChargeA > 0 && formalChargeB > 0))
				return;
		}
		if (atomA.alternateLocationID != atomB.alternateLocationID && atomA.alternateLocationID != 0
				&& atomB.alternateLocationID != 0)
			return;
		addBond(bondMutually(atomA, atomB, order, mad));
	}