Self-organization and stability of magnetosome chains—A simulation study