def score(self, function, protein = None, *args, **kwargs):
        if type(protein) is str:
            extension = protein.split('.')[-1]
            protein = toolkit.readfile(extension, protein).next()
            protein.protein = True
        # trigger cache
        protein.atom_dict

        if type(function) is str:
            if function.lower().startswith('rfscore'):
                from oddt.scoring.functions.RFScore import rfscore
                tmp = function.lower().split('_')
                v = int(tmp[-1][1:]) if len(tmp) > 1 else 1
                sf = rfscore.load(version=v)
                sf.set_protein(protein)
            elif function.lower() == 'nnscore':
                from oddt.scoring.functions.NNScore import nnscore
                sf = nnscore.load()
                sf.set_protein(protein)
            elif function.lower() == 'autodock_vina':
                from oddt.docking import autodock_vina
                sf = autodock_vina(protein, *args, **kwargs)
                sf.set_protein(protein)
            else:
                raise ValueError('Scoring Function %s was not implemented in ODDT' % function)
        else:
            if hasattr(function, 'set_protein') and hasattr(function, 'predict_ligands') and hasattr(function, 'predict_ligand'):
                sf = function
                sf.set_protein(protein)
            else:
                raise ValueError('Supplied object "%s" is not an ODDT scoring funtion' % function.__name__)
        if self.n_cpu != 1:
            _parallel_helper_partial = partial(_parallel_helper, sf, 'predict_ligand')
            self._pipe = self._pool.imap(_parallel_helper_partial, ({'ligand': lig} for lig in self._pipe), chunksize=100)
        else:
            self._pipe = sf.predict_ligands(self._pipe)
Produces general documentation for the interface
dataset/ETHPy150Open oddt/oddt/oddt/virtualscreening.py/virtualscreening.score--crossover with--dataset/ETHPy150Open timothycrosley/hug/hug/interface.py/Interface.documentation