Magnetic rods for pharmaceuticals