public static void writeAlignments(Graph[] g, OrderedList<Alignment> rankAlign, String pathOutput)
	{
		if(pathOutput!=null)
		{
			File f=new File(pathOutput);
			if(!f.exists())
				f.mkdir();
		}
		//System.out.println("\nBEST_ALIGNMENTS:");
		NodeOrdList<Alignment> aux=rankAlign.getMax();
		int cont=1;
		int i=0, j=0, k=0;
		while(aux!=null)
		{
			Alignment a=aux.getInfo();
			//System.out.println(a);
			Vector<String>[] mapping=a.getMapping();
			//Memorizzazione allineamento
			if(pathOutput!=null)
			{
				try
				{
					BufferedWriter bw=new BufferedWriter(new FileWriter(pathOutput+"/Alignment"+cont+".txt"));
					bw.write("Alignment score: "+a.getAlignSize()*a.getIscScore()+"\r\n");
					bw.write("Alignment size: "+a.getAlignSize()+"\r\n");
					bw.write("Index of Structural Conservation (ISC): "+a.getIscScore()+"\r\n"+"\r\n");
					for(j=0;j<mapping.length;j++)
					{
						bw.write(g[j].getName()+":\r\n");
						bw.write(g[j].buildInducedSubgraph(mapping[j])+"\r\n");
					}
					bw.write("MAPPING:\r\n"+"\r\n");
					for(j=0;j<mapping[0].size();j++)
					{
						for(i=0;i<mapping.length-1;i++)
							bw.write(mapping[i].get(j)+"\t");
						bw.write(mapping[i].get(j));
						bw.write("\r\n");
					}
					bw.close();
				}
				catch(Exception e)
				{}
			}
			aux=aux.getNext();
			cont++;
		}
		//System.out.println();
	}