SMS: Relevant cycles in biopolymers and random graphs