md_helpers: write_molecules_to_file added + test