Add measured RDKit Nature-style skill - #2
Merged
Conversation
Changes: - add a personal rdkit-nature-style skill with trigger and workflow guidance - add deterministic SVG/PNG rendering with physical-unit conversion - add mandatory post-render bond, stroke, and font measurements Impact: - adds one independently installable AtomFlow skill under boxuan-zhao - does not modify existing shared skills or chemistry semantics Verification: - rendered representative SVG and stereochemical PNG examples - passed skill-creator quick_validate.py - passed scripts/validate_skills.py for all 28 skills - confirmed discovery with npx skills add . --list --full-depth
There was a problem hiding this comment.
Pull request overview
Adds a new personal skill (rdkit-nature-style) that provides a deterministic, physically calibrated RDKit rendering preset (SVG/PNG) and emits a measurement JSON after rendering to validate bond-length targets and report key draw parameters.
Changes:
- Introduces
skills/boxuan-zhao/rdkit-nature-styleskill documentation and agent entrypoint. - Adds
scripts/render_nature_style.pyto render with fixed physical units (cm/pt via DPI) and emit*.measurements.json. - Implements post-render measurement reporting for bond lengths (and stroke/font reporting for SVG).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| skills/boxuan-zhao/rdkit-nature-style/SKILL.md | Documents the Nature-like preset, workflow, and required post-render validation steps. |
| skills/boxuan-zhao/rdkit-nature-style/scripts/render_nature_style.py | Implements RDKit rendering with cm/pt → px conversion and post-render measurement JSON output. |
| skills/boxuan-zhao/rdkit-nature-style/agents/openai.yaml | Registers the skill with a display name and default prompt for the OpenAI agent interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+48
to
+51
| font = Path(args.font_file) if args.font_file else Path(r"C:\Windows\Fonts\arial.ttf") | ||
| if font.is_file(): | ||
| opts.fontFile = str(font) | ||
| rdMolDraw2D.SetMonochromeMode(opts, (0, 0, 0), (1, 1, 1)) |
Comment on lines
+101
to
+105
| drawer.DrawMolecule(mol) | ||
| drawer.FinishDrawing() | ||
| data = drawer.GetDrawingText() | ||
| report = measure(drawer, mol, args, data if suffix == ".svg" else None) | ||
| report["canonical_smiles"] = canonical_before |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
rdkit-nature-styleskill underskills/boxuan-zhao/.Why
RDKit has no official Nature preset. This skill provides a clearly labeled Nature-like local preset and verifies finished geometry instead of trusting drawing options alone.
Impact
The new skill is independently installable and does not modify existing shared skills or molecular chemistry. It defaults to a 0.381 cm atom-center bond length, 0.021 cm stroke, Arial 6 pt, and calibrated atom-label clearance.
Validation
quick_validate.py.python scripts/validate_skills.pyfor all 28 skills.npx skills add . --list --full-depth.