def gen_jaguar_output(mae, jin=None, charge=0):
    """
    Generates strings for a Jaguar .in file.

    Returns
    -------
    list of strings
    """
    # Read the lines from the .in file if it was provided.
    if jin:
        new_lines = [line.rstrip() for line in jin.lines]
    # If there's no Jaguar .in file provided, then put in some basic
    # ESP commands and the coordinates from the .mae file.
    else:
        # Header information.
        filename = '{}.mae'.format(mae.filename.split('.')[0])
        new_lines = [
            'MAEFILE: {}'.format(filename),
            '&gen',
            'icfit=1',
            'incdip=1']
        if charge != 0:
            new_lines.append('molchg={}'.format(charge))
        new_lines.append('&')
        # Coordinates.
        new_lines.append('&zmat')
        new_lines.extend(mae.structures[0].format_coords(format='jaguar'))
        new_lines.append('&')
    return new_lines