# unimol-ops > Run Uni-Mol/Uni-Mol2/Uni-Mol Docking workflows in this repo: env setup, downloading weights, using unimol_tools (pip), finetuning or inference with unicore/torchrun, docking v2 demos, and quick troubleshooting. Trigger when working with the Uni-Mol repository or unimol_tools tasks (property prediction, representation, docking, conformation, pocket/molecule finetune, Uni-Mol2 models). - Author: Siyu Liu - Repository: IntelligentMat/Materials-Science-Skills-For-LLM - Version: 20251221161123 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/IntelligentMat/Materials-Science-Skills-For-LLM - Web: https://mule.run/skillshub/@@IntelligentMat/Materials-Science-Skills-For-LLM~unimol-ops:20251221161123 --- --- name: unimol-ops description: "Run Uni-Mol/Uni-Mol2/Uni-Mol Docking workflows in this repo: env setup, downloading weights, using unimol_tools (pip), finetuning or inference with unicore/torchrun, docking v2 demos, and quick troubleshooting. Trigger when working with the Uni-Mol repository or unimol_tools tasks (property prediction, representation, docking, conformation, pocket/molecule finetune, Uni-Mol2 models)." --- # UniMol Ops ## Overview Use this skill whenever you need to operate the Uni-Mol codebase or the `unimol_tools` Python package: install dependencies, grab weights, run property prediction/representation, finetune or infer Uni-Mol/Uni-Mol2 models, or execute Uni-Mol Docking V2 demos. ## Quick Start (minimal) - Python ≥3.8 with GPU PyTorch installed first (match your CUDA). - RDKit pinned: `rdkit-pypi==2022.9.3` for Uni-Mol/ Docking V2, `rdkit==2022.09.5` for Uni-Mol2. - Install uni-core (required by training scripts): follow its install steps before running `unicore-train` / `torchrun`. - Optional helpers: `pip install huggingface_hub` for auto model downloads; set `HF_ENDPOINT=https://hf-mirror.com` if needed. Cache weights elsewhere with `UNIMOL_WEIGHT_DIR=/path/to/weights`. - For quick use, prefer `pip install unimol_tools --upgrade`; see reference for code snippets. ## Task Menu (pick and jump) 1) **Property prediction / representation (quickest)**: use `unimol_tools` classes `MolTrain`, `MolPredict`, `UniMolRepr`. See `references/workflows.md#unimol_tools-quick-calls` for ready code. 2) **Finetune classic Uni-Mol (v1)**: `unicore-train` templates for molecule property, pocket property, conformation gen, and binding pose; hyperparam tables in `references/workflows.md#unimol-v1-finetune-templates`. 3) **Uni-Mol2 downstream**: `torchrun` template with selectable model size (84M–1.1B) in `references/workflows.md#unimol2-finetune`. 4) **Docking V2 inference demo**: `interface/demo.py` CLI and batch CSV flow summarized in `references/workflows.md#docking-v2-inference`. 5) **Data & weights**: dataset/weight links live in repo READMEs; quick pointers and environment notes in `references/resources.md`. ## Checklist before running training/inference - Confirm `unicore-train` (from Uni-Core) on PATH; run `which unicore-train`. - GPUs: set `CUDA_VISIBLE_DEVICES` as needed; NCCL stability: `export NCCL_ASYNC_ERROR_HANDLING=1` and `OMP_NUM_THREADS=1` per templates. - Align hydrogen handling: `only_polar=-1` (all H), `0` (no H), `1` (polar H) consistently across pretrain/finetune. - For multi-GPU: compute `update_freq = global_batch / (per_gpu_batch * n_gpu)`. - For HF downloads behind firewall: set `HF_ENDPOINT`; for pre-downloaded weights, set `UNIMOL_WEIGHT_DIR`. ## Troubleshooting quickies - **rdkit import fails / numpy mismatch**: pin `numpy<2.0.0` when using rdkit; reinstall rdkit after numpy changes. - **Download slow**: use `HF_ENDPOINT` mirror; resume with `huggingface_hub` cache or manual weight copy into `UNIMOL_WEIGHT_DIR`. - **unicore-train not found**: install Uni-Core and ensure its `bin` on PATH or call via `python -m unicore.train` equivalent. - **OOM during finetune**: reduce `batch_size` or increase `update_freq`; lower `conf_size` for 3D tasks. - **Docking clashes**: pass `--steric-clash-fix` in `interface/demo.py` to relax outputs. ## References Read as needed (kept short here): - `references/workflows.md`: command templates for unimol_tools, Uni-Mol v1 finetune/infer, Uni-Mol2 finetune, Docking V2 demo. - `references/resources.md`: dependency pins, env vars, dataset/weight link pointers, mirror tips.