def build_reaction(reac):
    """
    This function gets the reactants and products in smiles format
    from reaction list and writes the reaction in a way that
    can be fed to rdkit.
    Parameters
    ------
    reac    : str
            A reaction string with reactants/products and their
            stoichiometric coeffs. Typically an entry from complete
            reaction list
    Returns
    --------------
    reaction_list   : str
                    list of reactants and products of a specific reaction
                    seperated by space
    """

    reactants = []
    products = []
    for species in reac:
        if (float(species[0])) < 0:
            reactants.append(species[1])
        else:
            products.append(species[1])

    seperator = ['']
    reaction_list = reactants + seperator + products

    return reaction_list