Collective variables module for molecular simulation programs