Function for running from a script or shell.

def run(file_path,include_dirs=[],dlems=False,nogui=False):
    """
    Function for running from a script or shell.
    """
    import argparse
    args = argparse.Namespace()
    args.lems_file = file_path
    args.I = include_dirs
    args.dlems = dlems
    args.nogui = nogui
    main(args=args)