Molfeat

From mkurman/zorai · View interactive version

Molfeat is an AI agent skill from the GitHub repository mkurman/zorai. Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.

How to use this skill

Skill file

|------|------------|-------|----------|

| ecfp | Fingerprint | 2048 | Fast | General purpose |

| maccs | Fingerprint | 167 | Very fast | Scaffold similarity |

| desc2D | Descriptors | 200+ | Fast | Interpretable models |

| mordred | Descriptors | 1800+ | Medium | Comprehensive features |

| map4 | Fingerprint | 1024 | Fast | Large-scale screening |

| ChemBERTa-77M-MLM | Deep learning | 768 | Slow* | Transfer learning |

| gin-supervised-masking | GNN | Variable | Slow* | Graph-based models |

*First run is slow; subsequent runs benefit from caching

Resources

This skill includes comprehensive reference documentation:

references/api_reference.md

Complete API documentation covering:

When to load: Reference when implementing specific calculators, understanding transformer parameters, or integrating with scikit-learn/PyTorch.

references/available_featurizers.md

Comprehensive catalog of all 100+ featurizers organized by category:

When to load: Reference when selecting the optimal featurizer for a specific task, exploring available options, or understanding featurizer characteristics.

Search tip: Use grep to find specific featurizer types:

grep -i "chembert" references/available_featurizers.md
grep -i "pharmacophore" references/available_featurizers.md

references/examples.md

Practical code examples for common scenarios:

When to load: Reference when implementing specific workflows, troubleshooting issues, or learning molfeat patterns.

Troubleshooting

Invalid Molecules

Enable error handling to skip invalid SMILES:

transformer = MoleculeTransformer(
    calc,
    ignore_errors=True,
    verbose=True
)

Memory Issues with Large Datasets

Process in chunks or use streaming approaches for datasets > 100K molecules.

Pretrained Model Dependencies

Some models require additional packages. Install specific extras:

uv pip install "molfeat[transformer]"  # For ChemBERTa/ChemGPT
uv pip install "molfeat[dgl]"          # For GIN models

Reproducibility

Save exact configurations and document versions:

transformer.to_state_yaml_file("config.yml")
import molfeat
print(f"molfeat version: {molfeat.__version__}")

Additional Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.