Regioselective magnetization in semiconducting nanorods