def generic_lammps_input(
    dat_file,
    style_string,
    coeff_string,
    dump_file,
    newton=False,
    std_string="",
    std_style=None,
):
    """Create text for generic LAMMPS input file."""

    if newton:
        ntn = "on"
    else:
        ntn = "off"

    if std_string != "" and std_style is not None:
        if std_style == "flare":
            compute_cmd = f"compute std all uncertainty/atom {std_string}"
        elif std_style == "flare_pp":
            compute_cmd = f"compute std all flare/std/atom {std_string}"
        else:
            raise NotImplementedError
        c_std = "c_std"
    else:
        compute_cmd = ""
        c_std = ""

    input_text = f"""# generic lammps input file
units metal
atom_style atomic
dimension  3
boundary   p p p
newton {ntn}
read_data {dat_file}

pair_style {style_string}
pair_coeff {coeff_string}

thermo_style one
{compute_cmd}
dump 1 all custom 1 {dump_file} id type x y z fx fy fz {c_std}
dump_modify 1 sort id
run 0
"""

    return input_text