A molecular dynamics study on magnetic imidazolium-based ionic liquids: the effect of an external magnetic field.