예제 #1
0
def process_gw_calculation(path: str) -> dict:
    """
    :param str path: Path to GW files
    :return: dict Processed GW data
    """
    print('Reading data from ', path)
    gw_data = parse_gw_info(path)
    qp_data = parse_gw_evalqp(path)
    results = process_gw_gamma_point(gw_data, qp_data)

    if not results:
        return {
            'delta_E_qp': [],
            're_self_energy_VBM': [],
            're_self_energy_CBm': []
        }

    X_point = [0., 0.5, 0.5]
    Gamma_point = [0., 0., 0.]

    # Specific to the A1 system X (valence) -> Gamma (conduction)
    results_x_gamma = process_gw_gap(gw_data, qp_data, X_point, Gamma_point)
    results_x_x = process_gw_gap(gw_data, qp_data, X_point, X_point)

    return {
        'E_qp': np.array(results['E_qp']),
        'E_ks': np.array(results['E_ks']),
        'E_qp_X_Gamma': np.array(results_x_gamma['E_qp']),
        'E_ks_X_Gamma': np.array(results_x_gamma['E_ks']),
        'E_qp_X_X': np.array(results_x_x['E_qp']),
        'E_ks_X_X': np.array(results_x_x['E_ks']),
        'delta_E_qp': np.array(results['E_qp'] - results['E_ks']),
        're_self_energy_VBM': np.array(results['re_sigma_VBM']),
        're_self_energy_CBm': np.array(results['re_sigma_CBm'])
    }
예제 #2
0
def process_gw_calculation(path: str, gaps: List[Gap]) -> dict:
    """
    Process GW calculation results for VB and CB points specified in gaps

    :param str path: Path to GW files
    :param List[Gap] gaps: List of VB and CB points

    :return: dict gw_results: Processed GW data for QP and KS energies for specified gaps
    """
    print('Reading data from ', path)
    gw_data = parse_gw_info(path)
    qp_data = parse_gw_evalqp(path)

    gw_results = {}

    for gap in gaps:
        results = process_gw_gap(gw_data, qp_data, gap.v, gap.c)
        gap_label = gap.v_label + '_' + gap.c_label
        try:
            gw_results['E_qp_' + gap_label] = np.array(results['E_qp'])
            gw_results['E_ks_' + gap_label] = np.array(results['E_ks'])
            gw_results['delta_E_qp_' + gap_label] = np.array(results['E_qp'] - results['E_ks'])
        except KeyError:
            return gw_results

    return gw_results
예제 #3
0
def process_gw_calculation(path: str, gaps: List[Gap]) -> dict:
    """
    Process GW calculation results for VB and CB points specified in gaps

    :param str path: Path to GW files
    :param List[Gap] gaps: List of VB and CB points

    :return: dict gw_results: Processed GW data for QP and KS energies for specified gaps
    """
    print('Reading data from ', path)
    gw_data = parse_gw_info(path)
    qp_data = parse_gw_evalqp(path)

    gw_results = {}

    for gap in gaps:
        results = process_gw_gap(gw_data, qp_data, gap.v, gap.c)
        gap_label = gap.v_label + '_' + gap.c_label
        try:
            gw_results['E_qp_' + gap_label] = np.array(results['E_qp'])
            gw_results['E_ks_' + gap_label] = np.array(results['E_ks'])
            gw_results['delta_E_qp_' + gap_label] = np.array(results['E_qp'] -
                                                             results['E_ks'])
        except KeyError:
            return gw_results

    # Haven't tested these, but assume same irrespective of k-point?:
    #gw_results['re_self_energy_VBM_' + gap.v_label] = np.array(results['re_sigma_VBM'])
    #gw_results['re_self_energy_CBm' + gap.c_label] = np.array(results['re_sigma_CBm'])

    return gw_results
예제 #4
0
def process_gw_calculation(path: str) -> dict:
    """
    This could be a more generic routine

    # TODO(Alex) Check parse_gw_evalqp parser is valid (and replace with one from exciting tools)

    :param str path: Path to GW files
    :return: dict Processed GW data
    """
    print('Reading data from ', path)
    gw_data = parse_gw_info(path)
    qp_data = parse_gw_evalqp(path)
    results = process_gw_gamma_point(gw_data, qp_data)

    if not results:
        return {
            'delta_E_qp': [],
            're_self_energy_VBM': [],
            're_self_energy_CBm': []
        }

    X_point = [0., 0.5, 0.5]
    Gamma_point = [0., 0., 0.]

    # Specific to the A1 system X (valence) -> Gamma (conduction)
    results_x_gamma = process_gw_gap(gw_data, qp_data, X_point, Gamma_point)
    results_x_x = process_gw_gap(gw_data, qp_data, X_point, X_point)

    return {
        'E_qp': np.array(results['E_qp']),
        'E_ks': np.array(results['E_ks']),
        'E_qp_X_Gamma': np.array(results_x_gamma['E_qp']),
        'E_ks_X_Gamma': np.array(results_x_gamma['E_ks']),
        'E_qp_X_X': np.array(results_x_x['E_qp']),
        'E_ks_X_X': np.array(results_x_x['E_ks']),
        'delta_E_qp': np.array(results['E_qp'] - results['E_ks']),
        're_self_energy_VBM': np.array(results['re_sigma_VBM']),
        're_self_energy_CBm': np.array(results['re_sigma_CBm'])
    }