Structural, electronic and magnetic properties of hcp Fe, Co and Ni nanowires encapsulated in zigzag carbon nanotubes