I'm looking for a fanfic story where something had happened at Hogwarts, causing all the rooms within to be magically locked. The doors couldn't be opened until the threat is gone, which I think was either an unknown person/death-eaters that had infiltrated Hogwarts.
Snape was teaching his class with his Gryffindor and Slytherin students (can't remember which year, maybe 5th) when it happened and now they need to survive with each other.
They do have access to the classroom, store, office, kitchen and bathroom. The door to enter/exit the classroom is the door they can't open. Also, no house elves can get in but something was able to get under the door (maybe?).
Books and homework were used to make beds (more like futons) and sheets. Potion ingredients were cooked as food and some were later used as potions.
Harry and Theodore Nott both suffer from nightmares, but Nott gets a potion (dreamless sleep) and Harry cleans as to stay awake.
They are locked up for more then three weeks and they are very weak when they were finally rescued. Harry and Snape also become closer to each other and have a parent-child relationship at the end.
Harry also shares his food with Ron (half of a some kind of root) because he is used to starvation and counts the days that he can go without (he shares the food because he knows and can ignore hunger and Ron can't).
Severus also eats nothing at the start and when Harry notices this he confronts Snape at this and (tries to) give(s) Snape half of what Harry had.
I read this story on Fanfiction.net about three years ago (2015ish) and it had more than 5k words. Does anyone remember the title?