Bacteria interacting with a nanostructure