def convert_to_bagel_geom(geom_str):
    """
    Converts an xyz geometry sting to a bagel formatted geometry (json format)
    :param geom_str: xyz geometry to convert
    """
    bagel_geom = ''
    for line in geom_str.strip().splitlines():
        atom, *xyz = line.split()
        bagel_geom += f'{{"atom" : "{atom:s}", '
        if len(atom) == 1:
            bagel_geom += ' '
        x, y, z = map(float, xyz)
        bagel_geom = f'[{x:>15.10f},{y:>15.10f},{z:>15.10f}] }},\n'

    return bagel_geom[:-2]