def cfg_to_opts(config):
    """ converts a config to opts

    Args:
      config (ConfigParser): configuration object from which options are to be extracted

    Returns:
      opts (dict): dictionary of options read in from the configuration object
    """
    opts = {}
    opts['prot_file'] = config.get('General', 'prot_file', fallback=None)
    opts['lig_file'] = config.get('General', 'lig_file', fallback=None)
    opts['min_rad'] = config.getfloat('General', 'min_rad', fallback=1.4)
    opts['max_rad'] = config.getfloat('General', 'max_rad', fallback=3.4)
    opts['mode'] = config.get('Specification', 'mode', fallback=None)
    opts['resid'] = config.get('Specification', 'resid', fallback=None)
    opts['coordinates'] = config.get('Specification', 'coordinates',
        fallback=None)
    opts['lig_excl_rad'] = config.getfloat('Specification', 'lig_excl_rad',
        fallback=-1)
    opts['lig_incl_rad'] = config.getfloat('Specification', 'lig_incl_rad',
        fallback=-1)
    opts['subdivide'] = config.getboolean('Partitioning', 'subdivide',
        fallback=False)
    opts['min_volume'] = config.getint('Partitioning', 'min_volume',
        fallback=200)
    opts['max_clusters'] = config.getint('Partitioning', 'max_clusters',
        fallback=100)
    opts['min_subpocket_rad'] = config.getfloat('Partitioning',
        'min_subpocket_rad', fallback=1.7)
    opts['max_subpocket_rad'] = config.getfloat('Partitioning',
        'max_subpocket_rad', fallback=3.4)
    opts['min_subpocket_surf_rad'] = config.getfloat('Partitioning',
        'min_subpocket_surf_rad', fallback=1.0)
    opts['radial_sampling'] = config.getfloat('Partitioning',
        'radial_sampling', fallback=0.1)
    opts['inclusion_radius_buffer'] = config.getfloat('Partitioning',
        'inclusion_radius_buffer', fallback=1.0)
    opts['min_cluster_size'] = config.getint('Partitioning',
        'min_cluster_size', fallback=50)
    opts['project_dir'] = config.get('Output', 'project_dir', fallback=None)
    opts['output_dir'] = config.get('Output', 'output_dir', fallback=None)
    opts['prefix'] = config.get('Output', 'prefix', fallback=None)
    opts['logger_stream_level'] = config.get('Output',
        'logger_stream_level', fallback='INFO')
    opts['logger_file_level'] = config.get('Output', 'logger_file_level',
        fallback='DEBUG')
    opts['protein'] = config.get('PyMOL', 'protein', fallback=None)
    opts['ligand'] = config.get('PyMOL', 'ligand', fallback=None)
    opts['protein_only'] = config.get('PyMOL', 'protein_only', fallback=True)
    opts['display_mode'] = config.get('PyMOL', 'display_mode', fallback='solid'
        )
    opts['palette'] = config.get('PyMOL', 'palette', fallback=None)
    opts['alpha'] = config.get('PyMOL', 'alpha', fallback=0.85)
    return opts
