Biochemists believe that future medicines may feature an in-built system to prevent them from reaching the wrong tissue inside the body.
Joakim Andreasson at Chalmers University of Technology in Gothenburg, Sweden, says that a light-activated "combination lock" - a molecule that only becomes active when exposed to two distinct colors of light in the right order, has been developed, and that it may help ensure that small packages of drugs deliver their payload only exactly where and when it is needed.
This breakthrough has been achieved in collaboration with researchers from Arizona State University.
Previously designed molecular locks used chemicals as the trigger, which makes for a sluggish system because they diffuse slowly through the body.
Andreasson says that using pulses of light is much faster, and that it also allows the lock to be opened and closed repeatedly, as there are no chemical residues to foul the molecular mechanism.
Describing the lock, the researcher has revealed that it is a complex molecule with three components, two light-sensitive portions called photochromes that act as switches, and a "reporter" unit.
The reporter will fluoresce when both photochromes are switched to the right setting and triggered in the correct order, says the researcher.
The light produced by the reporter could in turn be used to activate or a release a drug or other molecule designed to be sensitive to it, the researcher adds.
"The only input sequence that will [open the lock] is UV light followed by red light," New Scientist magazine quoted Andreasson as saying.
According to the researchers, green light can be used to reset the lock.
Devens Gust, one of the Arizona research team, believes that the most obvious application of the molecule is as a lock to ensure secure drug delivery at the right location in the body.
Andreasson, however, insists that this will require the technique to be modified to work at light wavelengths that can penetrate tissue, such as the infrared used in prototype brain-scanning headbands.
A research article on this work has been published in Chemistry: A European Journal.