OCDocker.Console.session module¶
Console session helpers: namespace construction, REPL loop, and utilities.
Builds the preloaded interactive namespace (docking modules, Initialise
symbols, print_args, clean_test_files) and runs the command loop with
tab-completion and history.
- OCDocker.Console.session.clean_test_files(baseProtPath, baseLigPath, baseDecPath, baseCanPath)[source]¶
Reset the test_files folder to its original state.
- Parameters:
baseProtPath (str) – Path to the base protein folder.
baseLigPath (str) – Path to the base ligand folder.
baseDecPath (str) – Path to the base decoy folder.
baseCanPath (str) – Path to the base candidates folder.
- Return type:
None
- OCDocker.Console.session.print_args(program='')[source]¶
Print environment variables and optionally program-specific settings.
Console usage examples:
print_args()— environment overviewprint_args('paths')— relevant paths and binariesprint_args('db')— database connectionsprint_args('vina')— Vina parametersprint_args('smina')— Smina parametersprint_args('plants')— PLANTS parametersprint_args('gnina')— Gnina parameters (if configured)print_args('oddt')— ODDT parametersprint_args('all')— print all sections
- Parameters:
program (str, optional) – Section selector (
paths,db,vina,smina,plants,gnina,oddt,all). Empty string prints the overview only.- Return type:
None
- OCDocker.Console.session.build_namespace()[source]¶
Build the interactive console namespace after environment bootstrap.
- Returns:
Mapping of names exposed in the REPL (Initialise symbols, docking modules, helpers).
- Return type:
dict[str, Any]
- OCDocker.Console.session.run_interactive(namespace, *, use_ipython=False)[source]¶
Run the interactive console loop.
- Parameters:
namespace (Mapping[str, Any]) – Preloaded namespace for Python execution.
use_ipython (bool, optional) – When
Trueand IPython is installed, useIPython.embedinstead of the simple command loop.
- Returns:
Exit code (0 for success).
- Return type:
int