Do delocalization analysis. To do this, one considers:
            i) sampling region of planar averaged electrostatic potential (freysoldt approach)
            ii) sampling region of atomic site averaged potentials (kumagai approach)
            iii) structural relaxation amount outside of radius considered in kumagai approach (default is wigner seitz radius)
            iv) if defect is not a vacancy type -> track to see how much the defect has moved

        calculations that fail delocalization get "is_compatibile" set to False in parameters
        also parameters recieves a "delocalization_meta" with following dict:
            plnr_avg = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            atomic_site = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            structure_relax = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            defectsite_relax = {'is_compatible': True/False, 'metadata': metadata used for determing this}

def delocalization_analysis(self, defect_entry):
        """
        Do delocalization analysis. To do this, one considers:
            i) sampling region of planar averaged electrostatic potential (freysoldt approach)
            ii) sampling region of atomic site averaged potentials (kumagai approach)
            iii) structural relaxation amount outside of radius considered in kumagai approach (default is wigner seitz radius)
            iv) if defect is not a vacancy type -> track to see how much the defect has moved

        calculations that fail delocalization get "is_compatibile" set to False in parameters
        also parameters recieves a "delocalization_meta" with following dict:
            plnr_avg = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            atomic_site = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            structure_relax = {'is_compatible': True/False, 'metadata': metadata used for determining this}
            defectsite_relax = {'is_compatible': True/False, 'metadata': metadata used for determing this}
        """
        defect_entry.parameters.update({'is_compatible': True}) #this will be switched to False if delocalization is detected

        if 'freysoldt_meta' in defect_entry.parameters.keys():
            defect_entry = self.is_freysoldt_delocalized(defect_entry)
        else:
            print('Insufficient information provided for performing Freysoldt '
                  'correction delocalization analysis.\n'
                  'Cannot perform planar averaged electrostatic potential '
                  'compatibility analysis.')


        if 'kumagai_meta' in defect_entry.parameters.keys():
            defect_entry = self.is_kumagai_delocalized(defect_entry)
        else:
            print('Insufficient information provided for performing Kumagai '
                  'correction delocalization analysis.\n'
                  'Cannot perform atomic site averaged electrostatic '
                  'potential compatibility analysis.')


        if ('final_defect_structure' in defect_entry.parameters.keys()) and \
                ('initial_defect_structure' in defect_entry.parameters.keys()) and \
                ('sampling_radius' in defect_entry.parameters.keys()):
            defect_entry = self.is_final_relaxed_structure_delocalized(defect_entry)
        else:
            print('Insufficient information provided in defect_entry.parameters. '
                  'Cannot perform full structure site relaxation compatibility analysis.')

        return defect_entry