Molecular optimization of multiply-functionalized mesoporous films with ion conduction properties.