Skip to content

Guide · Agent skill

How to use the Molfeat molecule featurizer agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The molfeat skill teaches an AI agent to convert chemical structures, written as SMILES strings or RDKit molecules, into numerical features that machine learning models can use. It is aimed at chemists and data scientists building QSAR/QSPR models, similarity search or virtual screening pipelines. After this guide you will know what the skill covers, how to install it, how to ask for it in plain language, and which limits and safety points apply.

Molfeat Molecule FeaturizerK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download and unzip the skill. Get the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into the project's .claude/skills/ folder. Alternatively, upload the ZIP in the Claude apps under Settings, then Capabilities, then Skills.
  2. 2Create a Python environment. Use Python 3.11 or newer in an isolated environment, then install Molfeat with its dependencies. Add extras only when you need them.
  3. 3Ask for a specific featurization. Describe your molecules, the features you want and the downstream task, such as a QSAR model or similarity search.
  4. 4Check invalid records and alignment. Ask the agent to report rejected molecules and confirm that labels and IDs still line up with the feature rows.
  5. 5Save the configuration. Have the agent write the featurizer state to a file, and store the labels, split policy and package versions alongside it.

What does the molfeat skill make the agent do?

Once installed, the agent can write and run Python code that uses the Molfeat library to featurize small molecules. Supported representations include ECFP and MACCS fingerprints, RDKit descriptors, pharmacists-style pharmacophore pair features, 3D shape descriptors and pretrained language-model embeddings.

The skill also pushes the agent toward careful practice: keeping record IDs aligned with features, dropping invalid molecules by position rather than filtering each block separately, fitting imputation and scaling inside training folds only, and saving the featurizer configuration so results can be reproduced.

Install the molfeat skill

Download the skill ZIP from this page and unzip it. For a personal setup, place the folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings, then Capabilities, then Skills.

The skill itself needs Python 3.11 or newer, plus Molfeat with RDKit, datamol and PyTorch. Create an isolated environment for it. The skill's own example creates one like this:

  • Optional extras, such as molfeat[transformer] for Hugging Face models, are installed only when you need them.
  • Pretrained models need network access and disk space to download their weights.
  • On Windows, the interpreter path is .venv-molfeat\Scripts\python.exe instead.
uv venv --python 3.13 .venv-molfeat uv pip install --python .venv-molfeat/bin/python "molfeat==1.0.0"

Trigger the skill with a natural request

You do not need special syntax. Describe the chemistry task and the features you want, and mention your data. The agent should pick up the skill when the request involves molecular fingerprints, descriptors, embeddings or similarity search. Good requests name the input, the output and the purpose, for example: a CSV of SMILES and activity values, ECFP features with radius 2 and 2048 bits, and a scaffold split.

If you want the agent to follow the skill strictly, say so. Ask it to keep the record IDs aligned, to save the featurizer state to a YAML file, and to report any molecules that failed to parse.

  • Build an ECFP4 fingerprint matrix for these SMILES and keep the compound IDs aligned.
  • Compare MACCS and RDKit descriptors for a QSAR model on this split, and flag any NaN or Inf values.
  • Save the featurizer configuration so I can reproduce these features later.
  • Find pretrained embeddings for these molecules and tell me the embedding width and pooling used.

Worked example: fingerprints and invalid records

The skill's baseline example computes ECFP fingerprints for a small list of SMILES, skips the one that cannot be parsed, and keeps the labels aligned with the surviving molecules. It also checks that the result has the expected shape and contains only finite values. Ask the agent for something similar and check its asserts yourself.

The example uses toy labels only, so the numbers mean nothing scientifically. Its purpose is to show the mechanics.

  • ignore_errors is passed to the call, not the constructor.
  • With ignore_errors set to True, the output contains only valid features plus the original positions of those molecules.
  • ECFP radius 2 corresponds to ECFP4. FPVecTransformer uses a different default length, so set length=2048 explicitly.
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()

Save and reload the featurizer configuration

Saving the configuration lets you rebuild the same featurizer later, which supports reproducibility. The skill's example writes the state to a YAML file, reloads it and checks that the output matches.

State saves configuration only. It does not save assay labels, preprocessing decisions or a trained QSAR model, so keep those records separately. Load only state files you trust, because state can refer to Python classes and custom callables.

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

Choose a representation and evaluate it fairly

Start with ECFP and a simple estimator as a baseline. Use descriptors when you need interpretability, pharmacophores when you have a stated interaction hypothesis, and 3D features only when a conformer protocol is justified. Pretrained embeddings are candidates to test; a larger model does not guarantee better results on your task.

Compare representations on identical splits and endpoints. Keep close analogues and repeated measurements together, and prefer scaffold or temporal splits where they match your question. Random splits can leak information between training and test sets.

  • Fingerprints: ECFP, FCFP, MACCS and others, with fixed parameters and attention to bit collisions.
  • Descriptors: RDKit 2D descriptors, where columns depend on the RDKit version and nonfinite values need inspection.
  • Pharmacophores: CATS pairs, with width set by distance bins.
  • 3D shape: USR and USRCAT, which need a conformer.
  • Pretrained: Hugging Face language-model embeddings, which need weights, a licence check, and a saved tokenizer, pooling and maximum length.

What people use it for

  • Building an ECFP fingerprint matrix for a QSAR model on a CSV of SMILES and activity values.
  • Comparing MACCS, RDKit descriptors and pharmacophore features on the same scaffold split.
  • Preparing fingerprints for a similarity search over a compound library, with bounded memory use per chunk.
  • Generating pretrained embeddings for a set of molecules and recording the model revision and pooling used.

Frequently asked questions

How do I install the molfeat agent skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings, then Capabilities, then Skills.

What do I need to run molfeat?

You need Python 3.11 or newer, Molfeat with RDKit, datamol and PyTorch. Optional extras such as molfeat[transformer] are needed for Hugging Face models, and pretrained models also need network access and disk space for their weights.

Is the molfeat skill free?

The listing states an MIT licence. The SKILL.md file inside the skill header says Apache-2.0, so check the LICENSE file in the ZIP before relying on either.

Does molfeat work offline?

Core fingerprints run offline, according to the skill's compatibility notes. Pretrained models need network access the first time their weights are downloaded, and the model discovery calls read public HTTPS metadata.

Is it safe to load a molfeat featurizer file?

Only load configuration files from sources you trust. Saved state can identify Python classes and custom serialized callables, so YAML or JSON does not make arbitrary state safe.

How does molfeat compare with other featurization tools?

The skill's own guidance is to start with ECFP and a simple model, then compare representations on the same split. It does not benchmark molfeat against other libraries, so test alternatives on your own data.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose this skill if you build QSAR/QSPR models, similarity search or virtual screening pipelines and want an agent that follows careful featurization practice. Pick something else if your data is not chemical, or if you need validated predictions for clinical or safety-critical decisions, since the skill only covers feature engineering.

Download the skill

Find exactly what
you're looking for