<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auto_flexdock(self, binding_residues, radius, ligand_path=None, force_rerun=False):
 """Run DOCK6 on a PDB file, given its binding residues and a radius around them. Provide a path to a ligand to dock a ligand to it. If no ligand is provided, DOCK6 preparations will be run on that structure file. Args: binding_residues (str):
 Comma separated string of residues (eg: '144,170,199') radius (int, float):
 Radius around binding residues to dock to ligand_path (str):
 Path to ligand (mol2 format) to dock to protein force_rerun (bool):
 If method should be rerun even if output files exist """

        log.debug('\n{}: running DOCK6...\n'
                 '\tBinding residues: {}\n'
                 '\tBinding residues radius: {}\n'
                 '\tLigand to dock: {}\n'.format(self.id, binding_residues, radius, op.basename(ligand_path)))

        self.dockprep(force_rerun=force_rerun)
        self.protein_only_and_noH(force_rerun=force_rerun)
        self.dms_maker(force_rerun=force_rerun)
        self.sphgen(force_rerun=force_rerun)
        self.binding_site_mol2(residues=binding_residues, force_rerun=force_rerun)
        self.sphere_selector_using_residues(radius=radius, force_rerun=force_rerun)
        self.showbox(force_rerun=force_rerun)
        self.grid(force_rerun=force_rerun)

        if ligand_path:
            self.do_dock6_flexible(ligand_path=ligand_path, force_rerun=force_rerun)