Trapping molecules using photostop