Multichannel density-functional calculations for atoms and atomic chains in magnetic fields of compact stars.