Light actuated single-chain magnet with magnetic coercivity