OCDocker.Docking.BaseVinaLike module¶
Set of generic functions to read and write Vina-like docking logs, generate docking digests, and retrieve docked poses.
Usage:
import OCDocker.Docking.BaseVinaLike as ocbasevina
- OCDocker.Docking.BaseVinaLike.generate_smina_digest(digestPath, logPath, overwrite=False, digestFormat='json', box_id=None)[source]¶
Wrapper for generating the Smina digest.
- Parameters:
digestPath (str) – Where to store the digest file.
logPath (str) – The path to the Smina log file.
overwrite (bool, optional) – If True, overwrites the output files if they already exist. (default is False)
digestFormat (str, optional) – The format of the digest file. The options are: [ json (default), hdf5 (not implemented) ]
box_id (str | None) –
- Returns:
The exit code of the command (based on the Error.py code table).
- Return type:
int
- OCDocker.Docking.BaseVinaLike.generate_vina_digest(digestPath, logPath, overwrite=False, digestFormat='json', box_id=None)[source]¶
Wrapper for generating the Vina digest.
- Parameters:
digestPath (str) – Where to store the digest file.
logPath (str) – The path to the Vina log file.
overwrite (bool, optional) – If True, overwrites the output files if they already exist. (default is False)
digestFormat (str, optional) – The format of the digest file. The options are: [ json (default), hdf5 (not implemented) ]
box_id (str | None) –
- Returns:
The exit code of the command (based on the Error.py code table).
- Return type:
int
- OCDocker.Docking.BaseVinaLike.generate_gnina_digest(digestPath, logPath, overwrite=False, digestFormat='json', box_id=None)[source]¶
Wrapper for generating the Gnina digest.
- Parameters:
digestPath (str) – Where to store the digest file.
logPath (str) – The path to the Gnina log file.
overwrite (bool, optional) – If True, overwrites the output files if they already exist. (default is False)
digestFormat (str, optional) – The format of the digest file. The options are: [ json (default), hdf5 (not implemented) ]
box_id (str | None) –
- Returns:
The exit code of the command (based on the Error.py code table).
- Return type:
int
- OCDocker.Docking.BaseVinaLike.get_smina_docked_poses(posesPath)[source]¶
Wrapper for getting the Smina docked poses.
- Parameters:
posesPath (str) – The path to the Smina docked poses folder.
- Returns:
A list with the paths to the Smina docked poses.
- Return type:
List[str]
- OCDocker.Docking.BaseVinaLike.get_vina_docked_poses(posesPath)[source]¶
Get the paths for the docked poses from Vina output directory.
- Parameters:
posesPath (str) – The path to the directory containing the docked poses.
- Returns:
A list with the paths for the docked poses. Returns an empty list if the directory does not exist.
- Return type:
List[str]
- OCDocker.Docking.BaseVinaLike.get_gnina_docked_poses(posesPath)[source]¶
Get the paths for the docked poses from Gnina output directory.
- Parameters:
posesPath (str) – The path to the directory containing the docked poses.
- Returns:
A list with the paths for the docked poses. Returns an empty list if the directory does not exist.
- Return type:
List[str]
- OCDocker.Docking.BaseVinaLike.read_smina_log(path, onlyBest=False)[source]¶
Wrapper for reading the Smina log file.
- Parameters:
path (str) – The path to the Smina log file.
onlyBest (bool, optional) – If True, only the best pose will be returned. By default False.
- Returns:
A dictionary with the data from the Smina log file.
- Return type:
Dict[int, Dict[str, float]]
- OCDocker.Docking.BaseVinaLike.read_smina_rescoring_log(path)[source]¶
Wrapper for reading the Smina rescoring log file.
- Parameters:
path (str) – The path to the Smina rescoring log file.
- Returns:
The affinity of the ligand from the Smina rescoring log file.
- Return type:
float
- OCDocker.Docking.BaseVinaLike.read_vina_log(path, onlyBest=False)[source]¶
Wrapper for reading the Vina log file.
- Parameters:
path (str) – The path to the Vina log file.
onlyBest (bool, optional) – If True, only the best pose will be returned. By default False.
- Returns:
A dictionary with the data from the Vina log file.
- Return type:
Dict[int, Dict[str, float]]
- OCDocker.Docking.BaseVinaLike.read_gnina_log(path, onlyBest=False)[source]¶
Wrapper for reading the Gnina log file.
- Parameters:
path (str) – The path to the Gnina log file.
onlyBest (bool, optional) – If True, only the best pose will be returned. By default False.
- Returns:
A dictionary with the data from the Gnina log file.
- Return type:
Dict[int, Dict[str, float]]