A molecular concentrator comprising a thermal ratchet for driving molecules from one place to another. A plurality of conducting wires are arranged on or suspended above a substrate. Each of the wires is configured to strongly sorb a vapor of interest when the wire is at room temperature and to rapidly desorb the vapor when the wire is at an elevated temperature. By selectively heating and cooling the wires, vapor molecules incident on the wires can be directed in a desired manner, e.g., from the wires closest to the vapor-containing environment to a sensor.