Application of Rigidity-Controlled Supramolecular Affinity Materials for the Gravimetric Detection of Hazardous and Illicit Compounds.