def format_flux_mode_indices(atom_idxs):
    """ Formates the atom indices into a string that is used
        to define the fluxional (torsional) modes of a
        molecular species for Monte Carlo calculations in MESS.

        :param atom_idxs: idxs of atoms involved in fluxional mode
        :type atom_idxs: list(int)
        :return flux_mode_idx_str: formatted string of indices
        :rtype: string
    """

    # Build string containing the values of each keyword
    flux_mode_idx_str = ''
    for vals in atom_idxs:
        flux_mode_idx_str += '{0:<4d}'.format(vals)

    return flux_mode_idx_str