MolDAIS: Molecular Descriptors with Actively Identified Subsets
MolDAIS is a powerful tool for efficient molecular property optimization through adaptive learning of sparse subspaces.
Overview
MolDAIS provides a framework for accelerating black-box molecular property optimization by intelligently identifying relevant molecular subspaces. This approach significantly reduces the computational cost of exploring chemical space while maintaining optimization effectiveness.
Installation
pip install MolDAIS
Quick Start Example
More examples are presented in the jupyter notebook
import torch
from MolDAIS.moldais import MolDAIS
# Step 1: Define your molecular search space
smiles_list = [
"CCO", "CCC", "CCN", "CCCl", "CCCC", "CCCO", "CCCN", "ClCCCl",
"CCOCC", "CCON", "CCCNCl", "CCCCCl", "CCCCN", "CCCCCO", "CCNCl",
"CCNO", "ClCCl", "CCOO", "CCNN", "COCO"
]
# Step 2: Define target property values (e.g., logP)
logP_values = torch.tensor([0.5, 1.2, 0.8, 2.1, 3.0, 1.5, 2.3, 2.8, 0.9, 1.4,
2.5, 1.9, 1.1, 2.7, 2.6, 1.6, 1.8, 2.2, 1.3, 1.7],
dtype=torch.float32)
# Step 3: Define the optimization problem
problem = MolDAIS.Problem(smiles_search_space=smiles_list,
targets=logP_values.unsqueeze(1),
experiment_name="LogP_Optimization_Test")
problem.compute_descriptors()
# Step 4: Configure optimizer parameters
optimizer_parameters = MolDAIS.OptimizerParameters(
sparsity_method='MI', # Feature selection method (Mutual Information)
acq_fun='EI', # Acquisition function (Expected Improvement)
num_sparsity_feats=10, # Number of features to select
multi_objective=False, # Single-objective optimization
constrained=False, # No constraints
total_sample_budget=7, # Total evaluation budget
initialization_budget=2, # Initial points for model building
seed=123 # Random seed for reproducibility
)
# Step 5: Create and run the optimization
mol_dais = MolDAIS(problem=problem, optimizer_parameters=optimizer_parameters)
mol_dais.configuration.optimize()
# Step 6: Get results
print("Best molecules found:")
print(mol_dais.results.best_molecules)
print("Best property values:")
print(mol_dais.results.best_values)
# Step 7: Visualize optimization progress
mol_dais.configuration.plot_convergence()
Features
- Adaptive Feature Selection: Intelligently identifies relevant molecular descriptors
- Flexible Acquisition Functions: Multiple strategies for exploring chemical space
- Support for Constraints: Handle constrained optimization problems
- Multi-objective Optimization: Optimize multiple molecular properties simultaneously
Planned Features
- Custom Callable Functions: Upcoming support for custom python wrapped functions
- Human-in-the-loop: Upcoming support for interactive optimization
Usage Options
With a SMILES List and Callable Function
# Coming soon - Human-in-the-loop optimization capabilities
Citation
Submitted to RSC Digital Discovery. Formal citation coming soon...
Based on previous work:
@misc{sorourifar2024accelerating,
title={Accelerating Black-Box Molecular Property Optimization by Adaptively Learning Sparse Subspaces},
author={Farshud Sorourifar and Thomas Banker and Joel A. Paulson},
year={2024},
eprint={2401.01398},
archivePrefix={arXiv},
primaryClass={q-bio.BM}
}
Contact
For questions, support, or collaboration opportunities:
Farshud Sorourifar - sorourifar.1@osu.edu
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for moldais 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moldais-1.0.0.tar.gz | 11.2 kB | Without provenance | Details for moldais-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moldais-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for moldais-1.0.0-py3-none-any.whl |
Total release size: 20.8 kB
Release files / moldais-1.0.0.tar.gz
| Download URL | moldais-1.0.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
961ca1998b35df1af12fd7b06352477d0715550b7ec6cf1c6354423457c241b5
|
|
BLAKE2b-256 checksum How to use checksums |
aefe65a2bdc4e05f09bda202b0bc63ddc2f2f231c1b5f3cb9835c8b7758ea926
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / moldais-1.0.0-py3-none-any.whl
| Download URL | moldais-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7ec3156ad75444c20bec5fc88e1dd9c92648eb83cb7bab5c13dbbcda2975815
|
|
BLAKE2b-256 checksum How to use checksums |
60d58e5c981bf7392de84e4dbcd0ac176ca396bee9e329a6993fbe6cc075bfc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for moldais 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.