  The aim of this work is the study of left-invariant magnetic fields on 2-step
nilpotent Lie groups. While the existence of closed 2-forms for which the
center is either nondegenerate or in the kernel of the 2-form, is always
guaranteed, the existence of closed 2-forms for which the center is isotropic
but not in the kernel of the 2-form, is a special situation. These 2-forms are
called of type II. We obtain a strong obstruction for the existence on
non-singular Lie algebras. Moreover, we prove that the only $H$-type Lie groups
admitting closed 2-forms of type II are the real, complex and quaternionic
Heisenberg Lie groups of dimension three, six and seven, respectively. We also
prove the non-existence of uniform magnetic fields under certain hypotheses.
Finally we give a construction of non-singular Lie algebras, proving that in
some families of these examples there are no closed 2-form of type II.
