molfeat - the hub for all your molecular featurizers
See the code
molfeat - the hub for all your molecular featurizers
Molfeat is a hub of molecular featurizers. It supports a wide variety of out-of-the-box molecular featurizers and can be easily extended to include your own custom featurizers.
Visit our website at https://molfeat.datamol.io.
Molfeat 1.x narrows the project to small-molecule featurization and a modern, maintainable stack. It removes the legacy DGL, DGLLife, Graphormer and protein adapters, keeps PyTorch Geometric as the graph backend, and adds maintained foundation-model integrations including CheMeleon and Mol-JEPA. Model loading is lazy, external checkpoint licences are explicit, and official representations are covered by integration tests.
HTTP model downloads use the required Datamol 0.13 series; they no longer require an unreleased dependency. SELFIES support is explicit, and InChI decoding now returns SMILES instead of silently failing.
See the complete changelog and the 1.x migration guide for the complete 1.0 transition.
Release maintainers: see the manual release guide.
Add Molfeat to a uv-managed project:
uv add molfeat
Pip and conda-forge remain supported: python -m pip install molfeat or
mamba install -c conda-forge molfeat.
The next major release requires Python 3.11 or newer and RDKit 2024.09 or
newer. PyTorch 2.5 or newer is used on maintained platforms; macOS Intel uses
the final available 2.2 wheel series with NumPy 1.26 and is tested on Python 3.12.
On Mac Intel, the transformer extra selects Transformers 4.57 rather than 5.
Use safetensors checkpoints there: current Transformers blocks pickle-based
weight loading with PyTorch below 2.6. SAFE's notation core can share this
environment, but its Transformers 5 model/training extras cannot.
Not all featurizers in the Molfeat core package are supported by default. Some featurizers require additional dependencies. If you try to use a featurizer that requires additional dependencies, Molfeat will raise an error and tell you which dependencies are missing and how to install them.
python -m pip install "molfeat[transformer]".python -m pip install "molfeat[selfies]".python -m pip install "molfeat[pyg]".python -m pip install "molfeat[fcd]".python -m pip install "molfeat[cache]".python -m pip install "molfeat[cloud]".python -m pip install "molfeat[mordred]".map4: see https://github.com/reymond-group/map4python -m pip install "molfeat[all]" installs every maintained optional
dependency compatible with the current interpreter. DGL, DGLLife and the
legacy Graphormer adapter have been removed: their binary and build constraints
conflict with the supported modern stack. PyTorch Geometric is the maintained
graph backend. Protein featurizers have also been removed so Molfeat 1.x has a
precise small-molecule scope. See the migration guide for
details.
| Molfeat | Python | RDKit | PyTorch |
|---|---|---|---|
1.x (development) | 3.11β3.14 | 2024.09+ | 2.5+ (2.2.x on macOS Intel) |
0.x | See the release metadata | See the release metadata | See the release metadata |
The functionality of Molfeat can be extended through plugins. The use of a plugin system ensures that the core package remains easy to install and as light as possible, while making it easy to extend its functionality with plug-and-play components. Additionally, it ensures that plugins can be developed independently from the core package, removing the bottleneck of a central party that reviews and approves new plugins. Consult the molfeat documentation for more details on how to create your own plugins.
However, this does imply that the installation of a plugin is plugin-dependent: please consult the relevant documentation to learn more.
import datamol as dm
from molfeat.calc import FPCalculator
from molfeat.trans import MoleculeTransformer
from molfeat.store.modelstore import ModelStore
# Load some dummy data
data = dm.data.freesolv().sample(100).smiles.values
# Featurize a single molecule
calc = FPCalculator("ecfp")
calc(data[0])
# Define a parallelized featurization pipeline
mol_transf = MoleculeTransformer(calc, n_jobs=-1)
mol_transf(data)
# Easily save and load featurizers
mol_transf.to_state_yaml_file("state_dict.yml")
mol_transf = MoleculeTransformer.from_state_yaml_file("state_dict.yml")
mol_transf(data)
# List all available featurizers
store = ModelStore()
store.available_models
# Find a featurizer and learn how to use it
model_card = store.search(name="ChemBERTa-77M-MLM")[0]
model_card.usage()
Please cite Molfeat if you use it in your research: .
See developers for a comprehensive guide on how to contribute to molfeat. molfeat is a community-led
initiative and whether you're a first-time contributor or an open-source veteran, this project greatly benefits from your contributions.
To learn more about the community and datamol.io ecosystem, please see community.
Molfeat's code is licensed under Apache-2.0. See LICENSE.
The CheMeleon adapter retains the Chemprop MIT notice.
Distribution metadata records both as Apache-2.0 AND MIT; this is not a choice
of licence for Molfeat's own code.
Downloaded model weights and custom Hub code have their own terms; Mol-JEPA
requires explicit acceptance of its non-commercial licence. See the
model licensing policy.
639 followers Β· starred Apr 2023
33 followers Β· starred Mar 2024
molfeat - the hub for all your molecular featurizers
See the code
molfeat - the hub for all your molecular featurizers
Molfeat is a hub of molecular featurizers. It supports a wide variety of out-of-the-box molecular featurizers and can be easily extended to include your own custom featurizers.
Visit our website at https://molfeat.datamol.io.
Molfeat 1.x narrows the project to small-molecule featurization and a modern, maintainable stack. It removes the legacy DGL, DGLLife, Graphormer and protein adapters, keeps PyTorch Geometric as the graph backend, and adds maintained foundation-model integrations including CheMeleon and Mol-JEPA. Model loading is lazy, external checkpoint licences are explicit, and official representations are covered by integration tests.
HTTP model downloads use the required Datamol 0.13 series; they no longer require an unreleased dependency. SELFIES support is explicit, and InChI decoding now returns SMILES instead of silently failing.
See the complete changelog and the 1.x migration guide for the complete 1.0 transition.
Release maintainers: see the manual release guide.
Add Molfeat to a uv-managed project:
uv add molfeat
Pip and conda-forge remain supported: python -m pip install molfeat or
mamba install -c conda-forge molfeat.
The next major release requires Python 3.11 or newer and RDKit 2024.09 or
newer. PyTorch 2.5 or newer is used on maintained platforms; macOS Intel uses
the final available 2.2 wheel series with NumPy 1.26 and is tested on Python 3.12.
On Mac Intel, the transformer extra selects Transformers 4.57 rather than 5.
Use safetensors checkpoints there: current Transformers blocks pickle-based
weight loading with PyTorch below 2.6. SAFE's notation core can share this
environment, but its Transformers 5 model/training extras cannot.
Not all featurizers in the Molfeat core package are supported by default. Some featurizers require additional dependencies. If you try to use a featurizer that requires additional dependencies, Molfeat will raise an error and tell you which dependencies are missing and how to install them.
python -m pip install "molfeat[transformer]".python -m pip install "molfeat[selfies]".python -m pip install "molfeat[pyg]".python -m pip install "molfeat[fcd]".python -m pip install "molfeat[cache]".python -m pip install "molfeat[cloud]".python -m pip install "molfeat[mordred]".map4: see https://github.com/reymond-group/map4python -m pip install "molfeat[all]" installs every maintained optional
dependency compatible with the current interpreter. DGL, DGLLife and the
legacy Graphormer adapter have been removed: their binary and build constraints
conflict with the supported modern stack. PyTorch Geometric is the maintained
graph backend. Protein featurizers have also been removed so Molfeat 1.x has a
precise small-molecule scope. See the migration guide for
details.
| Molfeat | Python | RDKit | PyTorch |
|---|---|---|---|
1.x (development) | 3.11β3.14 | 2024.09+ | 2.5+ (2.2.x on macOS Intel) |
0.x | See the release metadata | See the release metadata | See the release metadata |
The functionality of Molfeat can be extended through plugins. The use of a plugin system ensures that the core package remains easy to install and as light as possible, while making it easy to extend its functionality with plug-and-play components. Additionally, it ensures that plugins can be developed independently from the core package, removing the bottleneck of a central party that reviews and approves new plugins. Consult the molfeat documentation for more details on how to create your own plugins.
However, this does imply that the installation of a plugin is plugin-dependent: please consult the relevant documentation to learn more.
import datamol as dm
from molfeat.calc import FPCalculator
from molfeat.trans import MoleculeTransformer
from molfeat.store.modelstore import ModelStore
# Load some dummy data
data = dm.data.freesolv().sample(100).smiles.values
# Featurize a single molecule
calc = FPCalculator("ecfp")
calc(data[0])
# Define a parallelized featurization pipeline
mol_transf = MoleculeTransformer(calc, n_jobs=-1)
mol_transf(data)
# Easily save and load featurizers
mol_transf.to_state_yaml_file("state_dict.yml")
mol_transf = MoleculeTransformer.from_state_yaml_file("state_dict.yml")
mol_transf(data)
# List all available featurizers
store = ModelStore()
store.available_models
# Find a featurizer and learn how to use it
model_card = store.search(name="ChemBERTa-77M-MLM")[0]
model_card.usage()
Please cite Molfeat if you use it in your research: .
See developers for a comprehensive guide on how to contribute to molfeat. molfeat is a community-led
initiative and whether you're a first-time contributor or an open-source veteran, this project greatly benefits from your contributions.
To learn more about the community and datamol.io ecosystem, please see community.
Molfeat's code is licensed under Apache-2.0. See LICENSE.
The CheMeleon adapter retains the Chemprop MIT notice.
Distribution metadata records both as Apache-2.0 AND MIT; this is not a choice
of licence for Molfeat's own code.
Downloaded model weights and custom Hub code have their own terms; Mol-JEPA
requires explicit acceptance of its non-commercial licence. See the
model licensing policy.
639 followers Β· starred Apr 2023
33 followers Β· starred Mar 2024