# Molfeat

> Molecular featurization hub with one consistent interface over 100+ featurizers. Fingerprints (ECFP/Morgan, MACCS, atom pair, topological torsion, Avalon, RDKit, ERG), RDKit and Mordred descriptor sets, pharmacophore and 3D shape descriptors, scaffold keys, and pretrained embeddings (ChemBERTa, ChemGPT, MolT5, GIN, Graphormer) through a common transformer API with caching and parallelism. Use thi…

- **Type:** Skill
- **Install:** `agentstack add skill-k-dense-ai-drug-discovery-agent-skills-molfeat`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [K-Dense-AI](https://agentstack.voostack.com/s/k-dense-ai)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [K-Dense-AI](https://github.com/K-Dense-AI)
- **Source:** https://github.com/K-Dense-AI/drug-discovery-agent-skills/tree/main/skills/molfeat
- **Website:** www.k-dense.ai

## Install

```sh
agentstack add skill-k-dense-ai-drug-discovery-agent-skills-molfeat
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Molfeat - Molecular Featurization Hub

## Overview

Molfeat turns molecules (SMILES strings or RDKit/datamol `Mol` objects) into numerical
representations for machine learning: fingerprints, descriptors, pharmacophores, shape
descriptors, and pretrained neural embeddings, all behind one scikit-learn-compatible
transformer interface with state serialization and caching.

**Current baseline (verified 2026-08-16):** **molfeat 0.11.0** (May 2025) is still the latest
PyPI and GitHub release; the repository has had no commits since. All examples in this skill
were executed against 0.11.0 on **Python 3.10** with datamol 0.12.5, RDKit 2026.03.5, numpy
2.2.6 and torch 2.13.0. Python 3.11+ is not installable (`requires-python = ">=3.9,=1.1.1, from the store!`** — the HuggingFace-artifact
download bug above. Load from the HF Hub with `HFModel.from_pretrained`.

**A fingerprint parameter had no effect** — `FPCalculator` logs unknown parameters as an error
and then drops them; construction still succeeds. `FPCalculator("ecfp", n_bits=1024)` returns
2048 dimensions (the key is `fpSize`). Check `len(calc)` after passing parameters.

**`ImportError: Cannot import map4`** — MAP4 is external; install it from the reymond-group
repository.

**Package will not install** — check the interpreter first: molfeat 0.11.0 is capped below
Python 3.11 and pip/uv will refuse to resolve on 3.11+.

**3D featurizers return errors or zeros** — `desc3D`, `usr`, `usrcat`, `electroshape`,
`cats3D` and `pharm3D` need conformers. Generate them first with
`dm.conformers.generate(mol, n_confs=1)` and pass `Mol` objects, not SMILES.

**Reproducibility** — save `to_state_yaml_file` next to the model, and record
`molfeat.__version__`; state files carry the writing version in `_molfeat_version`.

## Composing with the rest of the bundle

- `rdkit` / `datamol` → before: **standardise and desalt first.** A featurizer embeds whatever
  string it is given, so a salt or mixture produces a vector for the wrong species — and no error.
- `chembl` → before: curated measured bioactivity is what you want to featurize, not raw rows.
- `pytdc` → alongside: the scaffold and cold-start splits. Featurization quality is invisible under
  a random split, which reports a fantasy R² regardless of the representation you chose.
- `deepchem` → after: model fitting, if you want the training loop rather than just the features.
- `admet-prediction` → instead: for standard ADMET endpoints, a ready-made model beats featurizing
  and training from scratch unless you have your own measured data.
- `chemical-space` / `generative-design` → after: features are what a similarity or diversity
  selection over an enumerated set is computed on.

**Try ECFP first.** Across most QSAR tasks a count-based Morgan fingerprint with a gradient-boosted
model is within noise of a pretrained transformer embedding, at a fraction of the cost. Reach for
pretrained embeddings when you have shown ECFP is the bottleneck, not before.

## Additional Resources

- Official documentation: https://molfeat-docs.datamol.io/
- GitHub repository: https://github.com/datamol-io/molfeat
- PyPI package: https://pypi.org/project/molfeat/
- Tutorial: https://portal.valencelabs.com/datamol/post/types-of-featurizers-b1e8HHrbFMkbun6

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [K-Dense-AI](https://github.com/K-Dense-AI)
- **Source:** [K-Dense-AI/drug-discovery-agent-skills](https://github.com/K-Dense-AI/drug-discovery-agent-skills)
- **License:** MIT
- **Homepage:** www.k-dense.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-k-dense-ai-drug-discovery-agent-skills-molfeat
- Seller: https://agentstack.voostack.com/s/k-dense-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
