Iran has said in the past it would stop plans to build a heavy water nuclear reactor , which can be used to make nuclear weapons-grade material as well as for nuclear energy .