AGENT SKILL

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

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-level dm.to_image() from SMILES or RDKit molecules.
  • SMARTS, query-molecule, and explicit atom-index highlighting with dm.viz.lasso_highlight_image() and dm.viz.match_substructure().
  • File and notebook output choices, including SVG strings, Pillow PNG objects, and outfile paths 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.md for signatures, parameters, return types, utility helper notes, and ownership boundaries.
  • Use references/workflows.md for SVG/PNG rendering, lasso highlights, dataframe rendering, parallel jobs, fsspec checks, RDKit log control, and diagnostics recipes.
  • Use references/troubleshooting.md for headless rendering, invalid highlight indices, SVG/PNG/Pillow issues, notebook assumptions, fsspec URI errors, and joblib pickling failures.
  • Run scripts/visualization_utility_smoke.py --help for a safe executable smoke test, or run it with --output-dir <dir> to render a tiny SVG and exercise utility helpers.

Decision Checklist

  1. Normalize input molecules with the root skill or ../molecule-io-prep/ if the task starts from mixed files, tables, or potentially invalid SMILES.
  2. Choose use_svg=True for deterministic text artifacts and use_svg=False only when the caller explicitly needs PNG/Pillow output.
  3. Prefer lasso_highlight_image() for publication-style outline highlights and to_image(highlight_atom=..., highlight_bond=...) or match_substructure() for simple RDKit grid highlights.
  4. Keep parallel helper callables top-level or otherwise picklable when using process workers; use scheduler="threads" or n_jobs=0/1 for closures and notebook workflows.
  5. Wrap noisy parsing or rendering probes in dm.without_rdkit_log() and restore global logs with dm.enable_rdkit_log() after temporary global muting.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351