Parser API#
docksuitex.utils.parser #
Output parser utilities for DockSuiteX log files.
parse_vina_log #
parse_vina_log(
log_file: Union[str, Path, List[Union[str, Path]]],
save_to: Union[str, Path] = "vina_summary.csv",
) -> pd.DataFrame
Parse AutoDock Vina log file(s) into a structured CSV summary.
Extracts receptor/ligand names, grid box parameters, and docking results (affinity and RMSD values) from one or more Vina log files, then writes the results to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log_file
|
Union[str, Path, List[Union[str, Path]]]
|
Path to a single Vina log file, or a list of paths to multiple log files. |
required |
save_to
|
Union[str, Path]
|
Path to save the generated CSV
summary. Defaults to |
'vina_summary.csv'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: DataFrame containing parsed docking results with columns: - Receptor, Ligand - Mode, Affinity (kcal/mol), RMSD LB, RMSD UB - Grid Center (X, Y, Z), Grid Size (X, Y, Z), Grid Spacing - Exhaustiveness |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If any of the specified log files do not exist. |
parse_ad4_dlg #
parse_ad4_dlg(
dlg_file: Union[str, Path, List[Union[str, Path]]],
save_to: Union[str, Path] = "ad4_summary.csv",
) -> pd.DataFrame
Parse AutoDock4 DLG result file(s) into a structured CSV summary.
Extracts receptor and ligand names, grid box parameters, genetic algorithm (GA) settings, and cluster docking results from one or more DLG files, then writes them to a CSV file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dlg_file
|
Union[str, Path, List[Union[str, Path]]]
|
Path to a single AutoDock4 DLG file, or a list of paths to multiple DLG files. |
required |
save_to
|
Union[str, Path]
|
Path to save the generated CSV
summary. Defaults to |
'ad4_summary.csv'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: DataFrame containing parsed docking results with columns: - Receptor, Ligand - Cluster_Rank, RMSD, Binding_Energy - Grid Center (X, Y, Z), Grid Size (X, Y, Z), Spacing - GA parameters (e.g., rmstol, ga_pop_size, ga_num_evals, etc.) |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If any of the specified DLG files do not exist. |