Nanostructured membranes for water treatments