Gets the BandEdge correction for a defect entry

def get_correction(self, entry):
        """
        Gets the BandEdge correction for a defect entry
        """
        # TODO: add smarter defect level shifting based on defect level projection onto host bands
        hybrid_cbm = entry.parameters["hybrid_cbm"]
        hybrid_vbm = entry.parameters["hybrid_vbm"]
        vbm = entry.parameters["vbm"]
        cbm = entry.parameters["cbm"]
        num_hole_vbm = entry.parameters["num_hole_vbm"]
        num_elec_cbm = entry.parameters["num_elec_cbm"]

        self.metadata["vbmshift"] = hybrid_vbm - vbm  # note vbmshift has UPWARD as positive convention
        self.metadata["cbmshift"] = hybrid_cbm - cbm  # note cbmshift has UPWARD as positive convention

        charge = entry.charge
        vbm_shift_correction = charge * self.metadata["vbmshift"]
        # negative sign has to do with fact that these are holes
        hole_vbm_shift_correction = -1. * num_hole_vbm * self.metadata["vbmshift"]
        elec_cbm_shift_correction = num_elec_cbm * self.metadata["cbmshift"]

        entry.parameters["bandshift_meta"] = dict(self.metadata)

        return {
            "vbm_shift_correction": vbm_shift_correction,
            "hole_vbm_shift_correction": hole_vbm_shift_correction,
            "elec_cbm_shift_correction": elec_cbm_shift_correction
        }