pku-yuangroup/openai4s/admet-genetic
Claude Code and agent skill by pku-yuangroup/openai4s
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
ADMET-guided genetic molecule optimization workflow from seed SMILES; use when the agent needs to build or run an RDKit/SA-Score/ADMET-AI GA pipeline for molecule optimization, enforce molecule lineage logs, render optimization-history HTML dashboards, and write candidate triage reports.
Install
npx vskill@latest install pku-yuangroup/openai4s/admet-geneticSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as pku-yuangroup/openai4s/admet-genetic.
ADMET Genetic Optimization
Use this skill to build and run a molecular optimization loop from seed SMILES. The target artifact is a ranked set of optimized candidate molecules with auditable lineage, scores, and report artifacts.
The sidecar deliberately does not provide a fixed GA engine. The agent must assemble and tune mutation, crossover, evaluation, filtering, and selection for the user's objective. kernel.py provides reusable molecule normalization, ADMET aggregation, lineage validation, and result visualization.
Special Reminder
In this skill, when see references/<file_name>.md is suggested, use host call to retrieval the complementary material.
Prerequisites
After creating the environment, select it with host.env.use("admet-sa-ga") before importing this skill's sidecar. Switching environments restarts the session kernel, so switch before constructing the pipeline. An in-kernel pipeline is fine while you are still exploring; see Formal runs below for what a run has to leave behind.
See references/admet.md for ADMET-AI installation details, endpoint behavior, runtime notes, and troubleshooting.
Data Contracts
For molecular representation, expected fields, candidate recording and lineage logging, see references/data_contracts.md. Must view these contracts before running the main pipeline.
Core Workflow
- Collect user-provided seed molecules or uploaded files and normalize them into a CSV input. The CSV should contain
smiles; includemolecule_idwhen stable user-facing IDs are available, otherwise synthesize deterministic IDs. - Standardize each input using
standardize_smiles(...), then usecanonicalize_smiles(...)fromkernel.pywhere a strict canonical string is needed. Molecule ID and canonical SMILES must be one-to-one for all logged records. - Design a genetic algorithm that includes molecular mutation and crossover. Match population size, generation count, operators, filters, and scoring weights to the user’s problem scale and constraints. For a starter design and implementation choices, see
references/ga.md. - Evaluate each valid molecule with RDKit descriptors, QED, SA-Score, and ADMET predictions. Aggregate ADMET endpoints into
admet_scoreandadmet_risk_flags; preserve raw endpoint outputs. Seereferences/data_contracts.mdfor required evaluation fields. - Apply hard filters, compute total score, select diverse candidates by Morgan fingerprint similarity, and update the population. See
references/ga.mdfor starter designs. - Assess whether the final candidates improve on the seeds and satisfy the user’s requirements. If they do not, adjust GA parameters, mutation/crossover operators, filters, or scoring weights, then rerun the internal GA workflow before finalizing output.
- Output final candidates, logs, report, visualization dashboard, and any other produced artifacts. See Artifacts for log schema and lineage rules.
Import
Formal runs
There are two ways to run this skill, and they are not interchangeable.
Prototyping. Assemble the GA in the kernel namespace, iterate on operators and weights, look at what comes out. Nothing here has to be saved. This is the right mode while you are still deciding what the search should do.
A formal run. Anything the user will act on, hand to someone else, or ask you to repeat is a formal run, and a formal run's deliverable includes the code that produced it. A GA that exists only as cell history cannot be re-run, cannot be reviewed, and cannot be pointed at next month's seed set: the numbers in report.md are then unreproducible in the exact sense — nobody, including you, can regenerate them.
For a formal run, save the pipeline to source modules before the final generation, run it from those modules, and record what ran:
- source modules under the working directory, split by responsibility where
the responsibilities genuinely differ — GA operators, evaluation/ADMET aggregation, filtering and scoring, I/O and reporting, and a thin entry point. Do not split for the sake of splitting, and never add an empty module to look organised: a single well-named module is better than five stubs.
- a config file (YAML or JSON) holding population size, generation count,
operator and filter parameters, scoring weights, the diversity threshold, and the random seed — everything a rerun needs and nothing the code should own.
- a run manifest naming the entry point, the config file, the input CSV, the
random seed, the resolved dependency versions, and the stop reason.
- tests over the parts that can be checked without a GPU or a network:
standardization and canonicalization round-trips, the hard-filter predicate, the scoring function, and the lineage validator. Run them and keep the output.
Save these as artifacts alongside the CSVs and the report — they are deliverables, not scratch. When the session is running in reusable_pipeline or codebase_change task mode, the completion contract additionally requires you to name them (source_files, entry_points, architecture_summary, test_evidence) and the Host verifies each claim before accepting the submission.
Artifacts
Lineage Requirements
Treat lineage as a first-class data contract:
molecule_ididentifies exactly one canonicalsmiles.smilesis always the deduplicated canonical SMILES.- For
operation == mutation, setparentto one parent ID and leaveparentsempty. - For
operation == crossover, leaveparentempty and setparentsto exactly two parent IDs separated by;. operation_detailshould be JSON containing operation name, operator detail, parent IDs, parent SMILES, and child canonical SMILES.
Record Schema
Before rendering or reporting, run validate_generation_log(frame) or equivalent assertions; see references/data_contracts.md.
Required Artifacts
When results are satisfactory, produce:
generation_log.csvwith complete lineage and evaluation records.candidates_final.csvwith selected final candidates.report.mdas an audit-friendly report.- molecule SVGs or embedded drawings when helpful.
- an optimization-history HTML dashboard via
render_optimization_history(log_path, out_path)fromkernel.py. The rendered HTML is self-contained and uses embedded SVG molecule depictions and matplotlib-generated SVG plots. - Other visualized artifacts suggested by system prompt or user requirements.
For a formal run (see above), additionally produce:
- the pipeline source modules that were actually executed,
- the run configuration file they read,
- a run manifest naming entry point, config, input, seed, dependency versions,
and stop reason,
- the tests over the deterministic parts, and the recorded output of running
them.
A prototyping run owes none of these; a run whose results the user will act on owes all of them.
The visualization workflow expects generation_log.csv to follow the lineage contract; for visualization assumptions, see references/data_contracts.md.
In report.md, include:
- Run goal, input file, seed count, valid seed count, and deduplication/invalid counts.
- Dependency versions, especially RDKit, ADMET-AI, pandas, numpy, and Python.
- GA parameters and stop reason.
- Standardization policy and failure reason summary.
- Scoring formula, hard filters, diversity threshold, and ADMET endpoint mapping.
- Per-generation summary: count, generated count, best score, mean score, pass count.
- Top candidate table with ID, canonical SMILES, parent lineage, operation, QED, SA-Score, ADMET score, risk flags, total score, and pass/fail.
- A short interpretation of what improved, which risks dominate, and whether top hits mainly arise from mutation or crossover.
- Limitations: low-level operators, heuristic ADMET aggregation, model uncertainty, no experimental validation, no synthetic feasibility guarantee beyond SA-Score.
- Next steps: better mutation templates, medicinal chemistry constraints, external validation, improved diversity, and route feasibility checks.
State clearly when ADMET-AI failed or when a fallback was used. Do not present predicted ADMET, toxicity, conditions, or synthesizability as experimental fact.
Shaping a formal run's source tree
examples/build_example.py is a rebuild fixture, not the template for your pipeline: it validates committed records and regenerates derived files, and it deliberately runs neither the GA nor ADMET-AI. Treat it as the shape of a single-responsibility entry point, not as the shape of the whole run.
A formal run's tree usually looks something like this. Rename, merge, or drop parts of it to match the problem — this is a starting point to tailor, not a layout to reproduce:
Two things this is not. It is not a file-count target: a narrow single-objective search whose operators are ten lines each is honestly one module plus an entry point, and splitting it further only spreads the reader out. And it is not a place for placeholders — a module that exists so the tree looks organised is worse than no module, because it claims a responsibility nobody implemented.
Import the sidecar helpers from your modules rather than copying them: standardize_smiles, canonicalize_smiles, classify_admet_columns, aggregate_admet_predictions, operation_detail_json, validate_generation_log, and render_optimization_history all live in this skill's kernel.py.
Reproducible Example
The committed example under examples/ is a recorded four-generation test run. It is an audit and visualization fixture, not evidence of experimental ADMET or synthetic feasibility:
generation_log.csv, generation_summary.csv, and config.yaml are the source records used to rebuild the derived dashboard and report. The build does not run the GA or ADMET-AI:
Use alternate output paths when checking reproducibility without replacing the committed artifacts:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/admet_genetic/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pku-yuangroup/openai4s/admet-genetic)