def set_cmdlinevars(cmdargs, argdict):
    """
    Add a dicitionary of LAMMPS arguments in a command line argument string.

    Parameters
    ----------
    cmdargs : list
        Command line argument string. Will be mutated by this function.

    argdict : dict
        Dictionary to be added to LAMMPS command line argument string.

    Returns
    -------
    cmdargs : list
        New command line argument string.
    """
    for key in argdict.keys():
        cmdargs += ["-var", key, f"{argdict[key]}"]
    return cmdargs