The preparation of the Pandora's box as well as the loading and releasing of AMPs into and from the box, respectively. (A) The preparation of the Pandora's box, the PMAA “gates” engineered Ti-NTs (Ti-NTs-P), and its control groups. First, Ti-NTs were modified with dopamine to form Ti-NTs-D. Ti-NTs-D were conjugated with the gate molecule, PMAA, to from Ti-NTs-P. Ti-NTs were also directly modified with PMAA to form a control substrate called Ti-NTs-PCtrl. (B) The loading and “on-demand” delivery of AMPs into and out of the Pandora's box. First, to load PMAA, the box was placed in an AMPs solution with a pH value of less than 6. The low pH made the chains of PMAA gate molecules collapsed and the nanotubes opened, enabling the loading of AMPs into the nanotubes. Then the pH of the solution was increased to 7.4 to make the PMAA molecules swell, leading to the encapsulation of the loaded AMPs to form Ti-NTs-P-A. When Ti-NTs-P-A substrates were in an environment where bacterial infection occurred (causing the environmental pH dropped to below 6), the PMAA gate molecules will collapse to open the nanotubes, leading to the rapid release of the AMPs to immediately kill the bacteria. Otherwise, the AMPs in the nanotubes will be “latent”. (C) The loading and uncontrollable delivery of AMPs on control substrates due to the absence of the gate PMAA molecules, including Ti-NTs, Ti-NTs-D and Ti-NTs-PCtrl. EDC: 1-ethyl-3-(3-dimethylaminopropyl)-carbodiimide hydrochloride; NHS, N-hydroxysuccinimide; PMAA, polymethacrylic acid.