while num_metal <= num_metal_max:
	cenergy = cenergy_initial
	mcenergy = mcenergy_initial
	while cenergy <= cenergy_max:
		venergy = venergy_initial
		while venergy <= venergy_max:
			i = 0
			while i < run_times:
				os.system('mc-rect-lattice-func -a %d -b %d -c %d -d %d -e %f -f %d' % (total_run,num_mol,num_metal,cenergy,venergy,mcenergy))
				str_venergy = '%.1e'% venergy + str(0)
				str_total_run = '1.0e+007'
				line = "D:\Dropbox\Project\python\Monte-Carlo-Simulation\\results3\\"+str_total_run+'-'+str(latt_len)+'-'+str(num_mol)+'-'+str(num_metal)+'-'+str(cenergy)+'-'+str_venergy+'-'+str(mcenergy)+'.txt'
				print line
				#tpath,line = os.path.split(line)
				#print line
				az.load_txt(line)
				print int(az.cenergy_ind)
				print int(az.venergy_ind)
				print int(az.nmetal_ind)
				

				
				mols0, count0 = az.clustering(0)
				mols1, count1 = az.clustering(1)
				mols2, count2 = az.clustering(2)
				newlist = []
				count3 = 0
				mol_list = range(200)
				for j in range(len(mols0)):
					for k in range(len(mols0[j])):
						if mols0[j][k] not in newlist: