Fe and Mn atoms interacting with carbon nanotubes