From adaptive resolution to molecular dynamics of open systems