BioAgentFlow 快速入门指南
This guide walks you through installing BioAgentFlow, running your first virtual screening job, and interpreting the output.
| Requirement | Minimum | Notes |
|---|---|---|
| Python | 3.10+ | 3.11 or 3.12 recommended |
| pip | 22+ | pip install --upgrade pip |
| OS | Linux, macOS, Windows (WSL2) | Native Windows support is experimental |
| RAM | 8 GB | 16 GB recommended for larger libraries |
| GPU | Not required | Optional; speeds up ESMFold and DiffDock |
| Docker | 20.10+ | Only if using Docker installation |
Note: 基本虚拟筛选无需 GPU,普通笔记本即可运行。
Choose one of the three methods below.
pip install bioagentflowVerify the installation:
bioagentflow --versiondocker pull bioagentflow/bioagentflow:latest
docker run --rm bioagentflow/bioagentflow:latest bioagentflow --versiongit clone https://github.com/BioAgentFlow/BioAgentFlow.git
cd BioAgentFlow
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
bioagentflow --versionWe will screen the human carbonic anhydrase II protein (UniProt: P00918) against a small subset of ZINC15 compounds.
Create a file called quickstart.yaml:
# quickstart.yaml -- minimal BioAgentFlow configuration
target:
source: uniprot
id: P00918 # Human carbonic anhydrase II
structure:
method: alphafold # Fetch from AlphaFold DB (no prediction needed)
ligands:
source: zinc15
subset: fda-approved # Small set for a quick test
max_compounds: 50
docking:
engine: diffdock
num_poses: 5
filtering:
rules:
- lipinski
- veber
output:
directory: ./results
formats:
- csv
- htmlbioagentflow screen --config quickstart.yamlYou will see progress output for each pipeline stage:
[1/6] Target Discovery ... P00918 (Carbonic anhydrase 2) found ✔
[2/6] Structure ... fetched from AlphaFold DB ✔
[3/6] Ligand Preparation ... 50 compounds retrieved from ZINC15 ✔
[4/6] Docking ... 250 poses generated (50 × 5) ✔
[5/6] Scoring ... ranked by DiffDock confidence ✔
[6/6] Filtering ... 12 compounds passed Lipinski + Veber ✔
Report saved to ./results/
The results/ directory now contains:
results/
├── docking_scores.csv # All 50 compounds with scores
├── filtered_hits.csv # 12 compounds that passed ADMET filters
├── report.html # Human-readable HTML report
├── structures/ # Docked pose PDB files
│ ├── ZINC000003986735_pose1.pdb
│ └── ...
└── metadata.json # Run parameters and timing
| Column | Description |
|---|---|
compound_id |
ZINC or ChEMBL identifier (化合物编号) |
smiles |
Canonical SMILES string |
score |
DiffDock confidence score (higher is better) |
pose_rank |
Rank of this pose among multiple poses for the same compound |
mw |
Molecular weight (分子量) |
logp |
Predicted octanol-water partition coefficient |
hbd |
Hydrogen bond donors |
hba |
Hydrogen bond acceptors |
tpsa |
Topological polar surface area |
rotatable_bonds |
Number of rotatable bonds (可旋转键数) |
Same columns as above, but only rows that satisfy all active filter rules. An additional column pass_rules lists which rules each compound satisfied.
An interactive HTML page with:
- Summary statistics for the run
- Sortable table of top hits
- 2D compound structure images
- Filter rule pass/fail breakdown
Machine-readable record of all run parameters, software versions, data source timestamps, and wall-clock timing per stage. Useful for reproducibility.
For interactive exploration, launch the Streamlit dashboard:
bioagentflow uiThis opens a browser at http://localhost:8501 where you can:
- Configure a screening run using form inputs instead of YAML.
- Monitor pipeline progress in real time.
- Explore results with sortable tables and interactive charts.
- Adjust filter thresholds and see the hit list update immediately.
- Export filtered results to CSV or SDF.
To load previous results without re-running:
bioagentflow ui --results ./resultsNow that you have completed your first screen, consider exploring:
- Larger compound libraries -- remove the
max_compoundslimit or switch to the fullzinc15orchemblsource. - Structure prediction -- set
structure.method: esmfoldto predict a structure from sequence when no experimental or AlphaFold structure is available. - Custom filters -- add your own ADMET rules by writing a filter plugin (see Architecture).
- Batch screening -- pass a CSV of multiple target IDs with
bioagentflow screen --targets targets.csv. - Python API -- integrate BioAgentFlow into your own scripts for programmatic access (see examples in the README).
For deeper technical details, see the Architecture Document.
如有问题,请在 GitHub 上提交 Issue 或参与 Discussion。祝筛选顺利!