def mol_file_basename(tag):
    """Convert a tag into a molecular data file name.
    This could be a tag string, if it is quoted and starts with a 0,
    e.g. '032504', or a molecule number (int), e.g. 32504"""
    if str(tag)[0] == '0':
      return 'c'+tag+'.'
    else:
      return 'c%06d.' % tag