Water Confined in Nanotubes and Between Graphene Sheets: A First Principle Study