A new method to evaluate the free energy for random magnetic systems | Synapse