molmim-nim
Use this skill for MolMIM, NVIDIA's BioNeMo NIM microservice for small-molecule latent-space generation and optimization. Invoke for MolMIM, molecular embeddings, hidden states, latent decoding, sampling around a seed SMILES, CMA-ES guided molecule generation, QED or plogP optimization, hosted NVIDI…
Install / Use
npx skills add NVIDIA/skills --skill bionemo-molmim-nimInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of molmim-nim
molmim-nim scores 92/100 on our quality scale, 265th of 960 AI & Machine Learning skills we index (top 28%).
Its SKILL.md is 7.4 KB long, split into 7 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
With 3,421 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 16 days ago, so molmim-nim is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
molmim-nim compared with similar skills
All 4 of these similar skills score higher than molmim-nim; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| molmim-nim (this skill)by NVIDIA | 92 | 3.4k | 16d ago | SKILL.md |
| claude-memby thedotmack | 100 | 99.1k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 95.3k | 2d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.8k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.9k | today | CLAUDE.md |
Frequently asked questions
- How do I install molmim-nim?
- Run
npx skills add NVIDIA/skills --skill molmim-nim. The install tabs above show the steps for each supported agent. - Which AI agents does molmim-nim work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is molmim-nim safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is molmim-nim still maintained?
- The repository was last updated 16 days ago, so molmim-nim is actively maintained.
Skill content
View source on GitHubname: molmim-nim description: > Use this skill for MolMIM, NVIDIA's BioNeMo NIM microservice for small-molecule latent-space generation and optimization. Invoke for MolMIM, molecular embeddings, hidden states, latent decoding, sampling around a seed SMILES, CMA-ES guided molecule generation, QED or plogP optimization, hosted NVIDIA API calls, or local Docker deployment. license: Apache-2.0 AND CC-BY-4.0 compatibility: "requests>=2.28; rdkit" allowed-tools: Bash, Read, Write, AskUserQuestion
MolMIM NIM
Generate, sample, embed, and decode small molecules with MolMIM. Use this guide for first-pass hosted/local usage; load supplemental files only when needed:
references/api.md: endpoints, schema, Docker flags, response fields.references/science.md: use cases, strengths, limits, and handoffs.references/parameters.md: generation, sampling, and optimization effects.references/validation.md: SMILES/property/artifact checks.references/examples.md: compact hosted/local request patterns.
Choose Mode
Ask only when context is unclear:
Hosted NVIDIA API or local Docker NIM?
See references/api.md under Endpoints for the full
hosted/local endpoint list.
Mode difference: the hosted API reference exposes /generate; the local
container exposes the broader latent-space workflow (/embedding, /hidden,
/decode, /sampling, /generate). Do not invent hosted latent endpoints.
Hosted requests use Authorization: Bearer $NGC_API_KEY. Local inference uses
no auth header after readiness.
Local Docker
Use shell env first; source repo-root .env only if present. Do not print keys.
MolMIM docs use NGC_CLI_API_KEY for the local container; this repo accepts
NGC_API_KEY or NVIDIA_API_KEY and maps to NGC_CLI_API_KEY for startup.
Mount LOCAL_NIM_CACHE at /home/nvs/.cache/nim.
For the exact startup preflight (the NGC_API_KEY/NVIDIA_API_KEY →
NGC_CLI_API_KEY mapping, docker login, and the docker run for
nvcr.io/nim/nvidia/molmim:1.0.0), copy the command block in
references/api.md under Local Docker verbatim.
Readiness check:
until curl -sf http://localhost:8000/v1/health/ready; do sleep 5; done
Local embedding smoke test after readiness. Local inference uses no
Authorization header:
import requests
seed = "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
response = requests.post(
"http://localhost:8000/embedding",
headers={"Content-Type": "application/json"},
json={"sequences": [seed]},
timeout=60,
)
response.raise_for_status()
embedding_data = response.json()
embeddings = embedding_data["embeddings"]
print(f"received {len(embeddings)} embedding vector(s)")
Hosted Generation Pattern
Use hosted /generate for seed-SMILES generation or optimization. Use
algorithm: "CMA-ES" for guided property optimization and algorithm: "none"
for unguided sampling around the seed.
import os
import requests
hosted = True
url = (
"https://health.api.nvidia.com/v1/biology/nvidia/molmim/generate"
if hosted else "http://localhost:8000/generate"
)
headers = {"Content-Type": "application/json"}
if hosted:
headers["Authorization"] = f"Bearer {os.getenv('NGC_API_KEY')}"
payload = {
"smi": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C",
"algorithm": "CMA-ES",
"num_molecules": 10,
"property_name": "QED",
"minimize": False,
"min_similarity": 0.4,
"particles": 8,
"iterations": 3,
}
response = requests.post(url, headers=headers, json=payload, timeout=180)
response.raise_for_status()
result = response.json()
Generation gotchas:
- Field name is
smi, notsmiles. algorithmis"CMA-ES"or"none".property_nameis"QED"or"plogP".num_moleculesis 1-100.iterationsis 1-1000.particlesis 2-1000.min_similarityis 0-1 in the hosted API reference; local docs emphasize common values up to 0.7 for constrained optimization.scaled_radiusis 0-2 and is mainly used withalgorithm: "none"or local/sampling.
Local Latent Workflow
Use local-only endpoints for embedding, hidden-state manipulation, and decode.
This is also the surface used by the guided optimization example package.
For local latent workflows, state explicitly that the hosted API reference
exposes /generate; /embedding, /hidden, /decode, and /sampling are
local-only in the current docs.
seed = "CC(Cc1ccc(cc1)C(C(=O)O)C)C"
base = "http://localhost:8000"
headers = {"Content-Type": "application/json"}
embedding = requests.post(
f"{base}/embedding",
headers=headers,
json={"sequences": [seed]},
timeout=60,
)
embedding.raise_for_status()
embedding_data = embedding.json()
embeddings = embedding_data["embeddings"]
print(f"received {len(embeddings)} embedding vector(s)")
hidden = requests.post(
f"{base}/hidden",
headers=headers,
json={"sequences": [seed]},
timeout=60,
)
hidden.raise_for_status()
hidden_data = hidden.json()
hiddens = hidden_data["hiddens"]
mask = hidden_data["mask"]
decoded = requests.post(
f"{base}/decode",
headers=headers,
json={"hiddens": hiddens, "mask": mask},
timeout=60,
)
decoded.raise_for_status()
sampled = requests.post(
f"{base}/sampling",
headers=headers,
json={"sequences": [seed], "num_molecules": 10, "scaled_radius": 0.7},
timeout=60,
)
sampled.raise_for_status()
Save And Validate Output
Save generated SMILES and validate before using them downstream.
from pathlib import Path
import json
def molmim_smiles(result):
values = []
if isinstance(result.get("generated"), list):
for item in result["generated"]:
if isinstance(item, str):
values.append(item)
elif isinstance(item, list):
values.extend(x for x in item if isinstance(x, str))
molecules = result.get("molecules")
if isinstance(molecules, str):
molecules = json.loads(molecules)
if isinstance(molecules, list):
for item in molecules:
if isinstance(item, dict) and isinstance(item.get("sample"), str):
values.append(item["sample"])
return values
generated = molmim_smiles(result)
if not generated:
raise RuntimeError(f"MolMIM returned no generated molecules: {result}")
Path("molmim_response.json").write_text(json.dumps(result, indent=2))
Path("molmim_generated.smi").write_text("\n".join(generated) + "\n")
for i, smiles in enumerate(generated, start=1):
print(i, smiles)
Use RDKit when available to check parseability, uniqueness, simple property ranges, and whether seed similarity constraints are plausible. Generated molecules are candidates, not validated hits; use downstream property, docking, affinity, toxicity, and synthetic-feasibility checks before prioritization.
Troubleshooting
- Hosted
404on/embedding,/hidden,/decode, or/sampling: those endpoints are local-only in the docs. 401: missing or unauthorized NGC key for hosted requests.- Hosted response parsing: live hosted
/generatemay returnmoleculesas a JSON string of{sample, score}objects, while local endpoints may returngenerated; parse both. 422: invalid SMILES, unsupportedalgorithm, invalidproperty_name, or parameter outside documented ranges.- Local startup auth: set
NGC_CLI_API_KEY, or setNGC_API_KEY/NVIDIA_API_KEYand map it as shown above. - Local startup cache misses: mount
LOCAL_NIM_CACHEto/home/nvs/.cache/nim, not/opt/nim/.cache.
Related Skills
claude-mem
99.1kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
95.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
