def check_lammps_sim(out_file, verbose=True):
    """
    Check if LAMMPS simulation is finished.
    """
    FINISHED = False
    try:
        with open(out_file, 'r') as f:
            lines = f.readlines()
        if 'Total wall time' in lines[-1]:
            FINISHED = True
    except Exception as e:
        if verbose:
            print(e)
    # print(lines[-1])
    return FINISHED