AGENT SKILL

structure-generation

Guides agents using datamol to generate and manipulate molecular structures, including conformers, SASA, alignment, fragmentation, scaffolds, reactions, attachments, and isomer enumeration.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
structure-generation
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guides agents using datamol to generate and manipulate molecular structures, including conformers, SASA, alignment, fragmentation, scaffolds, reactions, attachments, and isomer enumeration.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Datamol Structure Generation

Use this sub-skill when a task asks to create, enumerate, transform, align, fragment, assemble, scaffold, or react molecular structures with datamol beyond basic molecule conversion.

Route By Task

  • Conformers and 3D features: Use dm.conformers.generate, dm.conformers.cluster, dm.conformers.rmsd, dm.conformers.sasa, dm.conformers.get_coords, dm.conformers.center_of_mass, and dm.conformers.keep_conformers; see workflows and API guidance.
  • Alignment and atom ordering: Use dm.align.template_align, dm.align.auto_align_many, dm.conformers.align_conformers, and dm.reorder_mol_from_template; see workflows and API guidance.
  • Fragmentation and assembly: Use dm.fragment.brics, frag, recap, anybreak, mmpa_cut, break_mol, build, and assemble_fragment_order; see workflows and API guidance.
  • Scaffolds and fuzzy scaffolds: Use dm.to_scaffold_murcko, dm.make_scaffold_generic, dm.strip_mol_to_core, dm.compute_ring_system, and dm.scaffold.fuzzy_scaffolding; see workflows.
  • Reactions and attachments: Use dm.reactions.rxn_from_smarts, apply_reaction, select_reaction_output, is_reaction_ok, can_react, inverse_reaction, convert_attach_to_isotope, num_attachment_points, and open_attach_points; see workflows.
  • Isomer enumeration: Use dm.enumerate_tautomers, dm.enumerate_stereoisomers, dm.count_stereoisomers, dm.enumerate_structisomers, dm.canonical_tautomer, and dm.remove_stereochemistry; see workflows.

Boundaries

  • For SMILES parsing, molecule cleaning, neutralization, salt removal, or SDF/dataframe I/O, use the sibling molecule-io-prep skill before this one.
  • For fingerprints, pairwise distances, clustering generated sets by similarity, or diversity selection, use the sibling fingerprints-similarity skill after structure generation.
  • For drawing products, conformers, highlights, or scaffold grids, use the sibling visualization-utilities skill after this one.

Safety Defaults

  • Convert inputs with dm.to_mol, then sanitize or standardize through molecule-io-prep before reactions, conformers, and enumeration.
  • Bound expensive operations with small n_confs, n_variants, depth, timeout_seconds, max_n_mols, rms_cutoff, and num_threads=1 until the workflow is proven.
  • Treat reaction SMARTS, structural isomer enumeration, fuzzy scaffolds, MCS alignment, and fragment assembly as potentially combinatorial.
  • See troubleshooting when embedding fails, no conformers exist, template matches are ambiguous, reactions return no products, or enumeration grows too large.

Bundled Smoke Script

Run a deterministic tiny exercise of conformer generation, scaffold extraction, reaction application, and isomer counting:

python sub-skills/structure-generation/scripts/structure_generation_smoke.py --help
python sub-skills/structure-generation/scripts/structure_generation_smoke.py

The script prints JSON and uses only local CPU chemistry operations.

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