def get_rs_energies(output_file_lines):
    """
    Get the distances and energies from the 2D ORCA output file

    :param output_file_lines: (list(str))
    :return: (list(tuple)), (list(float))
    """
    print('Extracting data')

    r1s, r2s, energies = [], [], []
    energies_section = False
    for n, line in enumerate(reversed(output_file_lines)):
        if n > 2:
            if 'The Calculated Surface using the SCF energy' in output_file_lines[len(output_file_lines)-n+1]:
                energies_section = True

        if "The Calculated Surface using the 'Actual Energy'" in line:
            break

        if energies_section:
            r1, r2, energy = line.split()
            r1s.append(float(r1))
            r2s.append(float(r2))
            energies.append(float(energy))

    rel_energies = [627.5*(e - min(energies)) for e in energies]

    return r1s, r2s, rel_energies