Cycles and communicating classes in membrane systems and molecular dynamics