public void formMolecules() {
		if (rBonds.isEmpty()) {
			molecules.clear();
			return;
		}
		if (bondedAtomList == null) {
			bondedAtomList = new ArrayList<Atom>();
		} else {
			bondedAtomList.clear();
		}
		for (int i = 0; i < iAtom; i++) {
			if (atom[i].isBonded())
				bondedAtomList.add(atom[i]);
		}
		molecules.clear();
		if (bondedAtomList.isEmpty())
			return;
		if (atomList1 == null) {
			atomList1 = new ArrayList<Atom>();
			atomList2 = new ArrayList<Atom>();
		}
		Atom at1, at2;
		do {
			at1 = bondedAtomList.get(0); // get the 1st of the remaining atoms
			atomList1.clear();
			atomList1.add(at1);
			bondedAtomList.remove(at1);
			do {
				atomList2.clear();
				for (Iterator it1 = atomList1.iterator(); it1.hasNext();) {
					at1 = (Atom) it1.next();
					for (Iterator it2 = bondedAtomList.iterator(); it2.hasNext();) {
						at2 = (Atom) it2.next();
						if (at1.isBonded(at2)) {
							it2.remove();
							atomList2.add(at2);
						}
					}
				}
				atomList1.addAll(atomList2);
			} while (!atomList2.isEmpty());
			molecules.add(new Molecule(atomList1));
		} while (!bondedAtomList.isEmpty());
	}