Porous protein crystals as reaction vessels for controlling magnetic properties of nanoparticles.