Magnetotropicity of five-membered heterocyclic molecules