def add_string_buffer(string1, string2, gap=25, add_newline=True):
    """
    Add a buffer of a constant number of spaces between two strings.
    This is used to make prettier output for the NAMD input files.
    """
    if len(string1) >= gap:
        new_string = str(string1) + " " + str(string2)
    else:
        new_string = "{0: <{gap}}{1}".format(string1, string2, gap=25)
    
    if add_newline:
        return new_string + "\n"
    else:
        return new_string