Interaction of atoms, molecules, and ions with constant electric and magnetic fields