← NVIDIA BioNeMo Agent ToolkitCONTENT HISTORY

Update to NVIDIA BioNeMo Agent Toolkit

Snapshot Sep 30, 2026 · 23:14 UTC · version 0.1.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "genmol-nim",
  "description": "Generate novel drug-like molecules using the GenMol NIM microservice. Use for de novo generation, scaffold decoration, motif extension, lead optimization, SAFE notation, QED or LogP ranking, hosted NVIDIA API calls, or local Docker deployment. GenMol takes SAFE notation in the smiles field, not ordinary SMILES.",
  "included_files": [
    {
      "relative_path": "references/api.md",
      "size_in_bytes": 6255
    },
    {
      "relative_path": "references/examples.md",
      "size_in_bytes": 1430
    },
    {
      "relative_path": "references/parameters.md",
      "size_in_bytes": 1341
    },
    {
      "relative_path": "references/science.md",
      "size_in_bytes": 1477
    },
    {
      "relative_path": "references/validation.md",
      "size_in_bytes": 1245
    }
  ],
  "skill_md_contents": "---\nname: genmol-nim\ndescription: >\n  Generate novel drug-like molecules using the GenMol NIM microservice. Use for de novo generation, scaffold decoration, motif extension, lead optimization, SAFE notation, QED or LogP ranking, hosted NVIDIA API calls, or local Docker deployment. GenMol takes SAFE notation in the smiles field, not ordinary SMILES.\nlicense: Apache-2.0 AND CC-BY-4.0\ncompatibility: \"safe-mol>=0.1.14; requests>=2.28\"\nallowed-tools: Bash, Read, Write, AskUserQuestion\n---\n\n# GenMol NIM\n\nGenerate drug-like molecules with GenMol. Use this `SKILL.md` for first-pass\nhosted/local usage; load supplemental files only when needed:\n\n- `references/api.md`: endpoints, schema, Docker flags, response fields.\n- `references/science.md`: use cases, strengths, limits, and handoffs.\n- `references/parameters.md`: SAFE patterns and tuning effects.\n- `references/validation.md`: chemical and artifact checks.\n- `references/examples.md`: compact request patterns.\n\n## Choose Mode\n\nAsk only when context is unclear:\n\n> Hosted NVIDIA API or local Docker NIM?\n\n- Hosted: `https://health.api.nvidia.com/v1/biology/nvidia/genmol/generate`\n- Local: `http://localhost:8000/generate`\n\nHosted requests use `Authorization: Bearer $NGC_API_KEY`. Supported local Docker\nstartup uses `NGC_API_KEY` (or `NVIDIA_API_KEY` via the preflight) for\nregistry login, entitlement checks, and first-run model downloads; pass it\ninto the container with `-e NGC_API_KEY`. Local inference requests use no\nauth header after readiness. Warm-cache key-free startup varies by\nimage/version and should not be assumed.\n\n## Local Docker\n\nUse shell env first; source repo-root `.env` only if present. Do not print keys.\nFor local setup answers, include this sequence: env preflight, `docker login`,\n`docker run`, readiness loop, then a no-auth localhost request. Do not invent a\ncache default or drop the `NVIDIA_API_KEY` fallback.\n\n```bash\nset -a\n[ -f .env ] && . ./.env\nset +a\n\nif [ -z \"${NGC_API_KEY:-}\" ] && [ -n \"${NVIDIA_API_KEY:-}\" ]; then\n  export NGC_API_KEY=\"$NVIDIA_API_KEY\"\nfi\n: \"${NGC_API_KEY:?Set NGC_API_KEY or NVIDIA_API_KEY}\"\n: \"${LOCAL_NIM_CACHE:?Set LOCAL_NIM_CACHE}\"\n\necho \"$NGC_API_KEY\" | docker login nvcr.io --username '$oauthtoken' --password-stdin\n\nexport NIM_TEST_GPU=\"${NIM_TEST_GPU:-0}\"\nmkdir -p \"${LOCAL_NIM_CACHE}\"\nchmod 777 \"${LOCAL_NIM_CACHE}\"\n\ndocker run --rm -it --name genmol-nim \\\n  --runtime=nvidia --gpus=all \\\n  -e NVIDIA_VISIBLE_DEVICES=\"${NIM_TEST_GPU}\" \\\n  --shm-size=2G \\\n  --ulimit memlock=-1 \\\n  --ulimit stack=67108864 \\\n  -e NGC_API_KEY \\\n  -v \"${LOCAL_NIM_CACHE}:/opt/nim/.cache\" \\\n  -p 8000:8000 \\\n  nvcr.io/nim/nvidia/genmol:1.0.1\n```\n\nGenMol is single-GPU; `NIM_TEST_GPU` defaults to `0`. Wait for readiness:\n\n```bash\nuntil curl -sf http://localhost:8000/v1/health/ready; do sleep 5; done\n```\n\n## SAFE Input\n\nThe API field is named `smiles`, but GenMol expects SAFE notation. Masked\npositions use `[*{min-max}]`.\n\n- De novo: `safe_input = \"[*{20-30}]\"`\n- Scaffold decoration: `safe_input = scaffold_to_safe(\"C1CC(=O)NC1\", 10, 15)`\n- Motif extension: `safe_input = f\"[*{{5-10}}].{motif_safe}.[*{{5-10}}]\"`\n- Lead optimization: encode the hit, then replace a fragment with `.[*{5-12}]`\n\nUse `safe-mol` for conditioned generation. Simple ring scaffolds may raise\n`SAFEFragmentationError`; fall back to the original SMILES plus a SAFE mask.\n\n```python\nimport safe as sf\n\ndef scaffold_to_safe(smiles: str, frag_min: int, frag_max: int) -> str:\n    try:\n        safe_str = sf.encode(smiles)\n    except sf.SAFEFragmentationError:\n        safe_str = smiles\n    return f\"{safe_str}.[*{{{frag_min}-{frag_max}}}]\"\n```\n\nWider masks increase diversity; tight masks keep analog size more predictable.\n\n## Request Pattern\n\n```python\nimport os\nimport requests\n\nHOSTED = True\nurl = (\n    \"https://health.api.nvidia.com/v1/biology/nvidia/genmol/generate\"\n    if HOSTED else \"http://localhost:8000/generate\"\n)\nheaders = {\"Content-Type\": \"application/json\"}\nif HOSTED:\n    headers[\"Authorization\"] = f\"Bearer {os.environ['NGC_API_KEY']}\"\n\npayload = {\n    \"smiles\": \"[*{20-30}]\",  # SAFE notation\n    \"num_molecules\": 30,\n    \"temperature\": \"1.0\",    # string, not float\n    \"noise\": \"1.0\",          # string, not float\n    \"step_size\": 1,\n    \"scoring\": \"QED\",        # or \"LogP\"\n    \"unique\": False,\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=180)\nresponse.raise_for_status()\nresult = response.json()\n```\n\nGotchas:\n\n- `temperature` and `noise` are strings.\n- `num_molecules` is 1-1000; invalid/duplicate molecules may be filtered, so\n  request extra when the user needs a minimum count.\n- `scoring` is `\"QED\"` for drug-likeness or `\"LogP\"` for lipophilicity.\n- Set `unique=True` for deduplicated analog lists.\n\n## Save And Report Output\n\n```python\nif result.get(\"status\") != \"success\":\n    raise RuntimeError(result.get(\"error\", \"GenMol failed\"))\n\nmolecules = sorted(result[\"molecules\"], key=lambda m: m[\"score\"], reverse=True)\nfor rank, mol in enumerate(molecules[:30], start=1):\n    print(f\"{rank:3d} {mol['score']:8.4f} {mol['smiles']}\")\n\nwith open(\"generated_molecules.smi\", \"w\", encoding=\"utf-8\") as handle:\n    handle.write(\"smiles\\tscore\\n\")\n    for mol in molecules:\n        handle.write(f\"{mol['smiles']}\\t{mol['score']:.4f}\\n\")\n```\n\nFor chemical validity, uniqueness, PAINS/alerts, and visualization with RDKit,\nread `references/validation.md`.\n\n## Limits And Troubleshooting\n\n- Fewer molecules than requested is expected after filtering.\n- Invalid SAFE strings cause `status: \"failed\"` or validation errors.\n- Install `safe-mol` only for scaffold, motif, or lead-optimization workflows;\n  de novo masks work without conversion.\n- Local startup downloads about 20 GB into `LOCAL_NIM_CACHE`.\n- Container issues: confirm `nvidia-smi`, NVIDIA Container Toolkit, and\n  `--runtime=nvidia`; use `NIM_TEST_GPU` to choose the single visible GPU.\n"
}

SHA-256: f9b84fc8850b90e7946426034bfb25e4f2bcc99566b8c4d37f7f2adc195abe03