Optimal shape of the rotating nano rod