visualization-utilities
Guides agents using datamol visualization, molecule image rendering, lasso highlighting, dataframe display, parallel utilities, filesystem helpers, RDKit log controls, and environment diagnostics.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- visualization-utilities
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides agents using datamol visualization, molecule image rendering, lasso highlighting, dataframe display, parallel utilities, filesystem helpers, RDKit log controls, and environment diagnostics.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md10.5 KB
- 参考文档references/troubleshooting.md8.4 KB
- 参考文档references/workflows.md8.1 KB
- 脚本scripts/visualization_utility_smoke.py3.8 KB
03 SKILL.md 正文
Visualization Utilities
Use this sub-skill when the task asks to render molecules, save SVG/PNG depictions, highlight substructures, display molecule dataframes, visualize existing conformers, run small datamol utility jobs, inspect fsspec paths, silence RDKit logs, or diagnose datamol/RDKit runtime behavior.
Route First
- For molecule parsing, cleanup, dataframe construction, SDF/CSV/XLSX IO, or property preservation before rendering, use
../molecule-io-prep/first. - For conformer generation, 3D coordinate creation, SASA, alignment, scaffolds, fragments, reactions, tautomers, or isomers, use
../structure-generation/first. - For fingerprints, clustering, distance matrices, MCS, graph comparisons, or diversity selection before visualization, use
../fingerprints-similarity/first.
What This Covers
- 2D grids with
dm.viz.to_image()or top-leveldm.to_image()from SMILES or RDKit molecules. - SMARTS, query-molecule, and explicit atom-index highlighting with
dm.viz.lasso_highlight_image()anddm.viz.match_substructure(). - File and notebook output choices, including SVG strings, Pillow PNG objects, and
outfilepaths handled through fsspec. - Existing-conformer display with
dm.viz.conformers()when optional notebook widgets are installed and conformers already exist. - Utility helpers:
dm.parallelized(),dm.parallelized_with_batches(),dm.JobRunner,dm.utils.fs,dm.utils.perf.watch_duration,dm.utils.decorators.disable_on_os, and RDKit log/version helpers.
Reference Map
- Use
references/api-reference.mdfor signatures, parameters, return types, utility helper notes, and ownership boundaries. - Use
references/workflows.mdfor SVG/PNG rendering, lasso highlights, dataframe rendering, parallel jobs, fsspec checks, RDKit log control, and diagnostics recipes. - Use
references/troubleshooting.mdfor headless rendering, invalid highlight indices, SVG/PNG/Pillow issues, notebook assumptions, fsspec URI errors, and joblib pickling failures. - Run
scripts/visualization_utility_smoke.py --helpfor a safe executable smoke test, or run it with--output-dir <dir>to render a tiny SVG and exercise utility helpers.
Decision Checklist
- Normalize input molecules with the root skill or
../molecule-io-prep/if the task starts from mixed files, tables, or potentially invalid SMILES. - Choose
use_svg=Truefor deterministic text artifacts anduse_svg=Falseonly when the caller explicitly needs PNG/Pillow output. - Prefer
lasso_highlight_image()for publication-style outline highlights andto_image(highlight_atom=..., highlight_bond=...)ormatch_substructure()for simple RDKit grid highlights. - Keep parallel helper callables top-level or otherwise picklable when using process workers; use
scheduler="threads"orn_jobs=0/1for closures and notebook workflows. - Wrap noisy parsing or rendering probes in
dm.without_rdkit_log()and restore global logs withdm.enable_rdkit_log()after temporary global muting.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).