# Write result
for key, val in c_resi_models.items():
f.write( "# ; " + str(key) + " ; " + str(val) + "\n" )
# Write models to file
for spin, spin_id in spin_loop(return_id=True, skip_desel=True):
f.write( str(spin_id) + " ; " + str(spin.model) + "\n" )
f.close()