Some relations between rank, chromatic number and energy of graphs