Rewrite adjacency lists with new format in thermo libraries

Unfortunately saveDatabse() reordered the entries.