Skip to content
Agentmart
Submit a tool

molfeat

Featurizes small molecules with Molfeat for QSAR/QSPR, chemical similarity, virtual screening, and molecular ML.

Skill by K-Dense-AI

IndexedMIT★ 54,411
Write a review

Chalk Labs

Need help deploying molfeat?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/k-dense-ai-molfeat

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Featurizes small molecules with Molfeat for QSAR/QSPR, chemical similarity, virtual screening, and molecular ML. Covers ECFP/MACCS fingerprints, RDKit descriptors, pharmacophores, pretrained embeddings, configuration persistence, and molecule-to-label alignment.

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/molfeat

Tools it pre-approves 4

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read
  • Write
  • Edit
  • Bash

What's inside

Skill name
molfeat
Description
Featurizes small molecules with Molfeat for QSAR/QSPR, chemical similarity, virtual screening, and molecular ML. Covers ECFP/MACCS fingerprints, RDKit descriptors, pharmacophores, pretrained embeddings, configuration persistence, and molecule-to-label alignment.
License
MIT
Compatibility
Requires Python 3.11+ and molfeat 1.0.0 (RDKit, datamol, PyTorch). macOS Intel needs Python 3.11–3.12 and upstream platform-specific dependency pins. Optional extras and network access are needed for pretrained models; core fingerprints run offline.
Allowed tools
Read, Write, Edit, Bash
Metadata
version: 2.0 · skill-author: K-Dense Inc. · last-reviewed: 2026-10-01 · upstream-version: 1.0.0
Instructions
170 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves any shell command

Files (5)

  • SKILL.md
  • api_reference.md · references/
  • available_featurizers.md · references/
  • choosing_a_featurizer.md · references/
  • examples.md · references/

SKILL.md (first lines)

# Molfeat — Small-molecule featurization

## When to use

Use this skill to turn SMILES or RDKit molecules into fingerprints, descriptors,
pharmacophores, or pretrained embeddings for molecular machine learning and similarity
search. Compare representations on the same molecular split and assay endpoint.

