OCDocker.Rescoring.ODDT module¶
Sets of classes and functions to perform rescoring of docking results using the ODDT.
They are imported as:
import OCDocker.Rescoring.ODDT as ocoddt
- OCDocker.Rescoring.ODDT.df_to_dict(data)[source]¶
Convert the data from a pandas dataframe to a dict.
- Parameters:
data (pd.DataFrame) – The data to be converted.
- Returns:
The converted data.
- Return type:
Dict[str, Dict[str, float]]
- OCDocker.Rescoring.ODDT.get_models(outputPath)[source]¶
Get the models from the output path.
- Parameters:
outputPath (str) – The path to the output folder.
- Returns:
A list with the paths to the models.
- Return type:
List[str]
- OCDocker.Rescoring.ODDT.read_log(path)[source]¶
Read the oddt log path, returning the data from complexes.
- Parameters:
path (str) – The path to the oddt csv log file.
- Returns:
A pd.DataFrame with the data from the vina log file. If the file does not exist, None is returned.
- Return type:
pd.DataFrame | None
- OCDocker.Rescoring.ODDT.run_oddt(preparedReceptorPath, preparedLigandPath, ligandName, outputPath, returnData=True, overwrite=False, cleanModels=False, n_cpu=-1, verbose=False, chunksize=100, read_receptor_retries=5, read_receptor_delay=1.0)[source]¶
Run ODDT programatically.
- Parameters:
preparedReceptorPath (str) – The receptor to be used in the rescoring.
preparedLigandPath (str | List[str]) – The ligand to be used in the rescoring. If a list is given, the rescoring will be performed for each ligand in the list.
ligandName (str) – The name of the ligand.
outputPath (str) – The path where the output file will be saved.
returnData (bool, optional) – If True, the data will be returned. The default is True.
overwrite (bool, optional) – If True, the output file will be overwritten. The default is False.
cleanModels (bool, optional) – If True, the models will be deleted after the rescoring. The default is False. If set to False, this can speed up the rescoring process for multiple ligands (you probably will not want to set this to True).
n_cpu (int, optional) – The number of CPUs to be used. The default is -1 (all available CPUs).
verbose (bool, optional) – If True, the output will be verbose. The default is False.
chunksize (int, optional) – The chunksize to be used. The default is 100.
read_receptor_retries (int, optional) – Number of attempts to read the prepared receptor. The default is 5.
read_receptor_delay (float, optional) – Delay in seconds between attempts to read the prepared receptor. The default is 1.0.
- Returns:
The exit code of the command (based on the Error.py code table).
- Return type:
int