Download libs/docking/base.py from QPromaQ/Docking_project: direct link, hf CLI and curl.
- Browser
- Download file 2.01 kB
-
https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/libs/docking/base.py
- Command line
-
hf download hf://datasets/QPromaQ/Docking_project/libs/docking/base.py
-
curl -L -o base.py https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/libs/docking/base.py
2.01 kB
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from dataclasses import dataclass, field | |
| from pathlib import Path | |
| from typing import Any, Dict, Sequence | |
| class BackendCapability: | |
| backend_name: str | |
| available: bool | |
| details: Dict[str, Any] | |
| class DockingResult: | |
| ligand_id: str | |
| docking_score: float | |
| pose_path: Path | None | |
| backend_name: str | |
| backend_mode: str | |
| score_source: str | |
| raw_output_file: str | |
| parsed_from: str | |
| fallback_used: bool | |
| success: bool | |
| message: str = "" | |
| command: str = "" | |
| extra: Dict[str, Any] = field(default_factory=dict) | |
| class DockingError(RuntimeError): | |
| """Generic docking backend error.""" | |
| class BackendUnavailableError(DockingError): | |
| """Raised when requested backend capability is not available.""" | |
| class DockingBackend(ABC): | |
| """Common backend interface for all docking engines.""" | |
| def check_capability(self) -> BackendCapability: | |
| pass | |
| def prepare_target(self, target_path: str | Path, work_dir: str | Path) -> Dict[str, Any]: | |
| pass | |
| def prepare_ligand(self, ligand_id: str, smiles: str, work_dir: str | Path) -> Path: | |
| pass | |
| def build_site_or_constraints( | |
| self, | |
| target_context: Dict[str, Any], | |
| reference_ligand: Path, | |
| work_dir: str | Path, | |
| ) -> Path: | |
| pass | |
| def dock( | |
| self, | |
| target_context: Dict[str, Any], | |
| ligand_files: Sequence[Path], | |
| work_dir: str | Path, | |
| allow_mock: bool = False, | |
| require_real_backend: bool = False, | |
| ) -> list[DockingResult]: | |
| pass | |
| def parse_results(self, results: Sequence[DockingResult]) -> list[dict[str, Any]]: | |
| pass | |
| def extract_interface_features(self, parsed_results: Sequence[dict[str, Any]]) -> list[dict[str, float]]: | |
| pass | |