Returns Defective Substitution structure, decorated with charge
        Args:
            supercell (int, [3x1], or [[]] (3x3)): supercell integer, vector, or scaling matrix

def generate_defect_structure(self, supercell=(1, 1, 1)):
        """
        Returns Defective Substitution structure, decorated with charge
        Args:
            supercell (int, [3x1], or [[]] (3x3)): supercell integer, vector, or scaling matrix
        """
        defect_structure = self.bulk_structure.copy()
        defect_structure.make_supercell(supercell)

        # consider modifying velocity property to make sure defect site is decorated
        # consistently with bulk structure for final defect_structure
        defect_properties = self.site.properties.copy()
        if ('velocities' in self.bulk_structure.site_properties) and \
            'velocities' not in defect_properties:
            if all( vel == self.bulk_structure.site_properties['velocities'][0]
                    for vel in self.bulk_structure.site_properties['velocities']):
                defect_properties['velocities'] = self.bulk_structure.site_properties['velocities'][0]
            else:
                raise ValueError("No velocity property specified for defect site and "
                                 "bulk_structure velocities are not homogeneous. Please specify this "
                                 "property within the initialized defect_site object.")

        #create a trivial defect structure to find where supercell transformation moves the lattice
        site_properties_for_fake_struct = {prop: [val] for prop,val in defect_properties.items()}
        struct_for_defect_site = Structure( self.bulk_structure.copy().lattice,
                                             [self.site.specie],
                                             [self.site.frac_coords],
                                             to_unit_cell=True,
                                             site_properties = site_properties_for_fake_struct)
        struct_for_defect_site.make_supercell(supercell)
        defect_site = struct_for_defect_site[0]

        poss_deflist = sorted(
            defect_structure.get_sites_in_sphere(defect_site.coords, 2, include_index=True), key=lambda x: x[1])
        defindex = poss_deflist[0][2]

        subsite = defect_structure.pop(defindex)
        defect_structure.append(self.site.specie.symbol, subsite.coords, coords_are_cartesian=True,
                                properties = defect_site.properties)
        defect_structure.set_charge(self.charge)
        return defect_structure