Predicting the self-assembly of superparamagnetic colloids under magnetic fields