Molecular memory was a science that was developed on Earth many years ago where metal alloys were crafted that were designed to return to a specific shape if heat was applied.
A more advanced form of this technology was referred to as molecular engineering and was related to nanotechnology. (TNG novel: The Romulan Prize)