This skill targets **Molfeat 1.0.0**. The previous 0.11 runtime guidance is obsolete:
1.x supports modern Python and removes DGL/DGLLife, legacy Graphormer, and protein
adapters. Historical model-store cards can still name removed adapters. The tagged
[1.0 migration guide](https://github.com/datamol-io/molfeat/blob/1.0.0/docs/migration.md)
and source take precedence over older pages still served at the documentation's
`stable` URL.

## Installation

Create an isolated environment. Core examples were executed on Python 3.13.3/macOS
Apple Silicon with Molfeat 1.0.0, datamol 0.13.0, RDKit 2026.03.6, and PyTorch 2.14.1.

```bash
uv venv --python 3.13 .venv-molfeat
uv pip install --python .venv-molfeat/bin/python "molfeat==1.0.0"
```

On Windows use `.venv-molfeat\Scripts\python.exe` as the interpreter path. Upstream
supports Python 3.11–3.14; macOS Intel uses Python 3.11–3.12, PyTorch 2.2.x, NumPy<2,
and Transformers<5. Other platforms require PyTorch>=2.5. Let Molfeat's platform
markers resolve these constraints; do not copy Apple Silicon pins to Intel.

Install only needed extras with the same interpreter: `molfeat[transformer]==1.0.0`
for Hugging Face models, `[mordred]` for mordredcommunity, `[pyg]` for graph tensors,
`[fcd]` for ChemNet embeddings, `[selfies]` for SELFIES conversion, `[cache]` for
HDF5/Parquet, `[viz]` for visualization, and `[cloud]` for S3/GCS stores. DGL and
Graphormer extras no longer exist. Pretrained inference may download substantial
weights; check model licensing, disk space, and device requirements first.

## Workflow

1. Preserve source record IDs, labels, original structures, and a declared policy for
   salts, stereochemistry, tautomers, charge, and duplicate compounds. Standardization
   changes chemical identity; apply the same policy to training and prediction.
2. Start with an explicit ECFP baseline. A calculator processes one molecule;
   `MoleculeTransformer` batches it. `datamol.Mol` is RDKit's molecule type.
3. Record rejected positions and align every associated array. Inspect descriptor
   NaN/Inf separately: successful parsing does not guarantee finite features.
4. Fit any feature selection, imputation, scaling, and model inside the training fold.
   Prefer scaffold/group or temporal splits appropriate to the scientific question;
   random splits can leak close analogues or repeated measurements.
5. Save the featurizer state, ordered feature names, package versions, molecular
   preprocessing policy, and input IDs. Revalidate old state after migrating to 1.x.

### Fingerprint baseline and invalid records

```python
import numpy as np
from molfeat.calc import FPCalculator
from molfeat.trans import MoleculeTransformer

smiles = ["CCO", "invalid", "CC(=O)O", "c1ccccc1"]
record_ids = np.array(["ethanol", "rejected", "acetate", "benzene"])
y = np.array([0.1, 9.9, 0.2, 0.3])  # toy labels only
calc = FPCalculator("ecfp", radius=2, fpSize=2048, includeChirality=True)
transformer = MoleculeTransformer(calc, n_jobs=1, dtype=np.float32)
X, valid_ids = transformer(smiles, ignore_errors=True)
assert X.shape == (3, 2048)
X_ids, y_valid = record_ids[valid_ids], y[valid_ids]
assert valid_ids == [0, 2, 3]
assert np.isfinite(X).all()
```

`ignore_errors` belongs on the call, not the constructor. With `True`, `__call__`
returns filtered features and original input positions; with `False`, it raises on
failed molecules. `transform(..., ignore_errors=True)` preserves positions using
`None` for failures. Never filter each feature block independently and then concatenate.

ECFP radius is a bond radius: `radius=2` means ECFP4; radius 3 means ECFP6. In 1.0.0
`FPCalculator("ecfp")` defaults to radius 2 and 2048 bits. `FPVecTransformer` has a
*different* default length of 2000, so specify `length=2048` when using it.

### Configuration round trip

```python
transformer.to_state_yaml_file("featurizer.yml")
loaded = MoleculeTransformer.from_state_yaml_file("featurizer.yml")
np.testing.assert_array_equal(loaded(["CCO"]), transformer(["CCO"]))
```

Load only trusted configuration/artifacts. State can identify Python classes and
custom serialized callables; YAML/JSON does not make arbitrary third-party state safe.
State saves configuration, not assay labels, preprocessing decisions, or a trained QSAR model.

### Pretrained embeddings

Illustrative; imports and signatures were checked, but no model weights were downloaded:

```python
from molfeat.trans.pretrained import PretrainedHFTransformer

embedder = PretrainedHFTransformer(
    kind="ChemBERTa-77M-MLM", pooling="mean", concat_layers=-1,
    device="cpu", max_length=128, preload=False,
)
# First inference downloads/loads the model.
# embeddings = embedder(["CCO", "c1ccccc1"])
```

`PretrainedMolTransformer` is a base class, not a model-name factory. Use the concrete
adapter. Embedding width depends on checkpoint, pooling, and selected layers; do not
assume 768. Inspect token lengths: truncation at `max_length` can discard chemical
information. Keep the model revision, tokenizer, notation, pooling, and maximum
length with every saved embedding cache.

## Select and discover representations

| Need | Starting point | Check |
| --- | --- | --- |
| Fingerprint baseline | `FPCalculator("ecfp", radius=2, fpSize=2048)` | Chirality, bit collisions, fixed parameters |
| Structural keys | `FPCalculator("maccs")` | 167 entries, including unused bit zero |

From K-Dense-AI/scientific-agent-skills, MIT.

More from K-Dense-AI/scientific-agent-skills

Signals

Stars
54,411
Forks
4,797
Open issues
8
Last commit (this folder)
Oct 1, 2026 (1 month ago)
Last release
Oct 1, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
2.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from K-Dense-AI

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get molfeat running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying molfeat?

CallGet help
Cite this page

molfeat skill. Agent Mart. https://agentmart.dev/skills/k-dense-ai-molfeat (last updated 2026-10-24)