rdkit-repr
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "rdkit-repr" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f799ea6a91e3c577ed593768b6f912f888f431bd93c8ef6f64d8f0ebd204bc14. Verify the upstream source and version against https://github.com/jinzhezenggroup/computational-chemistry-agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
rdkit-repr: A standardized command-line interface tool for RDKit molecular characterization workflows. It supports computing physicochemical descriptors from SMILES datasets (.csv or .smi) with .csv output, extracting molecular fingerprints with .npy or .csv output, and includes built-in SMILES validation. Suited for batch generation of RDKit descriptors or fingerprints and for listing available descriptor names and preset configurations.
Introduction source: third_party · jinzhezenggroup · 1.0 Reference
SkillPi interpretation
- Tasks
- This skill provides practical command patterns for **RDKit descriptor and fingerprint extraction** using the standardized CLI wrapper: `<skill_path>/scripts/rdkit_helper.py`.
- Inputs and outputs
- `desc` output (CSV):** Columns: `smiles`, then one column per descriptor. When `--file` is a `.csv` and `--no-merge` is not set, original CSV columns are appended. Rows only contain valid SMILES (invalid ones are logged to `*.skipped.csv`). `fp` output:** `.npy` (default): NumPy array of shape `(N_valid, nbits)`, dtype `uint8` (bit) or `int32` (count). `.csv`: `smiles` column followed by `bit_0` … `bit_{nbits-1}` columns. MACCS keys always produce 167 bits regardless of `--nbits`. ______________________________________________________________________
- Testing
- Not tested
Browse files
Frontmatter
name: rdkit-repr
description: >
A standardized CLI wrapper for RDKit molecular featurization workflows that handles
physicochemical descriptor computation (outputs .csv) and molecular fingerprint extraction
(outputs .npy or .csv), with built-in SMILES validation.
USE WHEN you need to compute RDKit molecular descriptors or fingerprints from SMILES
datasets (.csv/.smi), or when you want to list all available descriptor names and presets.
compatibility: Requires uv. Dependencies (rdkit, pandas, numpy) are declared as PEP 723 inline script metadata and are installed automatically when the script is invoked with `uv run <script_path>` (do NOT use `uv run python <script_path>` -- that bypasses the inline metadata and will not install dependencies automatically).
metadata:
author: luzitian
version: '1.0'
repository: https://github.com/rdkit/rdkitRDKit Molecular Featurization
This skill provides practical command patterns for RDKit descriptor and fingerprint extraction
using the standardized CLI wrapper: <skill_path>/scripts/rdkit_helper.py.
Key behaviors (important for Agents):
- The script prints environment detection (Python/RDKit/NumPy/Pandas) by default.
- Bad/illegal SMILES are skipped and logged to
*.skipped.csv(no crash). - Each run ends by printing absolute output paths like:
[RESULT] desc_csv=/abs/path.csv[RESULT] fp_npy=/abs/path.npy[RESULT] fp_csv=/abs/path.csv
Quick Start
Check CLI help:
uv run <skill_path>/scripts/rdkit_helper.py --help
Check subcommand help:
uv run <skill_path>/scripts/rdkit_helper.py desc --help
uv run <skill_path>/scripts/rdkit_helper.py fp --help
uv run <skill_path>/scripts/rdkit_helper.py list-desc --help
Disable environment printing (optional):
uv run <skill_path>/scripts/rdkit_helper.py --no-env desc --smiles "CCO" --output out.csv
Core Tasks
1) Compute physicochemical descriptors → .csv
Single SMILES (default preset: physchem, 25 descriptors):
uv run <skill_path>/scripts/rdkit_helper.py desc \
--smiles "CCO" \
--output /tmp/CCO.desc.csv
From CSV (default SMILES column is smiles):
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv \
--smiles-col smiles \
--output data.desc.csv
From SMI:
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file molecules.smi \
--output molecules.desc.csv
Choose a descriptor preset:
# Lipinski drug-likeness (6 descriptors: MolWt, MolLogP, NumHDonors, ...)
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv --preset lipinski --output data.lipinski.csv
# Extended physicochemical (25 descriptors, default)
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv --preset physchem --output data.physchem.csv
# Topological / graph indices (56 descriptors: BalabanJ, BertzCT, Chi*, PEOE_VSA*, ...)
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv --preset topological --output data.topo.csv
# All RDKit descriptors (~200 descriptors)
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv --preset all --output data.all_desc.csv
Select specific descriptors (overrides --preset):
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv \
--descriptors "MolWt,MolLogP,TPSA,NumHDonors,NumHAcceptors" \
--output data.custom.csv
Suppress merging back original CSV columns (output only smiles + descriptors):
uv run <skill_path>/scripts/rdkit_helper.py desc \
--file data.csv --preset physchem --no-merge --output data.desc_only.csv
2) Compute molecular fingerprints → .npy or .csv
Available fingerprint types:
| Type | Description | Default bits |
|---|---|---|
morgan2 |
Morgan circular FP radius 2 (ECFP4-like), bit vector | 2048 |
morgan3 |
Morgan circular FP radius 3 (ECFP6-like), bit vector | 2048 |
morgan2_count |
Morgan radius-2 count vector | 2048 |
rdkit |
RDKit path-based FP, bit vector | 2048 |
maccs |
MACCS 167 structural keys (bit vector, --nbits ignored) |
167 |
topological |
Topological torsion FP (count vector, hashed to --nbits) |
2048 |
atompair |
Atom-pair FP (count vector, hashed to --nbits) |
2048 |
layered |
Layered substructure FP, bit vector | 2048 |
pattern |
SMARTS pattern FP, bit vector | 2048 |
Single SMILES, output as NumPy array (.npy):
uv run <skill_path>/scripts/rdkit_helper.py fp \
--smiles "CCO" \
--type morgan2 \
--output /tmp/CCO.morgan2.npy
From CSV, Morgan ECFP4 (2048 bits):
uv run <skill_path>/scripts/rdkit_helper.py fp \
--file data.csv \
--smiles-col smiles \
--type morgan2 \
--nbits 2048 \
--output data.morgan2.npy
From SMI, MACCS keys (always 167 bits):
uv run <skill_path>/scripts/rdkit_helper.py fp \
--file molecules.smi \
--type maccs \
--output molecules.maccs.npy
Output as CSV (smiles + bit_0 … bit_N-1 columns):
uv run <skill_path>/scripts/rdkit_helper.py fp \
--file data.csv \
--type rdkit \
--nbits 1024 \
--format csv \
--output data.rdkfp.csv
Atom-pair fingerprint, 4096 bits:
uv run <skill_path>/scripts/rdkit_helper.py fp \
--file data.csv \
--type atompair \
--nbits 4096 \
--output data.atompair.npy
3) List available descriptors
List all descriptors and built-in presets:
uv run <skill_path>/scripts/rdkit_helper.py list-desc
List descriptors in a specific preset group:
uv run <skill_path>/scripts/rdkit_helper.py list-desc --group lipinski
uv run <skill_path>/scripts/rdkit_helper.py list-desc --group physchem
uv run <skill_path>/scripts/rdkit_helper.py list-desc --group topological
uv run <skill_path>/scripts/rdkit_helper.py list-desc --group all
Descriptor Presets Reference
| Preset | Count | Typical Use |
|---|---|---|
lipinski |
6 | Quick drug-likeness screening (Ro5 filter) |
physchem |
25 | General ML features: MW, logP, TPSA, ring counts, charge stats, … |
topological |
56 | Graph/topology indices: Balaban J, Kappa, Chi, PEOE_VSA, EState_VSA, … |
all |
~200 | Full RDKit descriptor set (includes fragment counts, MQN, etc.) |
Output Format Notes
desc output (CSV):
- Columns:
smiles, then one column per descriptor. - When
--fileis a.csvand--no-mergeis not set, original CSV columns are appended. - Rows only contain valid SMILES (invalid ones are logged to
*.skipped.csv).
fp output:
.npy(default): NumPy array of shape(N_valid, nbits), dtypeuint8(bit) orint32(count)..csv:smilescolumn followed bybit_0…bit_{nbits-1}columns.- MACCS keys always produce 167 bits regardless of
--nbits.
Agent Checklist
When using this skill for users:
- Confirm input format:
.csvrequires a SMILES column (defaultsmiles).smiuses the first token of each line as SMILES
- Quote SMILES containing special shell characters (brackets/parentheses):
- Example:
--smiles "[C@@H](O)(F)Cl"
- Example:
- For CSV workflows, verify column names:
desc:--smiles-colfp:--smiles-col
- Choose the right preset or fingerprint type for the downstream task:
- Drug screening / Ro5:
--preset lipinski - General ML featurization:
--preset physchemor--type morgan2 - Structural similarity search:
--type morgan2or--type rdkit - Substructure matching:
--type maccsor--type pattern
- Drug screening / Ro5:
- Watch for skipped SMILES:
- Check
*.skipped.csvand decide whether to fix or permanently drop them
- Check
- Always capture absolute output paths:
- Look for
[RESULT] ...=/abs/pathin stdout
- Look for
- If debugging is needed, enable full traceback:
RDKIT_HELPER_TRACE=1 uv run <skill_path>/scripts/rdkit_helper.py ...
References
- RDKit documentation: https://www.rdkit.org/docs/
- RDKit descriptor list: https://www.rdkit.org/docs/GettingStartedInPython.html#list-of-available-descriptors
- RDKit fingerprint guide: https://www.rdkit.org/docs/GettingStartedInPython.html#fingerprinting-and-molecular-similarity
Current listing version
1.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供标准化的 RDKit 分子描述符与指纹提取 CLI 工具,适用于药物发现、ML 特征工程等实际场景
- 支持多种输入格式(CSV/SMI)和输出格式(CSV/NPY),内置 SMILES 验证与错误处理机制
Highlights
- description 明确说明适用场景(计算描述符/指纹、列出可用描述符),frontmatter 与 body 中 USE WHEN 条件清晰
- 触发词覆盖合理,边界清晰,无歧义
Areas to improve
-
description 格式轻微不规范 Reported severity: Minor
frontmatter 中 description 使用 > 换行,但未严格单行书写
Recommendation: 建议将 description 写为单行字符串,避免换行符影响解析
Highlights
- 文档结构清晰,分 Quick Start、Core Tasks、Output Format、Agent Checklist 等章节
- 每部分提供具体命令示例,frontmatter 完整,单文件长度适中
Areas to improve
-
文档长度略长 Reported severity: Minor
skill_body 内容较为详尽,可能影响快速浏览
Recommendation: 可考虑将部分参考信息折叠或移至附录,保持核心流程简洁
Highlights
- 依赖通过 PEP 723 内联元数据声明,uv run 自动安装,兼容性说明清晰
- 内置 SMILES 验证与跳过机制(输出 skipped.csv),避免执行崩溃,输出路径明确打印
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
- www.rdkit.org
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.